-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
enhancementRelease notes labelRelease notes label
Milestone
Description
What's the problem this feature will solve?
Currently if the users would like to find the min/max cell based on certain criteria, they'll have to it manually like this:
min(raster_layer.get_neighboring_cells(pos, ...),
key=lambda cell: cell.attribute)Describe the solution you'd like
To have a more powerful and fluent API for cell aggregation similar to Pandas, e.g.,
raster_layer.get_neighboring_cells(pos, ...).by("attribute").min()
raster_layer.get_neighboring_cells(pos, ...).by(lambda cell: cell.attribute).min()
raster_layer.get_neighboring_cells(pos, ...).by(["attribute_0", "attribute_1"]).agg(["min", "max"])
raster_layer.get_neighboring_cells(pos, ...).by("attribute").agg(lambda cell_list: random.choice(cell_list))Additional context
See comments from #75 (comment).
Metadata
Metadata
Assignees
Labels
enhancementRelease notes labelRelease notes label