Calulate geometry results in ArcMap vs. ArcGIS Pro

337
1
10-22-2018 12:38 PM
JimFritz
Occasional Contributor

When attempting to calculate geometry for X coord and Y coord in ArcMap and then in ArcGIS Pro the results for the X coord are different, (Y coord results are the same).  See the attached jpegs with results.  Both were calculated in interactive sessions.  I believe the results from ArcMap are correct after comparing to surveyed values.  The end result are calculations from geographic coordinates to UTM Zone 15N, NAD83, feet.  So, I'm hoping to run a python script that will loop thru 1,455 layers and get the "right" results.  I have tried running a script in ArcGIS Pro but get erroneous X coord results.  When running the same script in ArcMap (below) the error message shows up.  Any help would be appreciated!

arcgispro resultsarcmap results

>>> import arcpy
>>> arcpy.env.overwriteOutput = 1
>>> outrastertopoint = r"S:/General-Offices-GO-Trans/SLR-Mapping/GIS_Projects_2018/Smart_T_Line_Model/geodata/RASTERTOPOINT_TEST2.gdb/"
>>> arcpy.env.workspace = outrastertopoint
>>> featureClassList = arcpy.ListFeatureClasses()
>>> for featureClass in featureClassList:
...     arcpy.management.CalculateGeometryAttributes(featureClass, "X_coord POINT_X;Y_coord POINT_Y", None, None, "PROJCS['NAD 1983 UTM Zone 15N_1',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-93.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Feet',0.3048]]")
...     
Runtime error 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'NoneType' object is not iterable
>>> 
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

the error message means that listfeatureclasses returns None, so you can't cycle through it.

The reason?  I suspect that the "/" after *.gdb is the culprit... remove it.

As for your Longitude/Latitude (poorly named columns, how about EastingFT, NorthingsFT) something is wrong,  check manually