Hi..
How to fetch EPSG code of a shapefile in arcgis using python.....Thanks in advance
Solved! Go to Solution.
I used a slight variant of the above approach
import arcpy
descObj = arcpy.Describe("myLayer")
SRef = descObj.spatialReference
print SRef.factoryCode
Hello,
here the code for GCS
import arcpy
desc = arcpy.Describe(r"C:\DemoData\PYTH_10_2\Sharing_scripts\World\Cities.shp")
code = desc.spatialReference.GCSCode
for PCS take the property desc.spatialReference.PCSCode
Let's have a look here too:
ArcGIS Help (10.2, 10.2.1, and 10.2.2)
Kind regards,
Thomas
I used a slight variant of the above approach
import arcpy
descObj = arcpy.Describe("myLayer")
SRef = descObj.spatialReference
print SRef.factoryCode
perfect... thats better
Thanks for all...