scverse / scverse/spatialdata

Cases not currently covered by the aggergation

Open
#216 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

method: aggregation 🔢
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

Overview issue listing all the remaining cases that need to be implemented in aggregation; tests need to be added for each of them.

  • aggregate points by labels. See dedicated issue here: https://github.com/scverse/spatialdata/issues/209
    • subtask, handle the case in which the labels are multiscale
  • aggregate labels by labels
    • subtask, handle the case in which the labels are multiscale
  • aggregate shapes by labels
    • subtask, handle the case in which the labels are multiscale
  • aggregate labels by shapes
    • subtask, handle the case in which the labels are multiscale
  • aggregate images by shapes
    • subtask, handle the case in which the images are multiscale

Additional points to consider:

  • Allow aggregation of raster with different resolution or non-overlapping areas (affine transform). To do this the strategy is to call rasterize() on all the raster elements involved into a common resolution. Non-overlapping areas are padded with 0 (background) by default by rasterize().
    • I think also the case in which two raster objects contain translations is not covered (for instance having two images with the same resolution, but with different translations/rotations, so that the overlap is actually smaller). I would wait for the new coordinate systems refactoring to be ready before implementing this.
  • The 3D case needs to be handled. I would add the implementation (and a corresponding Github issue to track) in the future, but I would already add all the if-else branches in the code that lead to these cases, with NotImplementedError()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing aggregation implementation and the dedicated points-by-labels issue (#209), then map each listed element combination and its multiscale variant. Check how rasterize() and the coordinate-systems refactoring affect differing resolutions, translations, and non-overlapping areas. Done means tests cover each supported case and 3D paths explicitly raise NotImplementedError where implementation is deferred.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.