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.
-
I just found SpatialReference object have a linearUnitName property, The unit of data can get through it.T J– T J2016年07月08日 04:44:04 +00:00Commented Jul 8, 2016 at 4:44
1 Answer 1
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
lang-py