boost::geometry::srs::transformation详解
在GIS开发中,经常需要将不同坐标系下的地理数据进行转换。Boost.Geometry库提供了一个方便的空间参考系统(SRS)转换工具,即boost::geometry::srs::transformation。本文将介绍boost::geometry::srs::transformation的用法,并提供一个示例程序。
使用boost::geometry::srs::transformation需要包含boost/geometry.hpp头文件和boost/geometry/srs/transformation.hpp头文件。boost::geometry::srs::transformation的基本用法如下:
template <typename PointSource, typename PointTarget, typename Strategy>
void transform(PointSource const& source, PointTarget& target, Strategy const& strategy);
其中,PointSource和PointTarget分别是源坐标系和目标坐标系下的点类型,Strategy是转换策略。
boost::geometry::srs::transformation支持的坐标系类型包括:
- 地理坐标系(geographic coordinate system),使用经度和纬度表示位置。
订阅专栏 解锁全文
288



被折叠的 条评论
为什么被折叠?



