Proposal: raster_reduce
for raster operations that don't produce a raster
#285
Labels
enhancement
New feature or request
in progress
Working on it!
proposal
Proposals requiring team feedback
It could be useful to have an equivalent of
raster_calculator
for operations that don't produce a raster output. Ifraster_calculator
is likemap
over the blocks of a raster, then this would be likefunctools.reduce
over the blocks of a raster.Aggregations are probably the most common use case. For the Morgan Stanley project I needed to produce histogram data for a raster.
raster_calculator
seems like the easiest approach, but it requires writing to a target raster which was totally irrelevant for my use case. I ended up with:Given a proposed new function
raster_reduce(raster_path, function, initializer)
that behaves likefunctools.reduce
, that could be rewritten asI'm not sure if there are any use cases for this function in invest, but I imagine it would be useful for data analysis.
The text was updated successfully, but these errors were encountered: