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

disallow Points #356

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bossie
Copy link
Collaborator

@bossie bossie commented Jan 24, 2025

@bossie bossie linked an issue Jan 24, 2025 that may be closed by this pull request
@bossie bossie linked an issue Jan 31, 2025 that may be closed by this pull request
@bossie bossie linked an issue Feb 6, 2025 that may be closed by this pull request
Copy link
Contributor

@jdries jdries left a comment

Choose a reason for hiding this comment

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

minor remark, seems fine otherwise

return _contains_polygon(geojson["geometry"])

if geojson["type"] == "FeatureCollection":
return any(_contains_polygon(feature) for feature in geojson["features"])
Copy link
Member

Choose a reason for hiding this comment

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

given Open-EO/openeo-processes#527 / Open-EO/openeo-processes#528 I think that should be all instead of any

(and the function should be named _contains_only_polygons)

if geojson["type"] == "FeatureCollection":
return any(_contains_polygon(feature) for feature in geojson["features"])

if geojson["type"] == "GeometryCollection":
Copy link
Member

Choose a reason for hiding this comment

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

I would not add support for this deprecated type, or is it necessary because we still coerce to GeometryCollection in several other places unfortunately?

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.

disallow Points in load_collection/load_stac
3 participants