Select to view content in your preferred language

Retrieving Spatial reference of a layer

541
1
Jump to solution
01-07-2011 06:43 AM
abubadruddin
Deactivated User
I tried the following for retrieving spatial reference of a layer but can't make it work! Please help!!

>>> import arcpy
>>> fc = "C:/GIS222(Python)/Lab4/NYState.shp"
>>> sr = arcpy.Describe(fc).

In the 3rd line above nothing is showing up in auto completion after arcpy.Describe(fc).
I was expecting Spatial Reference after the period
Am I doing anything wrong?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus
try, where inFC is the path to disk of a featureclass,
desc = arcpy.Describe
SR = desc(inFC).spatialReference

View solution in original post

0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus
try, where inFC is the path to disk of a featureclass,
desc = arcpy.Describe
SR = desc(inFC).spatialReference
0 Kudos