<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Bo,</p>
    <p>I think you can do it with cs2cs. cs2cs can read a file.</p>
    <p>As an example, the first coordinates seems to be transformed
      with:</p>
    <p>echo 55 12 42 | cs2cs --3d epsg:4326 epsg:7416<br>
      691875.63    6098907.83 4.39</p>
    <p>Regards from south,<br>
    </p>
    <p>Jorge<br>
    </p>
    <div class="moz-cite-prefix">On 21/03/23 10:06, Bo Victor Thomsen
      via QGIS-User wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:42a60693-ddf7-87ce-55da-cf2e3c0baa65@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hi list -</p>
      <p>I have a problem with transforming a csv file containing x,y <i>and
        </i>z values from EPSG:4326 to EPSG:7416, i.e I want to
        transform the height value from LongLat/ WGS84 ellipsoid height
        to UTM32/Etrs89 with vertical reference DVR90. <br>
      </p>
      <p>The file look like this:</p>
      <p><font face="monospace"><b>== data.csv, EPSG:4326 id: col1, x:
            col3, y: col2, z: col4 ==</b><b><br>
          </b>a;55.0;12.0;42.0<br>
          b;55.05;12.0;43.0<br>
          c;55.10;12.0;44.0<br>
          d;55.15;12.0;45.0<br>
          e;55.20;12.0;46.0</font><br>
        <b>=======================</b></p>
      <p><b>Step 1</b>: I import the file into QGIS using the Data
        Source Manager --> "Delimited Text" and define the projection
        to be EPSG:4326 <i>and</i> to include z values. This works and
        the points are shown on my map where I expect them to be
        (Somewhere in the middle of Zealand, Denmark)<br>
      </p>
      <p><b>Step 2</b>: I export the layer as a geojson file using
        "Export" --> "Save features as.." from the layer manager and
        choose EPSG:7416 (UTM32/ETRS89 with DVR90 as vertical reference.
        And to include z-values<br>
      </p>
      <p>The resulting file looks like this:  <br>
      </p>
      <p><font face="monospace"><b>== data.geojson, EPSG:7416 ==</b><b><br>
          </b>{<br>
          "type": "FeatureCollection",<br>
          "name": "data",<br>
          "crs": { "type": "name", "properties": { "name":
          "urn:ogc:def:crs:EPSG::4979" } },<br>
          "features": [<br>
          { "type": "Feature", "properties": { "field_1": "a",
          "field_2": 55.0, "field_3": 12.0, "field_4": 42.0 },
          "geometry": { "type": "Point", "coordinates": [ 12.0, 55.0,
          42.0 ] } },<br>
          { "type": "Feature", "properties": { "field_1": "b",
          "field_2": 55.05, "field_3": 12.0, "field_4": 43.0 },
          "geometry": { "type": "Point", "coordinates": [ 12.0, 55.05,
          43.0 ] } },<br>
          { "type": "Feature", "properties": { "field_1": "c",
          "field_2": 55.1, "field_3": 12.0, "field_4": 44.0 },
          "geometry": { "type": "Point", "coordinates": [ 12.0, 55.1,
          44.0 ] } },<br>
          { "type": "Feature", "properties": { "field_1": "d",
          "field_2": 55.15, "field_3": 12.0, "field_4": 45.0 },
          "geometry": { "type": "Point", "coordinates": [ 12.0, 55.15,
          45.0 ] } },<br>
          { "type": "Feature", "properties": { "field_1": "e",
          "field_2": 55.2, "field_3": 12.0, "field_4": 46.0 },
          "geometry": { "type": "Point", "coordinates": [ 12.0, 55.2,
          46.0 ] } }<br>
          ]<br>
          }<br>
        </font><b>=======================</b></p>
      <p>The new file is shown in my map exactly on top of the original
        point layer, meaning the horizontal projection is accurate.
        However, my z coordinates are not reprojected to the new
        vertical reference. All the z-values are exactly the same as the
        values in the .csv - file.<br>
      </p>
      <p>After some digging through Google and other places, I discover
        that EPSG:4326 <i>doesn't</i> have a z component. Surprise !
        You have to use EPSG:4979, which is the same as EPSG:4326 with
        ellipsoid height. <br>
      </p>
      <p>But, <i>after </i>repeating <b>step 1</b>, <i>but</i> using
        EPSG:4979 as CRS during import, and subsequently repeating <b>step
          2</b>, I get the exact same result: No transformation of
        height values. <br>
      </p>
      <p>So, what is not working ? Am I doing something wrong ?? Or is
        QGIS incapable of transforming z values ???<br>
      </p>
      <p><br>
      </p>
      <pre class="moz-signature" cols="72">-- 
Med venlig hilsen / Best regards

Bo Victor Thomsen</pre>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-User mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432

</pre>
  </body>
</html>