[postgis-users] 3D Datum shifts from postgis

Paul Ramsey pramsey at refractions.net
Mon Oct 23 12:25:59 PDT 2006


Well, I am pretty sure PostGIS only does transform() in 2d, no matter what. But 
I also suspect that Proj4 only has a 2d internal model, which means at the 
library level nothing may be available either.

Frank, can you confirm what proj4 provides in terms of 3d shifts?

Quoting Nathaniel <naptrel at yahoo.co.uk>:

> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>