When using Model Builder is there a way to get the short description of the Spatial Reference? I'm trying to add this to an attribute.
For example when using the tool "Create Spatial Reference" the string output is:
PROJCS['GDA_1994_MGA_Zone_56',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMET ....
But is is shown as:
GDA_1994_MGA_Zone_56
when hovering over it, which is is what I am after as this is more readable.
Any thoughts on how to achieve this?
Solved! Go to Solution.
Not sure about model builder, but can extract that from the string output:
stringout = """PROJCS['GDA_1994_MGA_Zone_56',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMET"""
stringout.split("'")[1]
'GDA_1994_MGA_Zone_56'
Not sure about model builder, but can extract that from the string output:
stringout = """PROJCS['GDA_1994_MGA_Zone_56',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMET"""
stringout.split("'")[1]
'GDA_1994_MGA_Zone_56'