资源描述:
《数字高程模型作业_DEM编程.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、此次作业主要采用C++语言编写程序,同时利用了matlab进行格网点以及DEM三维显示。主要程序如下:#include"StdAfx.h"#include"IDW.h"#include"IDWDlg.h"#include"math.h"#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=__FILE__;#endif/***************************************************************/
2、/*CAboutDlgdialogusedforAppAbout*//**************************************************************/classCAboutDlg:publicCDialog{public:CAboutDlg();//DialogData//{{AFX_DATA(CAboutDlg)enum{IDD=IDD_ABOUTBOX};//}}AFX_DATA//ClassWizardgeneratedvirtualfunctionoverrides//{{
3、AFX_VIRTUAL(CAboutDlg)protected:virtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport//}}AFX_VIRTUAL//Implementationprotected://{{AFX_MSG(CAboutDlg)//}}AFX_MSGDECLARE_MESSAGE_MAP()};CAboutDlg::CAboutDlg():CDialog(CAboutDlg::IDD){//{{AFX_DATA_INIT(CAboutDlg)/
4、/}}AFX_DATA_INIT}voidCAboutDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExchange(pDX);//{{AFX_DATA_MAP(CAboutDlg)//}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CAboutDlg,CDialog)//{{AFX_MSG_MAP(CAboutDlg)//Nomessagehandlers//}}AFX_MSG_MAPEND_MESSAGE_MAP()/*************
5、************************************************//*CIDWDlgdialog*//*************************************************************/CIDWDlg::CIDWDlg(CWnd*pParent/*=NULL*/):CDialog(CIDWDlg::IDD,pParent){//{{AFX_DATA_INIT(CIDWDlg)m_strOpenFileName=_T("");m_strSaveFileNam
6、e=_T("");m_maxX=0;m_maxY=0;m_minX=0;m_minY=0;m_rad=100.0f;m_stepDis=100.0f;//}}AFX_DATA_INIT//NotethatLoadIcondoesnotrequireasubsequentDestroyIconinWin32m_hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);}voidCIDWDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExcha
7、nge(pDX);//{{AFX_DATA_MAP(CIDWDlg)DDX_Control(pDX,IDC_PROGRESS1,m_ctrProgress);DDX_Text(pDX,IDC_OPEN_FILE,m_strOpenFileName);DDX_Text(pDX,IDC_SAVE_FILE,m_strSaveFileName);DDX_Text(pDX,IDC_EDIT_MAX_X,m_maxX);DDX_Text(pDX,IDC_EDIT_MAX_Y,m_maxY);DDX_Text(pDX,IDC_EDIT_M
8、IN_X,m_minX);DDX_Text(pDX,IDC_EDIT_MIN_Y,m_minY);DDX_Text(pDX,IDC_EDIT_RAD,m_rad);DDX_Text(pDX,IDC_EDIT_STEP_DIS,m_stepDis);//}}AFX_DATA_M