<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div></div>
<div>Hello thanks for your quick answer, <br>
<br>
Indeed adding --3d to cs2cs command give me the past behavior. <br>
The commands that I wrote were only here for the example, to illustrate that I can recreate the behaviors.<br>
My goal is to be more generic, I would like to be able to do CRS conversions without knownledges of them at first, using the PROJ C API. <br>
<br>
I found some advices here https://github.com/OSGeo/PROJ/pull/3119#issuecomment-1069272183
<br>
and here https://github.com/OSGeo/PROJ/pull/3119#issuecomment-1069272183 .<br>
What I understood from theses comments is that promoting CRS to 3D only make sense for PJ_TYPE_GEOGRAPHIC_2D_CRS and PJ_TYPE_PROJECTED_CRS types.<br>
I would like to detect theses cases and promoting the CRS accordingly with the API.<br>
<br>
My questions are multiple : <br>
-first did I understood right? <br>
-Are there others cases (or types) that I should think about? <br>
-Is looking for the CRS type is enough or should I look for other information?</div>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De :</b> Even Rouault <even.rouault@spatialys.com><br>
<b>Envoyé :</b> mardi 1 octobre 2024 15:13:11<br>
<b>À :</b> Christian DOULIAC; proj@lists.osgeo.org<br>
<b>Objet :</b> Re: [PROJ] [Questions] Vertical transformations advices for PROJ >= 9.1 version</font>
<div> </div>
</div>
<div>
<p><br>
</p>
<div class="moz-cite-prefix">Le 01/10/2024 à 11:04, Christian DOULIAC via PROJ a écrit :<br>
</div>
<blockquote type="cite" cite="mid:89c8212f2f044a45a02dae850bcf9b32@magellium.fr">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p dir="auto">Hello, I would like some precision about CRS conversions.</p>
<p dir="auto">I'm aware that there are some changes about vertical transformations with PROJ >= 9.1 as stated here :
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1170903012" data-permission-text="Title is private" data-url="https://github.com/OSGeo/PROJ/issues/3119" data-hovercard-type="pull_request" data-hovercard-url="/OSGeo/PROJ/pull/3119/hovercard" href="https://github.com/OSGeo/PROJ/pull/3119" moz-do-not-send="true">
</a><a href="https://github.com/OSGeo/PROJ/pull/3119" class="OWAAutoLink moz-txt-link-freetext" id="LPlnk868644" moz-do-not-send="true">https://github.com/OSGeo/PROJ/pull/3119</a>
<br>
Or here : <a href="https://proj.org/en/9.4/apps/cs2cs.html#cmdoption-cs2cs-3d" rel="nofollow" moz-do-not-send="true" class="moz-txt-link-freetext">
https://proj.org/en/9.4/apps/cs2cs.html#cmdoption-cs2cs-3d</a> "Starting with PROJ 9.1, both CRS need to be 3D for vertical transformation to possibly happen."</p>
<p dir="auto"><br>
I tested it and I recreated the behavior of pre 9.1 and post 9.1 versions :</p>
<p dir="auto">-PROJ 8.2.0 :<br>
echo 0 0 1000 | cs2cs +proj=longlat +datum=WGS84 +geoidgrids=/proj-build/data/for_tests/egm96_15.tif +vunits=m +no_defs +type=crs +to +proj=longlat +datum=WGS84 +no_defs +type=crs -f "%.14f"<br>
0.00000000000000 0.00000000000000 1017.16157913208008</p>
<p dir="auto">-PROJ 9.2.0<br>
echo 0 0 1000 | cs2cs +proj=longlat +datum=WGS84 +geoidgrids=/proj-build/data/for_tests/egm96_15.tif +vunits=m +no_defs +type=crs +to +proj=longlat +datum=WGS84 +no_defs +type=crs -f "%.14f"<br>
0.00000000000000 0.00000000000000 1000.00000000000000</p>
</div>
</blockquote>
<p>Add --3d to promote the target CRS to 3D.</p>
<p><br>
</p>
<p>Or use: cs2cs -f "%.14f" EPSG:4326+5773 EPSG:4979 (with lat, long order)<br>
</p>
<span style="white-space: pre-wrap"></span>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</body>
</html>