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.
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.
/*---------------------------------------------------------------------------
概述: 读取30米地面读取。
使用环境: windows操作系统
VS2008 VS2010 VS2013
依赖项:
gdal库
boost库
应用示例:
1) 获取高程时, 直接调用函数 GetDem( ...)即可;
2) 程序若调用过该函数, 最后需要调用函数ReleaseDemMemory()释放内存资源,避免泄漏内存;
问题及解决情况记录:
问题1:
解决情况:
问题2:
解决情况:
......
修改记录:
版本 日期 作者 备注
V1.0 2016/12/15 王家星 在原有代码整理与简化,添加头文件注释
----------------------------------------------------------------------------*/
# include "StdAfx.h"
# include <string>
using namespace std ;
//1 功能:基于经纬度读取地面高程
//输入:
// 1. fLonDeg: 经度(度)
// 2. fLatDeg: 纬度(度)
// 3. sDir: 高程数据文件存储路径, 默认设为:"D:\\ElevationData", 可根据实际情况修改, 高程tif文件文件名字遵循标准格式:
// 举例: ASTGTM_N20E095_dem.tif
//
//输出:
// 1. fElevator:高程(米)
//
//返回值: 若函数运行成功, 返回true, 否则返回false
bool GetDem ( float & fElevator , float fLonDeg , float fLatDeg , string sDir = " D: \\ ElevationData " ) ;
//2 功能: 释放DEM加载的资源
void ReleaseDemMemory ( ) ;