Please can someone post a SQL function to convert easting/northing to longitude/latitude. I know it\'s incredibly complicated but I haven\'t found anyone who has documented it i
I have developed a library in .NET to be called from transact sql Converts WGS84/UTM coordinates to Latitude and Longitude
It does just the opposite, but as it uses CoordinateSharp you can download the code and change it easily to convert from lat/long to wgs84 instead.
You can download it from github:
https://github.com/j-v-garcia/UTM2LATITUDE
usage:
SELECT dbo.UTM2LATITUDE(723399.51,4373328.5,'S',30) AS Latitude, dbo.UTM2LONGITUDE(723399.51,4373328.5,'S',30) AS Longitude
result:
39,4805657453054 -0,402592727245112
pos UTM X
pos UTM Y
Latitude band grid zone designation letter (see http://www.dmap.co.uk/utmworld.htm)
Longitude band grid zone designation number (see http://www.dmap.co.uk/utmworld.htm)