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

clarification of allowed GeoJSON types in load_collection/load_stac #527

Open
soxofaan opened this issue Jan 24, 2025 · 2 comments
Open

Comments

@soxofaan
Copy link
Member

"name": "spatial_extent",
"description": "Limits the data to load from the collection to the specified bounding box or polygons.\n\n* For raster data, the process loads the pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC).\n* For vector data, the process loads the geometry into the data cube if the geometry is fully *within* the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC). Empty geometries may only be in the data cube if no spatial extent has been provided.\n\nThe GeoJSON can be one of the following feature types:\n\n* A `Polygon` or `MultiPolygon` geometry,\n* a `Feature` with a `Polygon` or `MultiPolygon` geometry, or\n* a `FeatureCollection` containing at least one `Feature` with `Polygon` or `MultiPolygon` geometries.\n* Empty geometries are ignored.\n\nSet this parameter to `null` to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using ``filter_bbox()`` or ``filter_spatial()`` directly after loading unbounded data.",

The GeoJSON can be one of the following feature types:

  • A Polygon or MultiPolygon geometry,
  • a Feature with a Polygon or MultiPolygon geometry, or
  • a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries.
  • Empty geometries are ignored.

The statement "FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries" leaves open an interpretation where it is fine to have point/line geometries in the feature collection as long as there is at least one feature with a polygon.
However, I think the intention is to only have polygon geometries, right?

proposal to change that to something like

a FeatureCollection containing at least one Feature; where each Feature has a Polygon or MultiPolygon geometry.

@soxofaan
Copy link
Member Author

cc @bossie

@bossie
Copy link

bossie commented Jan 24, 2025

In particular I'm also wondering about this (possibly outdated) issue where support for a FeatureCollection of Points is requested, but that is not allowed by the rules above AFAICT.

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

No branches or pull requests

2 participants