Select to view content in your preferred language

Spatial Reference short description

570
2
Jump to solution
08-15-2022 12:44 AM
Andrew_Needham
Emerging Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

 

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'

 

View solution in original post

0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor

 

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'

 

0 Kudos
Andrew_Needham
Emerging Contributor

Thanks RhettZufelt that worked 

0 Kudos