本文簡要介紹 python 語言中 arcgis.features.analysis.overlay_layers
的用法。
用法:
arcgis.features.analysis.overlay_layers(input_layer, overlay_layer, overlay_type='Intersect', snap_to_input=False, output_type='Input', tolerance=None, output_name=None, context=None, gis=None, estimate=False, future=False)
返回:
result_layer:如果指定了
output_name
,則為FeatureLayer
,否則為特征集合。
overlay_layers
方法將兩個或多個層合並為一個層。您可以將疊加視為查看一堆Map並創建一個包含在堆棧中找到的所有信息的單個Map。事實上,在 GIS 出現之前,製圖師會逐字地將Map複製到透明的醋酸纖維紙上,將這些紙覆蓋在燈台上,然後從覆蓋的數據中手繪一張新Map。疊加不僅僅是線條作品的合並;參與疊加的特征的所有屬性都將傳遞到最終產品。覆蓋用於回答地理中最基本的問題之一,“什麽在什麽之上?”例如:100 年洪泛區內有哪些地塊? (在上麵隻是另一種說法。)
哪些縣內有哪些道路?
在什麽土壤類型之上有什麽土地利用?
廢棄的軍事基地內有哪些井?
Parameter
Description
input_layer
必需的層。將被
overlay_layer
覆蓋的點、線或麵要素。請參閱特征輸入。overlay_layer
必需的層。將被
input_layer
函數覆蓋的函數。請參閱特征輸入。overlay_type
可選字符串。要執行的疊加類型。
選擇列表:['Intersect', 'Union', 'Erase']
Intersect
- 計算輸入層的幾何交集。在input_layer
和overlay_layer
層中重疊的特征或特征部分將被寫入輸出層。這是默認設置。Union
- 計算輸入層的幾何聯合。所有要素及其屬性都將寫入輸出層。僅當input_layer
和overlay_layer
都包含麵要素時,此選項才有效。Erase
- 僅將overlay_layer
中不在input_layer
層中的特征內的那些特征或特征部分寫入輸出。默認值為“相交”。
snap_to_input
可選的布爾值。一個布爾值,指示是否允許
input_layer
中的要素頂點移動。默認值為 false,表示如果要素之間的距離小於tolerance
值,則兩個圖層中的所有要素都可以移動以允許彼此捕捉。設置為 true 時,隻有overlay_layer
中的要素可以移動以捕捉到input_layer
要素。output_type
可選字符串。您要查找的交叉點類型。該參數僅在
overlay_type
為相交時有效。選擇列表:[‘Input’, ‘Line’, ‘Point’]
Input
- 返回的要素將與具有最低尺寸幾何的input_layer
或overlay_layer
具有相同的幾何類型。如果所有輸入都是多邊形,則輸出將包含多邊形。如果一個或多個輸入是線,並且沒有一個輸入是點,則輸出將為線。如果一個或多個輸入是點,則輸出將包含點。這是默認設置。Line
- 將返回線交點。僅當所有輸入都不是點時這才有效。Point
- 將返回點交點。如果輸入是線或麵,則輸出將為多點圖層。
tolerance
可選浮點數。分隔所有要素坐標的最小距離的浮點值,以及坐標可以在 X 或 Y(或兩者)中移動的距離。公差單位與
input_layer
的單位相同。output_name
可選字符串或
FeatureLayer
。現有要素圖層將導致新圖層附加到要素服務。如果 overwrite 在上下文中為 True,則新層將覆蓋現有層。如果未指示output_name,則創建新的FeatureCollection
。context
可選字典。處理範圍和輸出空間參考等附加設置。對於calculate_density,有三個設置。
extent
- 定義分析區域的邊界框。僅分析input_layer 中與邊界框相交的那些特征。outSR
- 輸出要素將投影到wkid
引用的輸出空間參考中。overwrite
- 如果為 True,則 output_name 中的要素層將被新要素層覆蓋。適用於 ArcGIS Online 或 Enterprise 10.9.1+# Example Usage context = {"extent": {"xmin": 3164569.408035, "ymin": -9187921.892449, "xmax": 3174104.927313, "ymax": -9175500.875353, "spatialReference":{"wkid":102100,"latestWkid":3857}}, "outSR": {"wkid": 3857}, "overwrite": True}
gis
可選,運行此工具的
GIS
。如果未指定,則使用活動 GIS。future
可選布爾值。如果為 True,則將返回 future 對象,並且進程不會等待任務完成。默認為False,表示等待結果。
如果
future = True
,則結果是Future
對象。調用result()
獲取響應。例子:
#USAGE EXAMPLE: To clip a buffer in the shape of Capitol hill neighborhood. cliped_buffer = overlay_layers(buffer, neighbourhood, output_name="Cliped buffer")
相關用法
- Python ArcGIS overlay_data用法及代碼示例
- Python ArcGIS offset用法及代碼示例
- Python ArcGIS optimal_region_connections用法及代碼示例
- Python ArcGIS optimal_path_as_line用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.features.analysis.overlay_layers。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。