Skip to content

Conversation

@alpha-beta-soup
Copy link
Member

- puts CLI help text in consts to ease update burden
- edge case handling for mode aggregation to handle all-nan series
@alpha-beta-soup alpha-beta-soup self-assigned this Oct 24, 2025
@alpha-beta-soup alpha-beta-soup added bug Something isn't working enhancement New feature or request labels Oct 24, 2025
@alpha-beta-soup alpha-beta-soup changed the title Adds support for -b/--bands to avoid reading or writing irrelevant bands Adds support for -b/--band to avoid reading or writing irrelevant bands Oct 24, 2025
Copy link
Collaborator

@ndemaio ndemaio left a 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)
Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

alpha-beta-soup and others added 4 commits October 28, 2025 16:35
@alpha-beta-soup
Copy link
Member Author

alpha-beta-soup commented Oct 28, 2025

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.

My reference point is GDAL, so I think I'm in good company... https://gdal.org/programs/ogr2ogr.html

@alpha-beta-soup alpha-beta-soup merged commit ff00ffe into a5 Oct 28, 2025
1 check passed
This was referenced Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants