-
Notifications
You must be signed in to change notification settings - Fork 5
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
geotrellis.raster.GeoAttrsError: invalid cols: 0 #984
Comments
Note that it's important to evaluate this on staging, which already has some fixes for global extent. |
@EmileSonneveld as the 'GeoAttrsError' is entirely useless, I propose to put a try catch in place that converts it to an exception with a message that actually prints the relevant arguments, allowing to much more easily spot the actual problem. |
We now get an error with more info:
|
The trigger seems to be a very small area in high northern latitudes (so 'unstable' region for EPSG:4326), which is reprojected into utm. It's probably the 'reduce_dimension' process that blocks resampling from happening at load time, which might avoid the issue. |
We can now reproduce in geotrellis, it looks like the cube extent is smaller than a single pixel, hence the issue:
|
Geotrellis rounds down, and as a result the extent 'collapses' into 0 pixels, probably also caused by the high latitude. |
So this is what happens: DEM is specified in EPSG:4326, with a specific resolution in degrees, roughly corresponding to 30m. At high latitudes, the conversion of degrees to meters results in a pixel size less than 15m, and the datacube 'collapses' into having 0 pixels. |
I logged the Geotrellis issue: |
The fix seems to work on staging. |
Kristof encountered this error:
j-250106ead7734ec7a4d913bd3b08dcf1
This can be reproduced with a smaller process graph:
The text was updated successfully, but these errors were encountered: