5

I need to get the name of the coordinate system of a geometry type field in SQL Server 2008 R2 (for example NAD_1983_UTM_Zone_14N or GCS_WGS_1984 or other). Is this possible?

3
  • Do you store your data in an Esri geodatabase or it is a pure SQL Server database? – Alex Tereshenkov Apr 15 '14 at 15:06
  • It's pure SQL Server. – Dr. Greenthumb Apr 15 '14 at 15:11
  • 1
    sys.spatial_reference_systems. But mine only has GCS in it. I don't think SQL Server cares about planar systems. – Jay Cummins Apr 15 '14 at 15:28
4

In 2008, I usually do

select SHAPE.STSrid from dbo.STATES

(where SHAPE is the geometry column and dbo.states is the table name). It will give you SRID.

Now you can run

select * from sys.spatial_reference_systems where spatial_reference_id = 4326

However, as @Jay Cummins mentioned, it seems to have only geographic coordinate systems. Link to the Microsoft forum: Projected Coordinate System Support

If you would have an Esri geodatabase, you could see the projected coordinate system SRID and the name with definition from ST_SPATIAL_REFERENCE_SYSTEMS which is created when creating a geodatabase repository.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.