[Proj] How grids work in PROJ4
Mikael Rittri
Mikael.Rittri at carmenta.com
Fri Jan 13 07:02:18 PST 2012
Frank, I believe your implementation is correct, although your
explanation of the signs is easy to misunderstand.
> At a point like -116,39 the egm96_15.gtx file has a
> value of approximate -21. At that location the geoid
> is around 21 meters above the ellipsoidal height.
I think you intended to say
"the geoid height is around 21 meters above the ellipsoidal height."
I would express it: "the geoid surface is around 21 meters _below_ the ellipsoid surface." But this means that the height value of something above
the geoid (orthometric height) is about 21 meters _larger_ than its height
above the ellipsoid. Which I think you, Michal and Joaquim agree with.
> So the value in the .gtx file is the amount (in meters) that should be
> added to the geoid to get to the ellipsoidal height.
Yes, but I would express it: ... that should be added to the orthometric
height to get height above ellipsoid.
The term "ellipsoidal height" almost always means "height of something above
the ellipsoid", so that's a harmless term.
But the term "geoid height" or "geoidal height" sometimes means "height of geoid surface above ellipsoid surface", and sometimes means "height of something above the geoid".
So "geoid undulation" is a more unambiguous term for the first meaning,
and "orthometric height" is a more unambiguous term for the second meaning.
So in summary, I think everyone is (almost) right!
Best regards,
Mikael Rittri
Carmenta AB
Sweden
http://www.carmenta.com
-----Original Message-----
From: proj-bounces at lists.maptools.org [mailto:proj-bounces at lists.maptools.org] On Behalf Of Frank Warmerdam
Sent: Thursday, January 12, 2012 1:48 AM
To: michal.seidl at gmail.com; PROJ.4 and general Projections Discussions
Subject: Re: [Proj] How grids work in PROJ4
On Wed, Jan 11, 2012 at 3:15 PM, Michal Seidl <michal.seidl at gmail.com> wrote:
>>> b) if there is +geoidgrids on the LEFT SIDE PROJ thinks there is orthometric
>>> height on input so firstly it changes H by dh from grid to get ellipsoid
>>> height before 3D transformation
>>
>> Right
>>
>
> It seems to me as cs2cs (trunk version) works exactly in an opposite
> (unreasonable?) manner. If there is +geoidgrids on the LEFT side I would
> suppose cs2cs SUBTRACTs geoid heigth above ellipsoid from GTX file but
> cs2cs ADDs it.
Michal,
I have checked. At a point like -116,39 the egm96_15.gtx file has a
value of approximate -21. At that location the geoid is around 21
meters above the ellipsoidal height. So the value in the .gtx file is
the amount (in meters) that should be added to the geoid to get to
the ellipsoidal height.
When the geoidgrid is on the left side (the source coordinate system)
the input height is assumed to be geoidal and the amount in the
gtx is added to get to ellipsoidal height. When the right side
(destination coordinate system) has a geoidgrids setting the value
read from the gtx is subtracted from the elevation to get back to
geoidal height.
> As I know it is usual there is positive value in geoid data set in case
> geoid is above ellipsoid.
Your statement does not match with my findings. I expect the opposite.
I will note I am using the same convention (positive vs. negative) as
I encountered with the .gtx files distributed with the VDatum program.
>Also egm96_15.gtx is done like this. Should it
> be inverted in case of proj library?
>
> Example:
>
> PROJ_LIB=nad PROJ_DEBUG=ON src/cs2cs +proj=latlong +ellps=WGS84
> +towgs84=0,0,0 +geoidgrids=egm96_15.gtx +to +proj=latlong +ellps=WGS84
> +towgs84=0,0,0
>
> 15d 50d 0
> 15dE 50dN 44.690
>
> PROJ_LIB=nad PROJ_DEBUG=ON src/cs2cs +proj=latlong +ellps=WGS84
> +towgs84=0,0,0 +to +geoidgrids=egm96_15.gtx +proj=latlong +ellps=WGS84
> +towgs84=0,0,0
> 15d 50d 0
> 15dE 50dN -44.690
I checked in the area of 15E, 50N and the .gtx value was approximately
+45 in the .gtx file.
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
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
More information about the Proj
mailing list