本文简要介绍 python 语言中 arcgis.geometry.filters.intersects
的用法。
用法:
arcgis.geometry.filters.intersects(geometry, sr=None)
返回:
一个字典
intersects
方法过滤几何与指定的Geometry
对象相交的结果。Keys
Description
geometry
任何类型的单个
Geometry
。几何结构与ArcGIS REST API 返回的 JSON 几何对象的结构相同。不支持使用简单语法。spatial_ref
输入几何图形的
SpatialReference
众所周知的 ID 或 JSON 对象例子:
# USAGE EXAMPLE: Select the gas lines that intersect a specific freeway feature, United States Interstate 15. from arcgis.geometry import Geometry from arcgis.geometry.filters import intersects # get a feature layer item from the gis >>> flyr_item = gis.content.search("Freeways*", "Feature Layer")[0] >>> freeway_lyr = flyr_item.layers[0] # assign a variable to the spatial reference >>> freeway_sr = freeway_lyr.properties.extent["spatialReference"] # select a filter feature to construct its geometry >>> rte15_fset = freeway_lyr.query(where="ROUTE_NUM = 'I15'") >>> rte15_geom_dict = rte15_fset.features[0].geometry >>> rte15_geom_dict['spatialReference'] = freeway_sr >>> rte15_geom = Geometry(rte15_geom_dict) # construct a geometry filter using the filter geometry >>> flyr_filter = intersects(rte15_geom, sr=freeway_sr) # query a feature layer for features that meet filter criteria >>> gas_lines_I15 = gas_line_lyr.query(geometry_filter=flyr_filter)
相关用法
- Python ArcGIS interpolate_points用法及代码示例
- Python ArcGIS interpolate_raster_by_dimension用法及代码示例
- Python ArcGIS is_null用法及代码示例
- Python ArcGIS power用法及代码示例
- Python ArcGIS APIKeyManager.get用法及代码示例
- Python ArcGIS KnowledgeGraph.named_object_type_delete用法及代码示例
- Python ArcGIS ContentManager.unshare_items用法及代码示例
- Python ArcGIS ImageryLayer.thumbnail用法及代码示例
- Python ArcGIS FormFieldElement用法及代码示例
- Python ArcGIS Geometry.true_centroid用法及代码示例
- Python ArcGIS Site.delete用法及代码示例
- Python ArcGIS GeoAccessor.bbox用法及代码示例
- Python arcgis.apps.hub.Initiative.update用法及代码示例
- Python ArcGIS generate_service_areas用法及代码示例
- Python ArcGIS build_overview用法及代码示例
- Python ArcGIS RunInterval用法及代码示例
- Python ArcGIS describe_dataset用法及代码示例
- Python ArcGIS acos用法及代码示例
- Python ArcGIS Item.publish用法及代码示例
- Python ArcGIS MapImageLayer.find用法及代码示例
- Python ArcGIS Group.get_members用法及代码示例
- Python ArcGIS Geometry.last_point用法及代码示例
- Python ArcGIS Worker用法及代码示例
- Python ArcGIS ContentManager.delete_folder用法及代码示例
- Python ArcGIS train_classifier用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.geometry.filters.intersects。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。