<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 21 Mar 2023, 8:06 pm Bo Victor Thomsen via QGIS-User, <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div>
    <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></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The second -- qgis currently doesn't handle vertical crs at all. My recommendation is to use gdal utilities to do a transform respecting vertical datums.</div><div dir="auto"><br></div><div dir="auto">Nyall</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>
    </p>
    <p><br>
    </p>
    <pre cols="72">-- 
Med venlig hilsen / Best regards

Bo Victor Thomsen</pre>
  </div>

_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div></div></div>