Possible Duplicate:
Easting northing to latitude longitude
I have many Northing/Easting data in a database (for example: n 15217, e 88911) and I need convert it to Lat/long with T-SQL.
How I can do it?
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.
There is an Open Source dll library here (geocoordconversion) that can convert eastings/northings to lat/lon. So you could knock something up to use that for the raw conversion.
Alternatively, what might be useful, I have a project on GitHub that uses this DLL to import the full Ordnance Survey postcode dataset into SQL Server, converting the eastings/northings to lat/lon as it goes. This is available as a command-line executable. If this aligns well with what you’re wanting, then you might be able to use that. Or at least, there is code to highlight how to use the DLL to perform the conversion.
Update
From my project, .NET snippet using the dll to convert to lat/lon: