<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-language:DE;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        mso-fareast-language:DE;}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Consolas",serif;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks a lot for your help!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">It seems that correct functionality only depends on the sequence and sorting of Y and X !?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">“</span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:#404040">Cells with same Y coordinates must be placed on consecutive lines. For a same Y coordinate value, the lines in the
 dataset must be organized by increasing X values”</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The data that works (<a href="http://www.vermkv.service24.rlp.de/opendat/dgm25/dgm25.zip">http://www.vermkv.service24.rlp.de/opendat/dgm25/dgm25.zip</a>) is sorted according to these organizing rules
 with ascending X for same Y…:</span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:#404040"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:#404040"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">400000.000 5470000.000 347.382<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">400025.000 5470000.000 345.370<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">400050.000 5470000.000 342.344<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">400075.000 5470000.000 341.794<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">400100.000 5470000.000 340.223<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">400125.000 5470000.000 337.833<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The NRW data sort the other way round (see below). So I probably “just” will have to rearrange Y and X in the NRW data to get it ready … … … Yes, works! Cool.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks again!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Martin<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Nicolas Cadieux <njacadieux.gitlab@gmail.com>
<br>
<b>Gesendet:</b> Montag, 16. November 2020 18:54<br>
<b>An:</b> Prof. Dr. Martin Berchtold <martin.berchtold@ru.uni-kl.de>; qgis-user@lists.osgeo.org<br>
<b>Betreff:</b> Re: [Qgis-user] DEM error with OpenDataNRW<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi,<span style="font-size:12.0pt;mso-fareast-language:DE"><o:p></o:p></span></p>
<p>I believe, but Even will confirm, that the data is not organized correctly for the gdal driver. I looked at line 2001 and the file is organized by x value with incrementing y values.  The x value is constant and the y value change on every line.  The error
 is detected on line 2001 when the x value changes<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">x y z<br>
32342000.00 5659997.00   43.35<br>
32342000.00 5659998.00   43.41<br>
32342000.00 5659999.00   43.34<br>
32342001.00 5658000.00   45.16 (line 2001)<br>
32342001.00 5658001.00   45.13<br>
32342001.00 5658002.00   45.00<o:p></o:p></p>
<p>I reprojected and srtm and save it as a xyz using gdal12xyz and this is what I got for the first few lines<o:p></o:p></p>
<p>xyz<o:p></o:p></p>
<p>26548864.985 8824521.429 -32768<br>
26548904.304 8824521.429 -32768<br>
26548943.623 8824521.429 -32768<br>
26548982.941 8824521.429 -32768<o:p></o:p></p>
<div>
<p class="MsoNormal">and at line 4749 thing change to a new y coordinate<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">26735471.145 8824521.429 -32768<br>
26735510.464 8824521.429 -32768<br>
26548864.985 8824482.110 -32768<br>
26548904.304 8824482.110 -32768<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">As you can see, the x values changes on every line and the y value is constant as stated in
<a href="https://gdal.org/drivers/raster/xyz.html">https://gdal.org/drivers/raster/xyz.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">"<span style="font-family:"Arial",sans-serif;color:#404040">The spacing between each cell must be constant and no missing value is supported. Cells with same Y coordinates must be placed on consecutive lines. For a same Y coordinate value,
 the lines in the dataset must be organized by increasing X values. The value of the Y coordinate can increase or decrease however. The supported column separators are space, comma, semicolon and tabulations."</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#404040"><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#404040">I am not sure the driver can handle this.  You can however open the data as a csv and rasterize or interpolate the data (using nearest neighbor) If you use the same pixel size and
 posting, this will work and not change the data.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#404040"><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#404040">Perhaps Even R. has a solution.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#404040">Nicolas<br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#404040"><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On 2020-11-16 9:49 a.m., Prof. Dr. Martin Berchtold wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Dear all,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">could somebody please explain me why QGIS doesn’t process the DEM1 data from OpenDataNRW (.xyz, 1 meter, Nordrhein-Westfalen) while the DEM25 data from OpenDataRLP (.xyz, 25m, Rheinland-Pfalz, but congruent structure
 to NRW) works out without any problem???</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Error message:</span><o:p></o:p></p>
<p class="MsoNormal"><b><span lang="EN-US">Ungültiger Layer: </span></b><span lang="EN-US">GDAL provider Cannot open GDAL dataset C:/[…]/dgm1_05315000_Köln_EPSG4647_XYZ/dgm1_32342_5658_2_nw.xyz: Ungridded dataset: At line 2001, change of Y direction Raster
 layer Datenanbieter ist ungültig (Anbieter gdal, URI: C:/[…]/dgm1_05315000_Köln_EPSG4647_XYZ/dgm1_32342_5658_2_nw.xyz</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">There is no change at line 2001… I have no idea, esp. because I can process the NRW files in ArcGIS pro without any problem.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Is there a limit of file size or line numbers?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for any help und kind regards</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Martin</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE">---</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;mso-fareast-language:DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;mso-fareast-language:DE">dvm<b>P</b></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE">Digitalisierung, Visualisierung & Monitoring in der Raumplanung</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE">Jun.-Prof. Dr.
</span><span style="mso-fareast-language:DE">Martin Berchtold</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#7F7F7F;mso-fareast-language:DE">TU Kaiserslautern, Fachbereich Raum- und Umweltplanung</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#7F7F7F;mso-fareast-language:DE">Pfaffenbergstraße 95 | D 67663 Kaiserslautern</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#7F7F7F;mso-fareast-language:DE">Geb. 1, R. U28</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#7F7F7F;mso-fareast-language:DE">T +49 631 205-5151 | M +49 177 3692249</span><o:p></o:p></p>
<p class="MsoNormal"><a href="mailto:martin.berchtold@ru.uni-kl.de"><span style="color:blue;mso-fareast-language:DE">martin.berchtold@ru.uni-kl.de</span></a><o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.ru.uni-kl.de/dvmP"><span style="color:blue;mso-fareast-language:DE">www.ru.uni-kl.de/dvmP</span></a><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:DE"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Qgis-user mailing list<o:p></o:p></pre>
<pre><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre>
<pre>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
<pre>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
</blockquote>
</div>
</body>
</html>