您的位置:首页 > 移动开发 > IOS开发

ArcGIS Runtime SDK for iOS(五) --- 空间几何分析与操作(上)

2016-04-16 17:24 633 查看
2016.4.16 武汉 大雨

by SevenJohs.

概述

空间几何分析功能做为GIS重要的功能,在应用研发上需要十分熟悉这类功能,通过使用AGSGeometryEngine可以实现对几何拓扑、距离以及关联运算。


主要内容

空间分析基础知识与对应AGSGeometryEngine方法

自己写的简单Demo

空间分析基础知识

TopoLogicalAnalysis(只介绍GIS应用开发中最常用的)

Boundary

-Geometry对象的边界:

polygon由polyline组成;polyline 由point组成。

Clip

- 几何裁剪

-(AGSGeometry*)clipGeometry:(AGSGeometry*)geometry withEnvelope:(AGSEnvelope*)envelope;


Cut

- 从中心分开几何

变为左右两个geometry。

-(NSArray*)cutGeometry:(AGSGeometry*)geometry withCutter:(AGSPolyline*)cutter;


Buffer

- 缓冲区

在几何对象的基础上向四周等距离填充。

-(AGSMutablePolygon*)bufferGeometries:(NSArray*)geometries byDistance:(double)distance;


-(AGSMutablePolygon*)bufferGeometry:(AGSGeometry*)geometry byDistance:(double)distance;


Union

- 并集

-(AGSGeometry*)unionGeometries:(NSArray*)geometries;


Intersect

- 交集

-(AGSGeometry*)intersectionOfGeometry:(AGSGeometry*)geometry1 andGeometry:(AGSGeometry*)geometry2;


Different

- 减法

-(AGSGeometry*)differenceOfGeometry:(AGSGeometry*)geometry1 andGeometry:(AGSGeometry*)geometry2;


RelationLogicalAnalysis(只介绍常用的),返回BOOL

Contains

-A包含B关系判断

-(BOOL)geometry:(AGSGeometry*)geometry1 containsGeometry:(AGSGeometry*)geometry2;


Within

-A包含于B关系判断

-(BOOL)geometry:(AGSGeometry*)geometry1 withinGeometry:(AGSGeometry*)geometry2;


Crosses

- 相交关系判断

-(BOOL)geometry:(AGSGeometry*)geometry1 crossesGeometry:(AGSGeometry*)geometry2;


Touches

- 相连关系判断

-(BOOL)geometry:(AGSGeometry*)geometry1 touchesGeometry:(AGSGeometry*)geometry2;


Disjoint

- 不相交关系判断

-(BOOL)geometry:(AGSGeometry*)geometry1 disjointToGeometry:(AGSGeometry*)geometry2;


Overlaps

- 重叠关系判断

-(BOOL)geometry:(AGSGeometry*)geometry1 overlapsGeometry:(AGSGeometry*)geometry2;


ProximityLogicalAnalysis(只介绍常用的),返回最近的距离的点(坐标),或距离

Vertex

-只包含顶点的最近的点判断

-(AGSProximityResult*)nearestVertexInGeometry:(AGSGeometry*)geometry toPoint:(AGSPoint*)point;


Coordinate

-包含整个Geometry的最近的点判断

-(AGSProximityResult*)nearestCoordinateInGeometry:(AGSGeometry*)geometry toPoint:(AGSPoint*)point;


-空间分析,简单Demo

待续
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: