GeographicLib安装

更新时间:2023-07-19 04:48:04 阅读: 评论:0

GeographicLib安装
安装
下载压缩包安装:
Unpack the source, running one of
季氏将伐颛臾钢琴重量tar xfpz GeographicLib-1.
then enter the directory created with
cd GeographicLib-1.51
Create a parate build directory and enter it, for example,
mkdir BUILD
cd BUILD
白玫瑰花>孕晚期宫缩频繁Run cmake, pointing it to the source directory (…). On Linux, Unix, and MacOSX systems, the command is  cmake ..
Build and install the software. In non-IDE environments, run
make        # compile the library and utilities
make test    # run some tests
make install # as root, if CMAKE_INSTALL_PREFIX is a system directory
include in files
find_package (GeographicLib REQUIRED)
add_executable (program source1.cpp source2.cpp)
target_link_libraries (program ${GeographicLib_LIBRARIES})
实例:WGS84转UTM再转MGRS(部分通⽤代码省略)
盗心贼
#include<GeographicLib/Geodesic.hpp>
#include<GeographicLib/UTMUPS.hpp>
有关秋天的诗句
#include<GeographicLib/MGRS.hpp>
double northing, easting;// UTM坐标
bool northp;// 北半球还是南半球
int izone;// UTM的zone
//WGS84->UTM
UTMUPS::Forward(newGps.lat, newGps.lon, izone, northp, easting, northing);
string zonestr = UTMUPS::EncodeZone(izone, northp);
cout << zonestr <<" "<< easting <<" "<< northing <<"\n";
//UTM->MGRS
string mgrs;
// int prec=5, 意思是精确到m,如果prec=7,精确到cm,如此类推
李瑟娥
MGRS::Forward(izone, northp, easting, northing,7, mgrs);
// mgrs code转成MGRS坐标
cout <<stod(mgrs.substr(5,7).inrt(5,"."))<<" "<<stod(mgrs.substr(12).inrt(5,"."))<<"\n";工作检讨

本文发布于:2023-07-19 04:48:04,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1104403.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:钢琴   安装   部分   诗句
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图