[Qgis-user] DEM error with OpenDataNRW

Nicolas Cadieux njacadieux.gitlab at gmail.com
Mon Nov 16 09:53:47 PST 2020


Hi,

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

x y z
32342000.00 5659997.00   43.35
32342000.00 5659998.00   43.41
32342000.00 5659999.00   43.34
32342001.00 5658000.00   45.16 (line 2001)
32342001.00 5658001.00   45.13
32342001.00 5658002.00   45.00

I reprojected and srtm and save it as a xyz using gdal12xyz and this is 
what I got for the first few lines

xyz

26548864.985 8824521.429 -32768
26548904.304 8824521.429 -32768
26548943.623 8824521.429 -32768
26548982.941 8824521.429 -32768

and at line 4749 thing change to a new y coordinate
26735471.145 8824521.429 -32768
26735510.464 8824521.429 -32768
26548864.985 8824482.110 -32768
26548904.304 8824482.110 -32768

As you can see, the x values changes on every line and the y value is 
constant as stated in https://gdal.org/drivers/raster/xyz.html
"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."

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.

Perhaps Even R. has a solution.
Nicolas




On 2020-11-16 9:49 a.m., Prof. Dr. Martin Berchtold wrote:
>
> Dear all,
>
> 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???
>
> Error message:
>
> *Ungültiger Layer: *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
>
> 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.
>
> Is there a limit of file size or line numbers?
>
> Thanks for any help und kind regards
>
> Martin
>
> ---
>
> dvm*P*
>
> Digitalisierung, Visualisierung & Monitoring in der Raumplanung
>
> Jun.-Prof. Dr. Martin Berchtold
>
> TU Kaiserslautern, Fachbereich Raum- und Umweltplanung
>
> Pfaffenbergstraße 95 | D 67663 Kaiserslautern
>
> Geb. 1, R. U28
>
> T +49 631 205-5151 | M +49 177 3692249
>
> martin.berchtold at ru.uni-kl.de <mailto:martin.berchtold at ru.uni-kl.de>
>
> www.ru.uni-kl.de/dvmP <http://www.ru.uni-kl.de/dvmP>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201116/e537c89c/attachment.html>


More information about the Qgis-user mailing list