Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter geometry loading from DataCube.aggregate_spatial #581

Closed
soxofaan opened this issue Jun 25, 2024 · 3 comments
Closed

Smarter geometry loading from DataCube.aggregate_spatial #581

soxofaan opened this issue Jun 25, 2024 · 3 comments

Comments

@soxofaan
Copy link
Member

soxofaan commented Jun 25, 2024

DataCube.aggregate_spatial(geometries) and DataCube.filter_spatial(geometries) currently allows geometries to be a string or pathlib.Path, but then it assumes this is a backend-side path and "loads" this with non-standard read_vector.

It would be better (more user friendly, and more standard) to be a bit smarter here:

  • check if the string is a GeoJSON dump and load it like that
  • check if the string/path is a valid local (GeoJSON) file and load geometry from that

Also

  • start deprecating the current read_vector code path
  • share this feature with other geometry related processes
  • document this feature better
@soxofaan
Copy link
Member Author

(this was triggered from https://discuss.eodc.eu/t/aggregate-spatial/766)

@jdries
Copy link
Collaborator

jdries commented Nov 22, 2024

This looks like low hanging fruit that can solve some issues.
The client can also be smart about injecting a 'load_geojson' process, if that is supported by the backend. That way, users automatically get the 'preferred' behaviour and avoid deprecation warnings from the backend.

@ElienVandermaesenVITO
Copy link
Contributor

ElienVandermaesenVITO commented Jan 2, 2025

Changes are made with issue #104

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

No branches or pull requests

3 participants