-
Notifications
You must be signed in to change notification settings - Fork 22
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
read_box fails if reading with the bounding box of the tiff #60
Comments
Thanks for picking that up. If you've already debugged, please open a PR and I'll merge asap! Thanks! |
I am not currently sure if my fix is the correct way to fix the issue. I am writing a solution that can automatically build up a single elevation map for a given rectangle area, using provided small geotiff tiles (6 km x 6 km). This required a bit of code logic so that the overlapping regions between the given area and the tiles are found. After the mentioned fix, the next problem seems to be that there are gaps between the tiles. It might be due to some kind of coordinate misalignment, see the image below. In this case, nine geotiff tiles are used to construct the shown elevation map. |
At least with
as_crs=3857
I cannot correctlyread_box()
using the bounding box returned bytif_bBox_converted
. This problem happens also when shrinking another dimension but keeping the other to match with the original bouding box.The geotiff I am playing with is attached.
(W5131F.tif, provided by Maanmittauslaitos 2023/05, Finland)
Code:
This should print something like 3000 by 3000 as the shape, but instead the output is:
arr.shape=(73, 3000)
I debugged for a while and noted that
i_min
andj_min
inget_int_box()
get negative values. Limiting them to be equal or greater than zero seems to fix something. Not sure if I can survive with that.W5131F.zip
The text was updated successfully, but these errors were encountered: