0

Is there a way to according to the data's spatial reference to get the unit of data, for example: wgs1984 → Decimal degrees, UTM54 → Meters.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Jul 8, 2016 at 4:39
1
  • I just found SpatialReference object have a linearUnitName property, The unit of data can get through it. Commented Jul 8, 2016 at 4:44

1 Answer 1

3

I found the projected coordinate system has linearUnitName property, and angularUnitName property is empty, and for the geographic coordinate system is just the opposite. so can get unit by follow codes.

sr = arcpy.Describe(fc).SpatialReference
unit = sr.linearUnitName
if unit == '':
 unit = sr.angularUnitName
answered Jul 8, 2016 at 5:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.