漏洞
漏洞 ID 编号 | BUG-000178221 |
---|---|
已提交 | July 25, 2025 |
上次修改时间 | September 4, 2025 |
适用范围 | ArcGIS API for Python |
找到的版本 | 2.4.1 |
操作系统 | N/A |
操作系统版本 | N/A |
修正版本 | 2.4.2 |
状态 | Fixed |
Use the LengthUnits class to do this:
from arcgis.geometry import Polyline
from arcgis.geometry import lengths, LengthUnits
simple_polyline = Polyline({
"paths": [[[-95.5, 30.2], [-95.6, 30.3]]],
"spatialReference": {"wkid": 4326}
})
print(type(simple_polyline))
print(simple_polyline)
usFeet_simple = lengths(
spatial_ref={"wkid": 4326},
polylines=[simple_polyline],
length_unit=LengthUnits.FOOT,
calculation_type='geodesic',
gis=gis
)
print("Length in US feet (simple):", usFeet_simple)
漏洞 ID: BUG-000178221
软件:
获取来自 ArcGIS 专家的帮助
下载 Esri 支持应用程序