Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

what is the function for getting SRID from Geometry field. I have inserted a shapefile into SQLServer table with Geometry field defined. I know the projection of shapefile is Swreff99_1800 (EPSG:3011). Now my question is How I get this SRID 3011 by using some OGC method of geometry field?

share|improve this question
I'm not clear as to what you are needing. Do you need the definition of the SRID 3011 from SQL Server? It sounds like you have already inserted the data with the proper SRID set, yes? –  Chad Cooper Feb 7 '12 at 12:54

1 Answer 1

up vote 8 down vote accepted

Is this what you are looking for?

select distinct SP_GEOMETRY.STSrid from dbo.MYTABLE

This will give you a table with the different SRID's used in the table dbo.MYTABLE

share|improve this answer
Thanks!. My second question is SRID 3011 is not defined in sys.spatial_reference_systems table. And i need to transform the geometry from SRID 3011 to SRID 4326. What I do then ? –  user1899 Feb 7 '12 at 13:41
As far as I know, SQL Server 2008 is not able to transform your geometry data bewteen different coordinate systems - it sees all geometry data as stored in a mathematical coordinate system. –  Peter Horsbøll Møller Mar 19 '12 at 20:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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