-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thread 'main' panicked at 'index out of bounds: the len is 724 but the index is 724 #6
Comments
Hi Laurent! It's been a while since I originally started the library, and as a word of caution, I only needed it to read elevation data (single channel / layer) - it served that purpose but is sadly far from implementing the whole GeoTiff standard. Looking at https://github.com/georust/geotiff/blob/master/src/lib.rs#L35, it should return the first layer, however, your panic seems to be happening already during parsing. Looking at https://github.com/georust/geotiff/blob/master/src/reader.rs#L303 it seems that one of the accessors (in Lots of coulds and woulds, I know (sorry!), but it was 5 years ago that I wrote the code... if you manage to dig into the library and fix the issues, happy to merge a PR! The library is not particularly large so it should be understandable fairly quickly :) (the GeoTiff spec on the other hand...) Cheers |
Related #4 |
Thanks for your reply, @dominikbucher. |
Hi,
I'm fairly new in Rust and wanted to try reading a
.tif
hyperspectral imaging file which contains multiple layers (its shape is(356, 724, 757)
, for 356 layers, width of 724 and height of 757 pixels).My first test was to just read the file, then look at value at coordinates (1, 1), which I'm guessing should be a vector of size 356.
But I run into this panic:
Should I understand that the multiplicity of layers is not handled by
geotiff
, or am I doing something wrong?The text was updated successfully, but these errors were encountered: