<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list - <br>
</p>
<p>Thanks to all for the prompt (and correct) responses. <br>
</p>
<p>Using ogr2ogr (and some fiddling with the csv file including a
header row..) :<br>
</p>
<p><font size="2" face="monospace">ogr2ogr -dim XYZ -oo
X_POSSIBLE_NAMES=x -oo Y_POSSIBLE_NAMES=y -oo Z_POSSIBLE_NAMES=z
-s_srs EPSG:4979 -t_srs EPSG:7416 -f GeoJSON
d:\temp\data_7416.json d:\temp\data_4979.csv <br>
</font></p>
<p>did the trick.</p>
<p>And just for the fun of it: I tried changing the input projection
to EPSG:4326:</p>
<p><font size="2" face="monospace">ogr2ogr -dim XYZ -oo
X_POSSIBLE_NAMES=x -oo Y_POSSIBLE_NAMES=y -oo Z_POSSIBLE_NAMES=z
-s_srs <b>EPSG:4326</b> -t_srs EPSG:7416 -f GeoJSON
d:\temp\data_7416.json d:\temp\data_4979.csv <br>
</font></p>
<p>And that didn't work. So "they" were serious about EPSG:4326 not
handling z coordinates<br>
</p>
<pre class="moz-signature" cols="72">Med venlig hilsen / Best regards
Bo Victor Thomsen</pre>
<div class="moz-cite-prefix">Den 21-03-2023 kl. 11:41 skrev Nyall
Dawson:<br>
</div>
<blockquote type="cite"
cite="mid:CAB28Asg6TUAdtuV6J+nOt5dd3t1Pasy=NpT41_f_RWj__JCH7g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 21 Mar 2023, 8:21
pm Richard McDonnell, <<a
href="mailto:richard.mcdonnell@opw.ie"
moz-do-not-send="true" class="moz-txt-link-freetext">richard.mcdonnell@opw.ie</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-IE">
<div class="m_2724173393753141729WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi,</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Just
to add to what Nyall said.</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">See
link below, which suggests a way using OGR to
carry out the process you require.</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a
href="https://gis.stackexchange.com/questions/324848/transform-datum-csv-csv-using-ogr2ogr"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://gis.stackexchange.com/questions/324848/transform-datum-csv-csv-using-ogr2ogr</a></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">It
suggests you preform your horizontal
transformation first, this can be done in QGIS,
then carry out the Vertical Transformation. This
can be done in command line, if you are on
windows, the best option is to use the
<b>OSGeo4w Shell</b>, as all the needed
environmental settings are applied.</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I
hope the above helps.</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Maybe
there is an opportunity to have QGIS preform
Vertical translations, even if these are a
separate step? It’s something that would be useful
for both Raster and Vector Data.</span></p>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">It's definitely on the radar -- especially for
transformation of point clouds. It's just a very involved task
with a high degree of complexity, and will need funding to
happen.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Nyall</div>
<div dir="auto"><br>
</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 link="blue" vlink="purple" lang="EN-IE">
<div class="m_2724173393753141729WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Regards,</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><br>
Richard</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></p>
<table
style="FONT-SIZE:9pt;HEIGHT:321px;FONT-FAMILY:Arial,sans-serif;WIDTH:500px;LINE-HEIGHT:15px"
cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td
style="FONT-SIZE:9pt;FONT-FAMILY:Arial,sans-serif;WIDTH:500px;COLOR:#004d44;PADDING-BOTTOM:6px"><span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#004d44"><br>
——</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#004d44">Richard
McDonnell MSc GIS, FME Certified
Professional</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44"><i>FRM
Data Management</i></span><br>
<br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">——</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#004d44">Oifig
na nOibreacha Poiblí</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">Office
of Public Works</span><br>
<br>
<span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#565148">Sráid
Jonathan Swift, Baile Átha Troim, Co na Mí,
C15 NX36
</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#565148">Jonathan
Swift Street, Trim, Co Meath, C15 NX36</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#565148">——</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#565148">M
+353 87 688 5964 T +353 46 942 2409</span><br>
<a href="https://gov.ie/opw" target="_blank"
rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">https://gov.ie/opw</a><br>
<br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">——<br>
To send me files larger than 30MB, please
use the link below <a
href="https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie</a><br>
</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">Email
Disclaimer: <a
href="https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/</a>
</span></td>
</tr>
</tbody>
</table>
<table
style="FONT-SIZE:9pt;FONT-FAMILY:Arial,sans-serif;WIDTH:420px;LINE-HEIGHT:15px"
cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td
style="FONT-SIZE:9pt;FONT-FAMILY:Arial,sans-serif;WIDTH:420px;COLOR:#004d44;PADDING-BOTTOM:6px"><span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#004d44"><br>
——</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#004d44">MSc
GIS, FME Certified Professional</span><br>
<br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">——</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#004d44">Oifig
na nOibreacha Poiblí</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">Office
of Public Works</span><br>
<br>
<span
style="FONT-FAMILY:Arial,sans-serif;FONT-WEIGHT:bold;COLOR:#565148">Sráid
Jonathan Swift, Baile Átha Troim, Co na Mí,
C15 NX36
</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#565148">Jonathan
Swift Street, Trim, Co Meath, C15 NX36</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#565148">——</span><br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#565148">M
+353 87 688 5964 T +353 46 942 2409</span><br>
<font color="#565148"><a
href="https://www.opw.ie" target="_blank"
rel="noreferrer" moz-do-not-send="true">https://https://gov.ie/opw</a></font><br>
<br>
<span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">——<br>
</span><span
style="FONT-FAMILY:Arial,sans-serif;COLOR:#004d44">Email
Disclaimer:
<a href="https://www.opw.ie/en/disclaimer/"
target="_blank" rel="noreferrer"
moz-do-not-send="true">https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/</a></span>
</td>
</tr>
</tbody>
</table>
<div style="border:none;border-left:solid blue
1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="EN-US">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="EN-US"> QGIS-User <<a
href="mailto:qgis-user-bounces@lists.osgeo.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">qgis-user-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Nyall Dawson via
QGIS-User<br>
<b>Sent:</b> 21 March 2023 10:14<br>
<b>To:</b> Bo Victor Thomsen <<a
href="mailto:bo.victor.thomsen@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">bo.victor.thomsen@gmail.com</a>><br>
<b>Cc:</b> qgis-user <<a
href="mailto:qgis-user@lists.osgeo.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [Qgis-user] Problems
with transformation including height values</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"> </p>
<div>
<div>
<p class="MsoNormal">On Tue, 21 Mar 2023,
8:06 pm Bo Victor Thomsen via QGIS-User,
<<a
href="mailto:qgis-user@lists.osgeo.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</a>>
wrote:</p>
</div>
<blockquote
style="border:none;border-left:solid #cccccc
1.0pt;padding:0cm 0cm 0cm
6.0pt;margin-left:4.8pt;margin-right:0cm">
<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.
</p>
<p>The file look like this:</p>
<p><b><span
style="font-family:"Courier
New"">== data.csv, EPSG:4326
id: col1, x: col3, y: col2, z: col4
==<br>
</span></b><span
style="font-family:"Courier
New"">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</span><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)</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</p>
<p>The resulting file looks like this: </p>
<p><b><span
style="font-family:"Courier
New"">== data.geojson,
EPSG:7416 ==<br>
</span></b><span
style="font-family:"Courier
New"">{<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>
</span><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.</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.
</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. </p>
<p>So, what is not working ? Am I doing
something wrong ?? Or is QGIS incapable
of transforming z values ???</p>
</div>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">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.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Nyall</p>
</div>
<div>
<div>
<blockquote
style="border:none;border-left:solid #cccccc
1.0pt;padding:0cm 0cm 0cm
6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p> </p>
<pre>-- </pre>
<pre>Med venlig hilsen / Best regards</pre>
<pre> </pre>
<pre>Bo Victor Thomsen</pre>
</div>
<p class="MsoNormal">_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">QGIS-User@lists.osgeo.org</a><br>
List info: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</body>
</html>