SQL Server 2008 Geospatial queries
-
03-07-2019 - |
Question
SQL Server 2008 has new geo data types. One thing I am wondering though is that if I have a table with geocoded addresses in it, can I write a query to display all records within a certain distance. For example, many websites have the option to search for items within a certain distance such as 50 miles and would like it if SQL 2008 provided this out of the box.
Solution
This is exactly the sort of query a spatial index is designed to support. This blog entry gives a quick introduction that includes this type of query.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow