SQL Server 2008 Geography .STBuffer() distance measurement units

user358089 picture user358089 · Jun 4, 2010 · Viewed 10.1k times · Source

I'm working with a geographic point using lat/long and need to find other points in our database within a 5 mile radius of that point. However, I can't seem to find out what the "units" are for STBuffer, it doesn't seem to conform to feet, miles, meters, kilometers, etc. The documentation only refers to them as "units", any suggestions? Thanks

[...] from geography::STGeomFromText('POINT(x y)', 4326).STBuffer(z).STIntersects(geography::STGeomFromText('POINT(' + CAST(v.Longitude as varchar(max)) + ' ' + CAST(v.Latitude as varchar(max)) + ')', 4326)) = 1

Answer

Chris picture Chris · Jan 17, 2011

The unit of measurement depends on the spatial reference system in use. See this system view for details:

SELECT * FROM sys.spatial_reference_systems;