-
Notifications
You must be signed in to change notification settings - Fork 5
Adds support for -b/--band to avoid reading or writing irrelevant bands #37
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
Conversation
alpha-beta-soup
commented
Oct 24, 2025
- Built upon Adds support for the A5 DGGS #36
- Closes Only index some bands #16
- Closes Support for multi-band rasters with nulls in some (but not all) bands #12
- puts CLI help text in consts to ease update burden - edge case handling for mode aggregation to handle all-nan series
ndemaio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter proliferation continues! :D But the optimisation does make sense. I think you're the best person to decide at which point the command line arguments get too involved. (I think Linux shell commands have some truly terrible examples...) I don't know if I've got a good alternative off the top of my head either - it feels like something that needs to be looked at on a case by case basis. But it doesn't seem to be a problem just yet so all good.
| with rio.Env(CHECK_WITH_INVERT_PROJ=True): | ||
| with rio.open(raster_input) as src: | ||
| with rio.open(raster_input, mode='r', sharing=False) as src: | ||
| LOGGER.debug("Source CRS: %s", src.crs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks far more controlled, does it fix a specific thing as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's actually the default args. I was just making it explicit (and I guess also protecting against the defaults changing). I'm not actually sure that we've parallelised this properly, I need to look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are definitely some adjustments to be made here. A start is #38, another could be to reconfigure reads so there isn't a shared WarpedVRT that requires a dask.utils.SerializableLock. Chunks of windows could be read in separate processes. Something for another day unfortunately.
- puts CLI help text in consts to ease update burden - edge case handling for mode aggregation to handle all-nan series
My reference point is GDAL, so I think I'm in good company... https://gdal.org/programs/ogr2ogr.html |