本文簡要介紹 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。