Hi..
How to fetch EPSG code of a shapefile in arcgis using python.....Thanks in advance
I used a slight variant of the above approach
import arcpy descObj = arcpy.Describe("myLayer") SRef = descObj.spatialReference print SRef.factoryCode
Thanks for all...
perfect... thats better
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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.