Problem reading raster in Co-labs notebook

15 views
Skip to first unread message

Greger Lindeberg

unread,
Apr 26, 2024, 12:29:02 PMApr 26
to WhiteboxTools
Hi!

I have a problem reading geotiff rasters when working with Whitebox from a Google co-labs notebook. I can read and process the same rasters fine locally on my mac but it doesnt work in the notebook environment. The Whitebox library works fine when using the demo data provided though.

Here's the error message:

./whitebox_tools --run="BreachDepressions" --wd="/usr/local/lib/python3.10/dist-packages/whitebox/testdata" --dem='test_DEM_gm_WB.tif' --output='DEM1_breached.tif' -v --compress_rasters=False ******************************** * Welcome to BreachDepressions * * Powered by WhiteboxTools * * www.whiteboxgeo.com * ******************************** Reading data... thread 'main' panicked at 'Incorrect TIFF header. Unrecognized byte-order indicator.', whitebox-tools-app/src/main.rs:72:21 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
0
Someone else running in to this probelm?
Thanks,
Greger

Whitebox Geospatial Inc

unread,
Apr 26, 2024, 12:35:40 PMApr 26
to Greger Lindeberg, WhiteboxTools

Hi Greger,

 

I can tell you that the error is being issued by this line of code:

 

https://github.com/jblindsay/whitebox-tools/blob/5a82f513e77cf1c74778995b5d6304dd9d9f372f/whitebox-raster/src/geotiff/mod.rs#L52

 

Which is checking the byte-order indicator of a GeoTIFF file being read. It can either be little-endian or big-endian, but in your case, the file has neither indicator, which is what is throwing the error. Now, why the same file being read by the same code but run locally versus on Colab would result in this error, that is something that I can’t say. I’m really not sure why that would be the case unless the file was somehow changed.

 

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/13354e02-d86f-4c19-98bd-44f18c920a70n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages