Open-EO / Open-EO/openeo-python-client

Inconsistent and non-standard CRS handling for geometry arguments in DataCube

Open
#671 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api compliancy bug technical debt usability
Dominant language
Python
Stars
217
Forks
56
Avg merge
1d 22h
Merged PRs (30d)
2

Description

stumbled on this while working on #104:
https://github.com/Open-EO/openeo-python-client/blob/5a3e6f40cf5945ea885165db9845587435be66f0/openeo/rest/datacube.py#L1074-L1087

e.g. public facing from cube.aggregate_spatial(..., crs=...) and cube.mask_polygon(..., srs=...)

This CRS handling has some problems:

  • it's an ad-hoc, non-standard feature not present in official processes
  • it's inconsistent: sometimes it will apply (when geometry is client-side GeoJSON), sometimes it won't (e.g. back-end side vector cube)
  • it will ignore crs info already present in GeoJSON and will blindly overwrite it

I think we should get rid of this

Contributor guide

No contributing guide indexed for this repository

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 in openeo/rest/datacube.py at lines 1074-1087 and trace the geometry arguments used by aggregate_spatial and mask_polygon. Check how client-side GeoJSON and back-end-side vector cubes are handled, then verify that CRS metadata already present in GeoJSON is not overwritten and that the non-standard handling is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.