This project has moved and is read-only. For the latest updates, please go here.

WGS84 UTM to Lat/Lon

Feb 8, 2010 at 4:01 PM

I have a database off of raw data from GPS dumps. They are all in the native WGS84 UTM format.

We have been doing hand conversion to Lon/Lat.

It would be a great help if we can craft a function using the SQL Spatial tools to convert these WGS84 data to Lon/Lat so it can be easily exported to be used in google earth.

Can any one offer some sample for this?


Feb 9, 2010 at 8:33 AM
Edited Feb 9, 2010 at 8:33 AM

You need reverse Tranverse Mercator projection.
Take a look at Projection.cs and TranverseMercatorProjection.cs from the source.

Feb 9, 2010 at 3:49 PM

Thanks, I have looked though it and it was a bit difficult for me to follow. I was hoping for someone to be kind enough to help with a sample TSQL script, similar to the discussion:wgs84 lat/longs to web mercator projection. but rather from WGS84 to lon/lat.


Nov 10, 2010 at 5:48 PM

Hi there.

I would need also this conversion into lat/long. I have installed the "sql spatial tools" in my sql server 2008 but I cannot transfom these coordinates directly in the tables.

My database looks like this:

X                  Y         Zone       Latitude       Longitude

741852    963258      30              ????           ?????


I need to solve the "interrogations", so anyone knows how can I achieve it?

Best regards

Nov 12, 2010 at 4:21 PM

Coordinate transformation on ellipsoidal-based planar coordinates is beyond the scope of the SQL Server Spatial Tools project (the projection functions in this project are all based on a spherical Earth definition which is not suitable for this class of problem).  The specific case of WGS84 UTM coordinates falls into this category.  All is not lost, however.  First, you can use our coding examples on this site to implement your own function based on published algorithms.  This is a one-off approach and may not meet your needs.  Your other choice is to use a commercial product, such as Safe Software's Feature Manipulation Engine (FME) (  The full-featured version of this product can be expensive.  Safe has addressed the price issue by producing a targeted version of FME, the SQL Server Data Loader Edition (US $500, if I am not mistaken).  Using FME would reduce the problem to a traditional ETL-based approach though you can manipulate data that is already in a SQL Server spatial column, if so desired.