Whitebox can´t read rasters made with PDAL/GDAL, why?

188 views
Skip to first unread message

emanuel vogel

unread,
Mar 2, 2023, 7:01:04 AM3/2/23
to WhiteboxTools
Hello,

I'm trying to mosaic a few dsm rasters that I produced from lidar data using PDAL. and it seems Whitebox can´t read the files, resulting in an error. What could be the reason for this? The files are GeoTIFFs/64-bit floating point, and work as intended in QGIS.

The code and error message in Whitebox looks like this:

from whitebox import WhiteboxTools

wbt = WhiteboxTools()
wbt.set_verbose_mode(True)
wbt.set_working_dir(r'C:\Projekt\Almhult_lidar\PDAL_dsm')

outfile = 'DSM.tif'

wbt.mosaic(output=outfile, method='nn')

The error I get is:
Number of tiles: 10
Reading data...
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\1.tif
Progress: 0%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\10.tif
Progress: 11%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\2.tif
Progress: 22%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\3.tif
Progress: 33%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\4.tif
Progress: 44%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\5.tif
Progress: 55%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\6.tif
Progress: 66%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\7.tif
Progress: 77%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\8.tif
Progress: 88%
Warning: Error reading file C:\Projekt\Almhult_lidar\PDAL_dsm\9.tif
Progress: 100%
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', whitebox-tools-app\src\tools\image_analysis\mosaic.rs:429:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace




Whitebox Geospatial Inc

unread,
Mar 2, 2023, 7:45:56 AM3/2/23
to emanuel vogel, WhiteboxTools

Hello Emanuel,

 

I’ve done my best with developing the Whitebox GeoTIFF reader/writer, but ultimately the GeoTIFF file format is an immensely flexible and massive format. There are certain cases, e.g. some forms of image compression, that the reader/write cannot currently handle. My guess is that the issue here is the compression format, in which case I would suggest changing that before sending the data to Wb.

 

If you are able to send me an example file that Wb had trouble reading that can help me to improve the GeoTIFF reader/writer.

 

Regards,


John

--
You received this message because you are subscribed to the Google Groups "WhiteboxTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to whiteboxtool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/whiteboxtools/6796f9fc-ba18-4dbd-bc04-2f47f3e3006dn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

emanuel vogel

unread,
Mar 2, 2023, 10:21:43 AM3/2/23
to WhiteboxTools
Hello John,

I see! The GDAL writer seems to be able to use different forms of compression, I'll play around with that to see if I can find a solution.

And sure, I can send you one of the files. Where can I best send it?

Regards,
Emanuel

Jean-François Bourdon

unread,
Mar 2, 2023, 10:22:53 AM3/2/23
to WhiteboxTools
In the meantime, you can use the SAGA GIS Binary Grid File Format (.SDAT / .SGRD) that it well supported in WBT, including in its 64-bit floating form.
Reply all
Reply to author
Forward
0 new messages