laptop and a wrench

Bogue

In Python, for Z enabled data, the Z property value will be returned or printed as none when using the centroid property to expose the point object.

Dernière publication: August 25, 2014 ArcGIS for Desktop
Numéro d’ID de bogue NIM073134
EnvoiSeptember 26, 2011
Dernière modificationJune 5, 2024
S’applique àArcGIS for Desktop
Version trouvée10.0
Système d’exploitationWindows OS
Version du système d’exploitationXP
Version de correction10.1
StatutFixed

Solution de contournement

Use the getPart method instead, such as used in this sample script:import arcpyimport sysother = r"<a href="file://Data/Incidents/September/PythonGetPoint/Data_Script_IncNo965768/Testing.gdb/XYZ" target="_blank">\\Data\Incidents\September\PythonGetPoint\Data_Script_IncNo965768\Testing.gdb\XYZ</a>"desc_rwyends = arcpy.Describe(other)ends_sc = arcpy.SearchCursor(other)for eachend in ends_sc: epnt = eachend.Shape getpnt = epnt.getPart() epntX = getpnt.X epntY = getpnt.Y epntZ = getpnt.Z Zman = desc_rwyends.hasZ print str(epntX) + ", " + str(epntY) + ", " + str(epntZ)+ ", " + str(Zman)del eachenddel ends_sc

Étapes pour reproduire

ID de bogue: NIM073134

Logiciel:

  • ArcGIS for Desktop

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement