Geodetic Transformations

Set of tools for transformation used in geodesy, especially when using GNSS or mapping
Updated 3 May 2021

View License

A set of functions to calculate coordinate transformations between different reference ellipsoids and different projections, including tools on:
- transformation from cartesian to geographic coordinates and back
- transformation from geographic coordinates to transverse mercator mapping or lambert conformal conical mapping and back
- transformation from geographic to UTM and back which can handle irregular zones and pole mapping
- 3D/2D/1D similarity transformation (Helmert transformation)
- determination of the parameters of a 3D/2D/1D-Helmert transformation
- applying residual corrections after performing a helmert transformation
- reading and using NTv2 transformation parameters
- 3D transformation between ITRS and ETRS frames
- 3D/2D affine transformation and its parameter determination
- 3D/2D to 2D projective transformation and its parameter determination
- Molodensky transformation
Some projections and ellipsoids are already defined in mat-Files.
This functions are often used in geodesy when transforming between different coordinate systems, e.g. UTM to GK or GPS-data (WGS84) to UTM.
Although some might be incorporated in the mapping toolbox, at least I don't have that...
An example document with background information is added.
A great acknowledgement to Andrea Pinna of the University of Cagliari who improved the helmert parameter estimation functions in speed and memory usage!
Please notify me of any bugs you may encounter.

Cite As

Peter Wasmeier (2024). Geodetic Transformations (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Due to changes in the actual Matlab version, Trafo_ITRF threw an error. This has been fixed.

In itrstrafo function, ITRF2014 was added as well as transformations frim IGS2008 to NAD83.

There was a bug when one tried to enter parameters from the pre-defined parameter list (not the number of parameters was chekced, but the number of chjaracters of the parameter name).
This has been corrected.

I corrected a minor typo in helmert3d function and added a short comment in the manual regarding the usage of PROJ.4 transformation parameters.

On 2016-Jan-21st ITRF2014 transformation parameter set was released. It has been added to Trafo_ITRF parameter set and the corresponding itrstrafo function has undergone some changes.

I was asked for a TM projection with latitude origin not being the equator (Luxembourgian LUREF).
My functions didn't handle that before, but now they do.
Just changed some minor things in the examples document
Just changed some minor things in the examples document

Two bugs were found in helmert3D's parameter adjustment.
Until the update, calculation took too many iteration steps and finally lead to resulats with errors ~ 1e-14.
Thanks to Stefan Pegritz for the bug report!

A mistyping was found in Helmert affine 3D transformation which is corerected now.

Small Bug in helmert3d due to the latest chenges "x0 is not found" .

Andrea Pinna of the University of Cagliari sent me improvements of the helmert- and helmertaffine-functions which allowed to save a lot of memory and time. I am glad he offered me to update my toolbox with his improvements. Thanks!

Fixed some minor warning issues.

Minor changes in the background document

Molodensky transformation added due to a user request. Minor bug in deg2dms fixed. In Matlab 2013b, helmert adjustments with worse normal equation matrices diverged while they converged in earlier versions. I changed that functions to overcome that.

There were two small bugs in helmertprojective3d.m which threw errors.

In itrstrafo.m there was a mistyping of two variable names which have been corrected. Additionally, a set of transformation parameters from IGS2005 to IGS2008 has been added in Trafo_ITRF.mat

A missing default was fixed in cart2ell.m
Thanks to Johannes Schönberger to notice me.

Update the coding error in d2affinetrafo.m Michael Schmitt mentioned on June 18th, 2012. Thanks, Michael!

Some minor changes in the existing functions were made. Additional transformation types have been added.

The existing files of the Geodetic toolbox hove been completely revised and many additional functionality has been added.

A left-out transpose-command rose an error in trafo3d with only two input parameters. Thanks to Jon Preston for noticing me.

There was some confusion with the additional file helmert3d which did not transform right-handed coordinate systems but left-handed, so the parameter sets did not fit in trafo3d.
this has been fixed now.

I was asked to add a function which allows to calculate the transformation parameter set for cartesian datum transformation from two coordinate lists in both systems.

I was notified of a weak coded while condition which might cause the loop not to terminate although the criteria is already fulfilled. I changed that - results stay unchanged in any case.