I have heard that SQL Server now supports Geography like things. Is it possible to get City from Longitude/Latitude? I have search a lot but could not find any?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to load some data with city locations – Geonames(you might want
cities15000.zip) or Natural Earth(Populated places) might be good places to start.(Longitude Latitude)Then to find the closest city to a given location you want a query like:
More examples in the SQL Server docs: