[Proj] Height and ellipse conversions

Frank Warmerdam warmerdam at pobox.com
Tue Jun 11 18:33:03 EST 2013

On Tue, Jun 11, 2013 at 2:37 AM, Ben Caradoc-Davies <
Ben.Caradoc-Davies at csiro.au> wrote:

> Are height adjustments expected when converting between ellipses?
> I am trying to understand some unexpected behaviour I found in OGR (via
> the Python bindings) while validating the correctness of 3D conversions
> between ellipses. In the original form I was using OGC WKT definitions,
> but I have boiled the behaviour down to a simple Proj.4 example. I am
> using proj 4.7.0 (proj-bin 4.7.0-2 amd64 debian/sid).
> The example:
> WGS84 has an ellipsoid with semimajor axis of 6378137 m.
> WGS66 has an ellipsoid with semimajor axis of 6378145 m.
> So, let's take a point on the WGS84 ellipsoid at the intersection of the
> meridian and the equator, (6378137, 0, 0) in geocentric X, Y, Z metres.
> This point should be 8 m *below* the WGS66 ellipsoid, so I expect that
> if I convert it to WGS66 longlat, the height should be -8.0 metres
> exactly, by definition.
> $ echo "6378137 0 0" | cs2cs +proj=geocent +ellps=WGS84 +no_defs +to
> +proj=longlat +ellps=WGS66 +no_defs
> 0dE     0dN 0.000
> What? That can't be right. This height should be -8.000 in WGS66.


In a somewhat recent version of PROJ.4 the behavior was changed so that if
no proper datum information is given, no attempt is made to convert between
datums based on bare ellipsoid information.  So in the cases given, there
is no attempt made to translate between the ellipses.

The behavior used to be different but it seemed to lead to many unexpected
results when people did not provide datum shift info and it was decided
those results were doing more harm than good.

Of course it is still a bit invisible to the user whether datum shifting is
being applied or not which is unfortunate.

Contrast what you see with:

echo "6378137 0 0" | cs2cs +proj=geocent +datum=WGS84 +no_defs +to
+proj=longlat +ellps=WGS66 +towgs84=0,0,0 +no_defs
0dE 0dN -8.000

In this case the eight meter change in height is entirely done based on the
ellipsoid difference but it is only applied because we have provided
information declaring datum relationship of the two datums (the first as
WGS84, and the second as "equivelent to WGS84").

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20130611/5fca81ba/attachment.htm 

More information about the Proj mailing list