Bogue
Numéro d’ID de bogue | BUG-000178221 |
---|---|
Envoi | July 25, 2025 |
Dernière modification | September 4, 2025 |
S’applique à | ArcGIS API for Python |
Version trouvée | 2.4.1 |
Système d’exploitation | N/A |
Version du système d’exploitation | N/A |
Version de correction | 2.4.2 |
Statut | 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 de bogue: BUG-000178221
Logiciel:
Obtenir de l’aide auprès des experts ArcGIS
Télécharger l’application Esri Support