Bug
| Bug-ID-Nummer | BUG-000178221 |
|---|---|
| Eingereicht | July 25, 2025 |
| Zuletzt geändert | September 4, 2025 |
| Gilt für | ArcGIS API for Python |
| Gefunden in Version | 2.4.1 |
| Betriebssystem | N/A |
| Betriebssystemversion | N/A |
| Behoben in Version | 2.4.2 |
| Status | 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)
Bug-ID: BUG-000178221
Software:
Unterstützung durch ArcGIS-Experten anfordern
Esri Support App herunterladen