Skip to content

add support for predefinedtilegrid in split_area #883#886

Open
VincentVerelst wants to merge 16 commits intomasterfrom
883-predefined-tilegrid-splitter
Open

add support for predefinedtilegrid in split_area #883#886
VincentVerelst wants to merge 16 commits intomasterfrom
883-predefined-tilegrid-splitter

Conversation

@VincentVerelst
Copy link
Copy Markdown
Collaborator

@VincentVerelst VincentVerelst commented Apr 2, 2026

The idea is to expose the split_area function to users. Users can provide an AOI, which can be split in different ways:

  • By providing a projection and tile_size: splits the AOI up in square tiles
  • By providing a PredefinedTileGrid (can also be a geopandas.GeoDataFrame), which splits the AOI according to that grid
  • By providing a custom subclass of TileGridInterface: splits the AOI according to their custom class

The function returns the split AOI as a geopandas.GeoDataFrame

@VincentVerelst VincentVerelst requested a review from HansVRP April 2, 2026 15:11
Copy link
Copy Markdown
Contributor

@HansVRP HansVRP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments and questions

Comment thread openeo/extra/job_management/_job_splitting.py Outdated
Comment thread openeo/extra/job_management/_job_splitting.py Outdated
Comment thread setup.py
Comment thread openeo/extra/job_management/_job_splitting.py
Comment thread openeo/extra/job_management/_job_splitting.py
Comment thread openeo/extra/job_management/_job_splitting.py Outdated
Comment thread openeo/extra/job_management/_job_splitting.py Outdated
Comment thread tests/extra/job_management/test_job_splitting.py
Comment thread openeo/extra/job_management/_job_splitting.py Outdated
Comment thread tests/extra/job_management/test_job_splitting.py
@VincentVerelst VincentVerelst requested a review from HansVRP April 8, 2026 14:27
@VincentVerelst
Copy link
Copy Markdown
Collaborator Author

@HansVRP , except for addressing your comments, one big change: there is now a standardized reprojecting happening to the CRS of the tile grid that is being used for splitting.

To re-iterate what will be exposes to the public API: the split_area function now takes as input an AOI, which can be split in either of two ways:

  • By providing a tile-grid as geopandas.GeoDataFrame or a list of (Multi)Polygon. In the background _PredefinedTileGrid will be used for splitting
  • By providing a projection and tile_size. In the background _SizeBasedTileGrid will be used for splitting. The origin will be taken to be the bottom-left of the AOI provided by the user.

Advanced users can always define their own splitting method by defining a subclass of _TileGridInterface, which is still experimental and prone to change

@HansVRP
Copy link
Copy Markdown
Contributor

HansVRP commented Apr 9, 2026

will look into the update; thanks.

can you also include a usecase example in: https://github.com/Open-EO/openeo-python-client/blob/master/docs/cookbook/job_manager.rst ?

Comment thread openeo/util.py

# TODO: provide west, south, east, north, crs as @properties? Read-only or read-write?

def as_polygon(self) -> shapely.geometry.Polygon:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soxofaan okay to add this here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants