多个多边形几何要素的空间查询

如何进行含有多个要素的空间查询
已邀请:

徐鸿至

赞同来自:

【解决办法】:
空间查询一次只能接受一个几何参数,如果确实需要多个要素一起查询,需要先使用 Geometry Service 的 Union操作,把多个要素合并为 Multi Part Polygon,然后再进行空间查询。

参考REST API 帮助文档
geometry
Description: The geometry to apply as the spatial filter. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. In addition to the JSON structures, for envelopes and points, you can specify the geometry with a simpler comma-separated syntax.

Syntax:

JSON structures: geometryType=<geometryType>&geometry={geometry }
Envelope simple syntax: geometryType=esriGeometryEnvelope&geometry=<xmin>,<ymin>,<xmax>,<ymax>
Point simple syntax: geometryType=esriGeometryPoint&geometry=<x>,<y>
Examples:

geometryType=esriGeometryEnvelope&geometry={xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}
geometryType=esriGeometryEnvelope&geometry=-104,35.6,-94.32,41
geometryType=esriGeometryPoint&geometry=-104,35.6

http://resources.arcgis.com/en ... 0000/

gisweis - GIS应用开发

赞同来自:

遍历不可以吗?

要回复问题请先登录注册