You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
902 B
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include "StdAfx.h"
#include <deque>
using namespace std;
// 定义高程图像存储结构体
#pragma pack(1)
struct struDemPic
{
struDemPic()
{
pDEMData = NULL;
};
virtual ~struDemPic()
{
if (pDEMData != NULL)
{
delete[] pDEMData;
pDEMData = NULL;
}
}
signed short int *pDEMData;
string strDemName;
double adfGeoTransform[6];
int iXSize;
int iYSize;
};
#pragma pack()
// 全局变量
extern std::deque<struDemPic*> g_DemPicList;
// 接口函数
//功能:基于经纬度读取地面高程
//输入:
// 1. dLonDeg: 经度(度)
// 2. dLatDeg: 纬度(度)
// 3. sDir: 高程数据文件存储路径, "...\\ElevationData"
//
//输出:
// 1. fElevator:高程(米)
//
//返回值若函数运行成功返回true否则返回false
bool GetDem( float& fElevator, double dLonDeg, double dLatDeg, string sDir, bool bNearst);
// 功能清理DEM记忆内存
void ClearDemMem();