views:

25

answers:

1

Let's suppose I have a street shapefile loaded on SQL Server 2008.

  • How can I implement a reverse geocode function (get an address from a lat/long pair)?
  • What SQL Spatial functions can I use for that?
  • Does it have a function that get the closest "feature" from a lat/long pair?
A: 

The example I saw indicated that you would write a custom CLR procedure to geocode. I assume it would be the same for reverse geocoding - pick a service, write the code and encapsulate in a SQL procedure.

Here is a method reference for the geography data type. http://msdn.microsoft.com/en-us/library/bb933802%28v=SQL.100%29.aspx

Sam