Bogue
| Numéro d’ID de bogue | BUG-000151375 |
|---|---|
| Envoi | August 5, 2022 |
| Dernière modification | July 4, 2026 |
| S’applique à | ArcGIS Pro |
| Version trouvée | 2.9 |
| Système d’exploitation | Windows OS |
| Version du système d’exploitation | N/A |
| Statut | Under Consideration |
Use pt.M = "nan" instead of None and ensure the geometry is M-enabled when recreating it.
def dropMValues(fc):
spatial_reference = arcpy.Describe(fc).spatialReference
with arcpy.da.UpdateCursor(fc, "SHAPE@") as rows:
for row in rows:
geom = row[0]
parts = arcpy.Array()
for part in geom:
points = arcpy.Array()
for point in part:
point.M = "nan" # math.nan and float("nan") will also work
points.append(point)
parts.append(points)
row[0] = arcpy.Polyline(parts, spatial_reference, has_m=True)
rows.updateRow(row)
ID de bogue: BUG-000151375
Logiciel:
Obtenir de l’aide auprès des experts ArcGIS
Télécharger l’application Esri Support