[postgis-users] ST_Transform Z heights between ODN and WSG

Wouter Scherphof wouter.scherphof at merkator.com
Tue Jan 31 06:22:18 PST 2023

I had postgresql10-postgis2.5 running.
It didn't have 4979, so I inserted it.
-- ERROR: GetProj4StringSPI: Cannot find SRID (4979) in spatial_ref_sys
-- https://epsg.io/4979
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 4979, 'EPSG', 4979, '+proj=longlat +datum=WGS84 +no_defs +type=crs', 'None');
SELECT ST_Transform('SRID=7405;POINT(545068 258591 8.51)'::geometry, 4979);
That rendered me:
st_transform                                                   |
POINT Z(0.1215563454880247 52.20645574758174 55.02789907436818)|

Met vriendelijke groet,
Wouter Scherphof

Van: postgis-users <postgis-users-bounces at lists.osgeo.org> Namens James Howe
Verzonden: dinsdag 31 januari 2023 12:16
Aan: postgis-users at lists.osgeo.org
Onderwerp: [postgis-users] ST_Transform Z heights between ODN and WSG

U ontvangt niet vaak e-mail van jmh205 at cam.ac.uk<mailto:jmh205 at cam.ac.uk>. Meer informatie over waarom dit belangrijk is<https://aka.ms/LearnAboutSenderIdentification>
I have elevation data in SRID 7405 (Ordinance Survey Great Britain 1936 with Ordinance Datum Newlyn) and I want to convert it to SRID 4979 (World Geodetic System 1984 ensemble).

Both SRs have three axes defined in their spatial_ref_sys entries.

However, ST_Transform doesn't change the Z coordinate.

SELECT ST_Transform('SRID=7405;POINT(545068 258591 8.51)'::geometry, 4979);
-> POINT(0.121585415593599 52.206415868084655 8.51)

Am I missing something?
Also asked on SE: https://gis.stackexchange.com/q/447648/183667

Tried with postgres12-postgis3.0 and postgres14-postgis3.2.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20230131/cc3a9b90/attachment.htm>

More information about the postgis-users mailing list