[postgis-users] 3D Datum shifts from postgis

Nathaniel naptrel at yahoo.co.uk
Mon Oct 23 05:44:44 PDT 2006


Is it possible to do a full 3D datum shift using Proj4
through PostGIS? In particular, is it possible to
transform a height from being wrt one ellipsoidal
surface to being wrt another?

I'm predominantly using 7 parameter shifts with
Proj4's +towgs84 flag. This shift translates the input
geographical coords (lon,lat,ellipsoidal height) to
ECEFs (geocentric cartesians), then performs the shift
itself on the cartesians, and translates back to the
new ellipsoid giving lon, lat and a new ellipsoidal
height. Longs and Lats are behaving as expected, but
my height ain't changing!

I believe I have my geometry column set up correctly
(to 4D--the "M" coord is used for a timestamp).

For example, a single test point in WGS84, transformed
to Dutch/Amersfoort datum.


prompt> SELECT AsEWKT(geom) AS before_transform FROM
features WHERE id=1;

                      before_transform                
      
-------------------------------------------------------------
 SRID=4326;POINT(3.49472222222 51.33161111111 52
1151688332)


prompt>SELECT AsEWKT(Transform(geom,4289)) AS
after_transform FROM features WHERE id=1;

                         after_transform              
          
-----------------------------------------------------------------
 SRID=4289;POINT(3.4948872454317 51.3324980349789 52
1151688332)

Lat/Lon look fine, height (52m) goes nowhere. I know
that using ellipsoidal heights is a poor approximation
to true geoidal heights, but for a majority of my
needs, the improvement (albeit inconsistent) over
being stuck with WGS84 ellipsoidal heights will be a
great benefit.

Send instant messages to your online friends http://uk.messenger.yahoo.com 



More information about the postgis-users mailing list