Boost.Geometry中的几何要素(Primitives)
点(Point)
- 单个点(Point)
点是几何要素中最基本的要素。Boost.Geometry中点的设计考虑到三个概念: 坐标数据类型、坐标维度和坐标系
//点
template<typename CoordinateType, //存储坐标值的数据类型std::size_t DimensionCount,//坐标维度typename CoordinateSystem //坐标系统
>
class point{};//二维点
template<typename CoordinateType, typename CoordinateSystem = cs::cartesian //默认笛卡尔坐标系
>
class point_xy : public model::point<CoordinateType, 2, CoordinateSystem>
{};//三维点
template<typename CoordinateType, typename CoordinateSystem = cs::cartesian //默认笛卡尔坐标系
>
class point_xyz : public model::point<CoordinateType, 3, CoordinateSystem>
{};
- 点集合(MultiPoint)
存储多个点的容器,具体使用的哪一个容器可以通过模板参数中的Container 来指定,默认是std::vector,可以是std的容器,也可以是Boost的另外提供的容器
template
<typename Point, //点类型template<typename, typename> class Container = std::vector, //存储点集合使用的具体容器template<typename> class Allocator = std::allocator //空间配置器
>
class multi_point : public Container<Point, Allocator<Point> >{};
外包(Box)
外包也就是AABB(Axis Align BoundingBox),采用轴对齐的矩形来表示的一个区域。常用来衡量其他几何要素在轴方向上的跨度。
template<typename Point>
class box{};
线段(Segment)
线段由两个点表示,两个点分起点和终点。Boost.Geometry中线段std::pair<Point, Point>,其中pair的first对应线段起点,second对应终点。
template<typename Point>
class segment : public std::pair<Point, Point>{};
折线(Linestring)
折线多个首位相连的线段组成,在数据中是用容器存储的多个点,每个相邻点间表示一个线段
- Linestring
template<typename Point, //点类型template<typename,typename> class Container = std::vector, //存储的容器类型template<typename> class Allocator = std::allocator //空间配置器
>
class linestring : public Container<Point, Allocator<Point> >
{};
- 折线集合(MultiLinestring)
折线集合与折线的关系,就如同点集合与点的关系
template
<typename LineString, //折线类型template<typename, typename> class Container = std::vector, //存储集合使用的容器,可以和存储折线使用的容器不一致template<typename> class Allocator = std::allocator //空间配置器
>
class multi_linestring : public Container<LineString, Allocator<LineString> >{};
环(Ring)
环主要是为了描述Polygon,Polygon是可以描述带洞的多边形,即包括一个外轮廓和0或多个洞,其中洞和轮廓都市使用环来表示。环即是一个闭合的Linestring。相比于Linestring,会根据指定的顺逆时针对点集合进行调整。
template<typename Point,bool ClockWise = true, bool Closed = true,template<typename, typename> class Container = std::vector,template<typename> class Allocator = std::allocator
>
class ring : public Container<Point, Allocator<Point> >{};
多边形(Polygon)
- 单个带洞多边形(Polygon)
template
<typename Point, //点类型bool ClockWise = true, //外轮廓是使用顺时针的Ring来表示还是逆时针bool Closed = true, //是否要求Ring的首尾点一定要一致,还是自动闭合template<typename, typename> class PointList = std::vector,template<typename, typename> class RingList = std::vector,template<typename> class PointAlloc = std::allocator,template<typename> class RingAlloc = std::allocator
>
class polygon{};
- 多边形集合(MultiPolygon)
template
<typename Polygon,template<typename, typename> class Container = std::vector,template<typename> class Allocator = std::allocator
>
class multi_polygon : public Container<Polygon, Allocator<Polygon> >{};
Boost.Geometry中的几何要素(Primitives)相关推荐
- Boost.Geometry的RTree空间索引
RTree原型 template <typename Value, //参与构建RTree索引的值typename Parameters, //RTree构建的参数typename Indexa ...
- 在VS中关于boost::geometry图形开发库的几何图形可视化插件(Graphical Debugging)
目录 1.Boost.Geometry介绍 2.Graphical Debugging插件 3.VS中安装 3.1联机安装 3.2手动安装 3.3实操安装失败 1.Boost.Geometry介绍 B ...
- ArcEngine中shp中先加入要素然后删除一部分要素后,放大图形后不显示的问题解决方法...
ArcEngine中shp中先加入要素然后删除一部分要素后,放大图形后不显示的问题解决方法 (一)问题描述如下: shp中先加入要素然后删除一部分要素后,图形为什么显示不正常了 //--------- ...
- 开源GIS(十四)——openlayers通过geoserver中WFS更改要素
目录 一.引言 二.WFS更改要素实现 三.WFS更改要素原理 1.请求xml 2.postman使用 3.要素修改 4.返回xml 四.总结 一.引言 上文介绍了通过WFS服务进行添加,在很多情况下 ...
- 利用OGR处理几何要素
OGR常量表示的不同几何类型 虽然许多几何要素只存在于二维(2D)的直角坐标系平面(X和Y坐标),也有三维(3D)带有Z值得几何对象.这些Z值通常用来表示高程,但也可以用于表示其它数据,如每年温度得最 ...
- ArcObjects中的几何对象简介(一)
几何对象是ArcObjects中使用最广泛的对象之一,用户在新建.删除.编辑何进行地理分析的时候,就是在处理一个包含几何形体的矢量对象.几何对象用于表达要素(Feature)或图形元素(Graphic ...
- UE4中三维几何总结——几何体
UE4中三维几何总结--几何体 1.简述 2.基本图元 3.几何图元类型 3.1 凸面网格Convex Mesh 3.2 三角形网格Triangle Mesh 3.3 高度场Height Field ...
- ArcPy之读取几何要素(shapefile)的坐标
简单介绍介绍如何使用ArcPy读取几何要素的坐标,后续会介绍如何生成一个shp文件. 掌握arcgis软件及其开发技巧对于任何一个giser都是必备的基本功,说来简单,没有大量的实践和练习一切都是扯淡 ...
- 几何公差之几何要素定义之间的相互关系是怎样的?
几何要素定义之间的相互关系,如图9所示. 要素可分为组成要素(表面轮廓.轮廓线)和导出要素(中心点.轴线.中心面)导出要素是由一个或几个组成要素所确定的. 在图样上给出的是理论正确的公称要素,包括公称 ...
最新文章
- 如何破解安卓手机上的图形锁(九宫格锁)
- (Mybaitis)分页
- java 初始化duration_Java 8-Duration 详解
- 智能指针的释放_手把手教你实现智能指针
- AJAX请求和跨域请求详解(原生JS、Jquery)
- 卡片游戏 数学期望
- PrepareStatement 和Statement 的区别?
- nstimer循环引用_ios开发中经典循环引用场景?
- 用碧海潮声制作的宋体(雅黑宋体)替换Windows7原生的火柴棍式的宋体
- BZOJ 1086: [SCOI2005]王室联邦( )
- 计算机绘图国标规定,(0922202计算机绘图大作业.doc
- mysql---索引及explain的作用
- jquery,字符串转json对象,json对象转字符串
- 不能注册 DLL/OCX:Regsvr32失败的解决办法
- docker下载和安装
- 利用Power Design 进行数据库设计(超详细)
- 面试中最常见的10个经典问题,答对了通过率提高50%,快来抄答案!
- React中关于props的那些事
- 中职高考计算机专业真题,中职高考计算机试题及答案
- 清华大学计算机系刘斌,清华大学计算机科学与技术系导师简介:林闯
热门文章
- STM32 - 使用FSMC控制LCD
- AWS免费套餐服务器部署NET CORE网站
- java用springboot开发的美食菜谱网(有美食达人)附论文
- 八种消除沟通上的不良习惯地的方法
- [存档]Martin Fowler在UMLChina交流实录
- js实现音频可视化波形图
- 令人愉快的 Nuxt3 教程 (二): 快速轻松地搭建博客
- 换个角度看“量子技术”,它离我们可能不再遥远
- android 读取wps_Android 默认使用wps打开本地文档
- 开源魔兽世界私服搭建