GeographicLib安装
GeographicLib C++ API 官方文档
安装
下载压缩包安装:
GeographicLib-1.51.tar.gz
Unpack the source, running one of
tar xfpz GeographicLib-1.51.tar.gz
then enter the directory created with
cd GeographicLib-1.51
Create a separate build directory and enter it, for example,
mkdir BUILDcd 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 utilitiesmake test # run some testsmake install # as root, if CMAKE_INSTALL_PREFIX is a system directory
- include in your CMakeLists.txt 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).insert(5, ".")) << " " <<stod(mgrs.substr(12).insert(5, ".")) << "\n";
GeographicLib安装相关推荐
- ethz的多传感器融合算法msf编译与安装
ethz的多传感器融合算法msf编译与安装 1.建立工作空间 2.下载安装所有依赖 2.1 下载依赖库 2.2 安装Google的glog 2.3 安装GeographicLib 2.4 编译 3.报 ...
- superset的安装和使用--docker
superset是一个非常好用的数据可视化工具. 官网:apache/incubator-superset: Apache Superset (incubating) is a modern, ent ...
- mac下安装python3
mac下安装python3 1.先用brew search命令查看 brew search python3 结果如下所示: ==> Formulae boost-python3 python3 ...
- QGIS中安装Python第三方库
在QGIS自带的python中安装第三方库 如果安装了QGIS,在所有程序中搜OSGeo4W Shell,以管理员身份打开,可以安装第三方库 环境设置 错误尝试: 直接安装,不是QGIS中的pytho ...
- ubuntu下使用GeographicLib库
楼主在使用groundtruth生成imu数据集的时候,需要使用到Geographiclib库,安装过程遇到了一些问题,花了半天时间最终还是成功解决了. 1.下载Geographiclib库.这里我下 ...
- 机器人开发常见第三方库、软件安装和使用
写在前面: 大多数情况下,没有人比官方更懂官方,所以编译安装.库配置及简单使用优先看官方github仓库README或者官网,当然不排除有些博文或者教程有更好的表达方式更详细的说明 cmake 编译三 ...
- AI之AutoML:Ludwig(无需编写代码/易于使用的界面和可视化自动机器学习工具)的简介、安装、使用方法之详细攻略
AI之AutoML:Ludwig(无需编写代码/易于使用的界面和可视化自动机器学习工具)的简介.安装.使用方法之详细攻略 目录 Ludwig的简介 Ludwig(无需编写代码/易于使用的界面和可视化自 ...
- SLAM 中地理计算库 GeographicLib 极简入门 (Ubuntu 18.04 c++例子)
地理计算库 GeographicLib 极简入门 时间:20210412 文章目录 1. 文档 2. 安装 3. 项目集成 4. 极简的例子 1. 文档 GeographicLib - 官方文档 Ge ...
- linux环境下nacos的安装+启动,阿里云服务器安装nacos
nacos安装+启动(linux环境): 基础:安装java环境 官网下载压缩包:如 nacos-server-1.2.1.tar.gz 放在自定义目录下 # 解压 tar -xvf nacos-se ...
最新文章
- 以太坊区块链_以太坊区块链搭建与使用(一)-私有链
- 图像混合模式:Android Paint Xfermode 使用和demo
- VirtualBox 在Linux升级后不能用的解决办法实践
- 前端进阶(8) - 前端开发需要了解的工具集合:webpack, eslint, prettier, ...
- 十三、制作 iVX音乐分享小程序
- C# winform 自定义皮肤制作
- 带你自学Python系列(五):Python解决列表字符不区分大小写问题
- 2017.4.20 火星人 思考记录
- postgresql事务
- 腾讯正式宣布成立技术委员会!要对组织架构下狠手
- 监控apache脚本原理
- bzoj2525 1426
- linux shell有哪些变量,Linux Bash Shell有关变量
- 电脑计算机睡眠和休眠模式区别,电脑休眠和睡眠的区别?
- CodeBlocks调试教程
- Java之网络编程(二)UDP
- 三极管/达林顿管 管脚定义
- FND MESSAGE的用法
- pycharm选择虚拟环境
- 开启xmp1还是2_在DLSS2.0技术的加持下,游戏开启光线追踪的硬件需求是否会大大降低?...
热门文章
- maven仓库镜像改为阿里巴巴
- b站小姐姐词云视频制作学习记录
- SpringBoot ActiveMQ 整合使用
- AttacKG: Constructing Technique Knowledge Graph from Cyber Threat Intelligence Reports 源码复现
- 今日头条如何快速开通原创
- uniapp 微信小程序表单input输入框,点击下面的输入框时输入法弹出会把输入框内容顶上去
- 优化Docker镜像大小方案 2017年12月10日 17:54:46 阅读数:1774 标
- java redis srem_Java Jedis.srem方法代碼示例
- 【愚公系列】2022年08月 微信小程序-(rich-text)富文本和(text)文本的详解
- empyrical 模块的学习与分析 note4