<div dir="ltr"><div dir="ltr"><div>Dear Florian,</div><div>thanks for your answer.</div><div><br></div><div>I have already used projinfo and I have discovered that there 3 possible transformations as you can see from the following output</div><div><br></div><div>---------------------------------------------------------------------------------------------------</div><div>C:\>projinfo -s EPSG:23033 -t EPSG:25833 -o proj --spatial-test intersects<br>Candidate operations found: 3<br>-------------------------------------<br>Operation No. 1:<br><br>unknown id, Inverse of UTM zone 33N + ED50 to ETRS89 (1) + UTM zone 33N, 1 m, Norway - offshore north of 65°N. Also Svalbard.<br><br>PROJ string:<br>+proj=pipeline<br> +step +inv +proj=utm +zone=33 +ellps=intl<br> +step +proj=push +v_3<br> +step +proj=cart +ellps=intl<br> +step +proj=helmert +x=-116.641 +y=-56.931 +z=-110.559 +rx=0.892507816631186<br> +ry=0.920766095087038 +rz=-0.916640798962096 +s=-3.52<br> +convention=position_vector<br> +step +inv +proj=cart +ellps=GRS80<br> +step +proj=pop +v_3<br> +step +proj=utm +zone=33 +ellps=GRS80<br><br>-------------------------------------<br>Operation No. 2:<br><br>unknown id, Inverse of UTM zone 33N + ED50 to ETRS89 (4) + UTM zone 33N, 1 m, Denmark - onshore.<br><br>PROJ string:<br>+proj=pipeline<br> +step +inv +proj=utm +zone=33 +ellps=intl<br> +step +proj=push +v_3<br> +step +proj=cart +ellps=intl<br> +step +proj=helmert +x=-81.1 +y=-89.4 +z=-115.8 +rx=0.485 +ry=0.024 +rz=0.413<br> +s=-0.54 +convention=position_vector<br> +step +inv +proj=cart +ellps=GRS80<br> +step +proj=pop +v_3<br> +step +proj=utm +zone=33 +ellps=GRS80<br><br>-------------------------------------<br>Operation No. 3:<br><br>unknown id, Inverse of UTM zone 33N + Ballpark geographic offset from ED50 to ETRS89 + UTM zone 33N, unknown accuracy, World, has ballpark transformation<br><br>PROJ string:<br>+proj=pipeline<br> +step +inv +proj=utm +zone=33 +ellps=intl<br> +step +proj=utm +zone=33 +ellps=GRS80<br><br>C:\> </div><div>
----------------------------------------------------------------------------------------------------</div><div>PostGIS in my case has used the last one (the less accurate transformation - "ballpark transformation") </div><div>This is the default behaviour in this case as you can see also looking at the output of cs2cs</div><div><br></div><div>C:\>cs2cs EPSG:23033 EPSG:25833<br>541000 4516000<br>540998.14 4515921.57 0.00 </div><div><br></div><div>The result is coincident with the output of my sql script </div><div>
540998.1383329581 4515921.565374701 </div><div><br></div><div>My question was about the criteria used by the Proj.6 lib for choosing between several possible transformations and also to know the transformation pipeline code used.</div><div><br></div><div>Searching on the net I have found that the same results (the approximate ones) can be obtained using the function ST_TransformPipeline () a variant of ST_Transform and specifying the EPSG code the transformation </div><div><br></div><div>-- I have first transformed the cartografic coordinates
541000 4516000<b> </b>from EPSG:23033 to geographic coordinates with EPSG:4230</div><div><br></div><div>WITH coord_4258 AS<br>(<br> SELECT<br> ST_X(ST_TransformPipeline('SRID=4230;POINT(15.48596772786105 40.79326538046647)'::geometry,'urn:ogc:def:coordinateOperation:EPSG::1611')) as x_4258,<br> ST_Y(ST_TransformPipeline('SRID=4230;POINT(15.48596772786105 40.79326538046647)'::geometry,'urn:ogc:def:coordinateOperation:EPSG::1611')) as y_4258<br> )<br>SELECT<br> ST_AsEWKT(ST_Transform(ST_Point(x_4258,y_4258, 4258), 25833))<br>FROM coord_4258;<br>---------------<br>"st_asewkt"<br>"SRID=25833;POINT(540998.1383329581 4515921.565374701)"</div><div>.</div><div><br></div><div>In order to obtain better results I have used a specific EPSG transformation code (1588)</div><div><br></div><div>WITH coord_4258 AS<br>(<br> SELECT<br> ST_X(ST_TransformPipeline('SRID=4230;POINT(15.48596772786105 40.79326538046647)'::geometry,'urn:ogc:def:coordinateOperation:EPSG::1588')) as x_4258,<br> ST_Y(ST_TransformPipeline('SRID=4230;POINT(15.48596772786105 40.79326538046647)'::geometry,'urn:ogc:def:coordinateOperation:EPSG::1588')) as y_4258<br> )<br>SELECT<br> ST_AsEWKT(ST_Transform(ST_Point(x_4258,y_4258, 4258), 25833))<br>FROM coord_4258;<br>----------------<br>"st_asewkt"<br>"SRID=25833;POINT(540931.3414974756 4515810.597825925)"</div><div><br></div><div>The most accurate results are those obtained using a NTv2 grid file</div><div>540932.206 4515807.111</div><div><br></div><div>and the results of the transformation with EPSG:1588 are better than those of EPSG:1611 (used da PostGIS).</div><div><br></div><div>The questions are now:</div><div><br></div><div>1. why did Proj.6 lib c<span class="gmail-T286Pc">hoose </span>
the transformation with EPSG code 1611 rather than the one with EPSG code 1588 ?</div><div>2. why there is no evidence in the output of ST_Transform or cs2cs of the transformation code chosen for doing the transformation ?</div><div><br></div><div>I hope this long mail will help clarify my initial question.</div><div><br></div><div>Antonio</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Il giorno gio 26 feb 2026 alle ore 10:29 Florian Nadler <<a href="mailto:florian.nadler@cybertec.at">florian.nadler@cybertec.at</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Try projinfo (<a href="https://proj.org/en/stable/apps/projinfo.html#examples" rel="noreferrer" target="_blank">https://proj.org/en/stable/apps/projinfo.html#examples</a>) <br>
from the commandline of your PostGIS host:<br>
<br>
projinfo -s EPSG:23033 -t EPSG:25833<br>
<br>
Transformation can done via commandline as follows:<br>
<br>
cs2cs EPSG:23033 EPSG:25833 <<EOF<br>
541000 4516000<br>
EOF<br>
<br>
Florian<br>
<br>
Am 24.02.2026 um 08:18 schrieb Antonio Valanzano:<br>
> I am usign PostGIS 3.5 with PostgreSQL 17.0<br>
><br>
> Here are the details for my installation:<br>
><br>
> "postgis_full_version"<br>
> "POSTGIS=""3.5.3 3.5.3"" [EXTENSION] PGSQL=""170"" <br>
> GEOS=""3.13.1-CAPI-1.19.2"" PROJ=""8.2.1 NETWORK_ENABLED=OFF<br>
> URL_ENDPOINT=<a href="https://cdn.proj.org" rel="noreferrer" target="_blank">https://cdn.proj.org</a> <br>
> USER_WRITABLE_DIRECTORY=C:\Windows\ServiceProfiles\NetworkService\AppData\Local/proj <br>
><br>
> DATABASE_PATH=C:\Program <br>
> Files\PostgreSQL\17\share\contrib\postgis-3.5\proj\proj.db"" (compiled <br>
> against PROJ 8.2.1)<br>
> LIBXML=""2.12.5"" LIBJSON=""0.12"" LIBPROTOBUF=""1.2.1"" WAGYU=""0.5.0 <br>
> (Internal)"" (core procs from ""3.5.2 3.5.2"" need upgrade)"<br>
><br>
><br>
> I have done the following coordinate transformation<br>
> from ED50 / UTM zone 33N (espg:23033)<br>
> to ETRS89 / UTM zone 33N (epsg:25833<br>
><br>
> SELECT<br>
> ST_X(ST_Transform(ST_Point(541000,4516000,23033),25833)) as X,<br>
> ST_Y(ST_Transform(ST_Point(541000,4516000,23033),25833)) as Y;<br>
><br>
> -- result<br>
> "x" "y"<br>
> 540998.1383329581 4515921.565374701<br>
><br>
> I have read that the best way to utilize PROJ.6 capabilities is by <br>
> allowing the library to freely choose the best possible transformation <br>
> paths<br>
> between the origin and the destination CRSes.<br>
><br>
> Does someone know how to find which specific transformation pipeline <br>
> has been chosen by the PROJ.6 library in this specific transformation ?<br>
><br>
> Antonio<br>
><br>
><br>
-- <br>
CYBERTEC PostgreSQL International GmbH<br>
Römerstraße 19, A-2752 Wöllersdorf<br>
Web: <a href="https://www.cybertec-postgresql.com" rel="noreferrer" target="_blank">https://www.cybertec-postgresql.com</a><br>
<br>
</blockquote></div></div>