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



As already discussed, differences of the order of hundreds of meters can exist between the coordinates of locations when expressed in different datums. Mathematically this can be represented by a translation of the origin of the coordinate system when converting between one reference ellipsoid and another. Of course the shape and size of the ellipse also varies between datums. To map between two datums, a complex mathematical transformation called “Molodensky Datum Transform” is used. The implementation in XP_GIS is based upon the Java implementation provided by Chuck Taylor at This Java implementation is itself based by Peter H. Dana’s description at The actual implementation of the Molodensky algorithm is implemented in the helper function called “DatumTransform”. Because the algorithm is based on transforming to the WGS84 datum, the code first transforms to this datum (if it is not already WGS8) and then converts from WGS84 to the final datum.

This XP takes 8 parameters. The first parameter is the latitude in decimal degrees in the datum to transform from (where west is considered negative). The second parameter is the latitude in decimal degrees in the datum to transform from. The third parameter is the height in metres in the datum to transform from. The fourth and fifth specify the datum to transform from and the datum to transform to. These values correspond to the indexes as passed to XP_GIS_DATUMINFO. Upon return, the final three parameters contain the longitude, latitude and height of the transformed coordinates. These are in the same units as the corresponding input parameters.

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