本文簡要介紹 python 語言中 arcgis.geometry.offset
的用法。
用法:
arcgis.geometry.offset(geometries, offset_distance, offset_unit, offset_how='esriGeometryOffsetRounded', bevel_ratio=10, simplify_result=False, spatial_ref=None, gis=None, future=False)
返回:
Geometry
對象的列表,或GeometryJob
對象。如果future = True
,則結果是Future
對象。調用result()
獲取響應。
offset
函數在Geometry
服務資源上執行。該函數構造與給定輸入幾何圖形偏移的幾何圖形。如果偏移參數為正,則構造的偏移將位於幾何體的右側。左側偏移是用負參數構造的。注意:
從第一個頂點到最後一個頂點跟蹤幾何圖形將為您提供沿幾何圖形的方向。正向和負向參數將決定偏移的構造位置,正是該方向的左右視角。在這些術語中,很容易推斷將在何處構造水平幾何形狀的偏移量。
Keys
Description
geometries
Point
、MultiPoint
、Polyline
或Polygon
對象的數組。數組中每個幾何圖形的結構與ArcGIS REST API 返回的 JSON 幾何對象的結構相同。offset_distance
指定基於輸入幾何構造偏移的距離。
注意:如果
offset_distance
參數為正,則構造的偏移量將位於曲線的右側。 Left-side 偏移量是用負值構造的。offset_unit
偏移距離的單位。如果未指定單位,則單位派生自
spatial_ref
。offset_how
offset_how
參數確定如何處理段之間的外角。三個選項如下:esriGeometryOffsetRounded
- Rounds the corner between extended offsets.esriGeometryOffsetBevelled
- Squares off the corner after a given ratio distance.
3.
esriGeometryOffsetMitered
- Attempts to allow extended offsets to naturally intersect, but if that intersection occurs too far from the corner, the corner is eventually bevelled off at a fixed distance.bevel_ratio
bevel_ratio
乘以offset_distance
,結果確定斜接偏移交叉點在斜切之前可以定位多遠。指定斜接時,bevel_ratio 將被忽略,內部使用 10。指定斜角時,如果未指定bevel_ratio,將使用1.1。bevel_ratio
對於舍入偏移被忽略。simplify_result
如果
simplify_result
設置為 true,則自相交循環將從結果偏移幾何圖形中刪除。默認值為假。spatial_ref
輸入幾何圖形的
SpatialReference
眾所周知的 ID 或 JSON 對象future
可選布爾值。如果為 True,則將返回 future 對象,並且進程不會等待任務完成。默認為False,表示等待結果。如果將 future 設置為 True,則一次調用中可以處理的幾何圖形數量限製為 6500 個。
>>> new_job = offset( geometries = [geom1,geom2,...], offset_distance = 100, offset_unit = "esriMeters", offset_how = "esriGeometryOffsetRounded", bevel_ratio = 0, simplify_result = True spatial_ref = "wkid", future = True)
相關用法
- Python ArcGIS overlay_data用法及代碼示例
- Python ArcGIS overlay_layers用法及代碼示例
- 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.geometry.offset。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。