[postgis-users] POINT Z geometry transformation issue

Felix Kunde felix-kunde at gmx.de
Fri May 25 06:25:07 PDT 2018

It's not a bug. I think, it's because you're changing the datum. EPSG 3795 (https://epsg.io/3795) uses the Clarke Spheroid, EPSG 3912 (https://epsg.io/3912) uses Bessel. Different height triangulation. In case, you want to keep the Z value, you need to cache it to replace the tranformed value. Btw. Cuba CRS -> Slovenvia CRS ?!!

Von: "Klemen Špruk" <spruk.klemen at gmail.com>
An: postgis-users at lists.osgeo.org
Betreff: [postgis-users] POINT Z geometry transformation issue

I have a issue with Z coordinate value when transforming coordinates:
Simlple test on postgresql-postgis server:
with data as (
select st_setsrid(st_makepoint(466180.66, 110950.00, 500), 3912) as point)
select st_astext(data.point) as ok,
st_astext(st_transform(data.point, 3795)) as not_ok from data;
When transforming point to other SRID Z value is corrupted.
Query result:

DB server info: PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" RASTER
Does anyone have any idea why Z value is corrupted or I am I doing something wrong or this is a bug?
Thank Klemen!_______________________________________________ postgis-users mailing list postgis-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users

More information about the postgis-users mailing list