Call now: (800) 766-1884  


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA

 SQL Server Scripts
 Scripts Menu





SQL Server

SQL Server Tips by Gama and Naughter Consulting



To convert from a coordinate expressed as a longitude and latitude pair to a UTM Northing, Easting and Zone identifier, XP_GIS_LL2UTM is provided. The actual implementation is provided in the helper function “LLtoUTM” which is based on the implementation provided by Chuck Gantz, which was posted to the sci.geo.geology newsgroup and is available at The equations used in the function are themselves based on USGS Bulletin 1532. A UTM coordinate consists of an X coordinate called an “Easting” and a Y coordinate called a “Northing”. In addition the zone in which these coordinates are specified needs to be specified to uniquely identity a position on the Earth.

There are a couple of special cases related to UTM zones, which the code must also handle. The 32V UTM zone over southwest Norway is extended westwards squeezing the 31V zone to the left. This means that the 32V zone is nine degrees wide in longitude while the 31V zone immediately to the left is just three degrees in width instead of the normal six degrees. The second special case corresponds to the zones, which cover the Svalbard archipelago north of Norway where zones 32X, 34X and 36X have been removed altogether and zones 31X, 33X, 35X and 37X have been widened to fill the gaps.

This XP takes five parameters. The first parameter is the latitude, the second parameter is the longitude, and the third parameter is the datum to use. The final three parameters are the output parameters and contain the UTM Northing, Easting and UTM Zone.

The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter





Burleson Consulting Remote DB Administration







Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.

Burleson Consulting
SQL Server database support


Copyright © 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter