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

Semantics for 1d bbox or "bad" geojson geometries #390

Closed
philvarner opened this issue Feb 11, 2023 · 2 comments · Fixed by #394
Closed

Semantics for 1d bbox or "bad" geojson geometries #390

philvarner opened this issue Feb 11, 2023 · 2 comments · Fixed by #394

Comments

@philvarner
Copy link
Collaborator

Question filed against OGC API here:

Prompted by:

Questions:

Bbox:

  • Is a 1d bbox valid? In implementation, this could be handled by converting the bbox to either a Point or LineString geometry for query against the database.

Intersects geometry:

  • What's considered an invalid geometry? Currently there's no language like "implementations may reject geometries that have semantic problems like self-crossing at their discretion with a 400 and an informative error message".
  • Polygons that have an "obvious" self-crossing are invalid, but are two identical sequential points a self-crossing? These are rejected by Elasticsearch & OpenSearch for this reason, so it seems they should be.
@philvarner philvarner added this to the 1.0.0-rc.3 milestone Feb 11, 2023
@philvarner
Copy link
Collaborator Author

WRT to bboxes, Clemens said language was added to the corrigendum that states that degenerate bboxes are allowed, and should be treated with point or linestring semantics. This should be clarfied in the spec so implementers will remember to handle this case. E.g., in stac-server, bboxes are converted to Polygon for search, but a Polygon with multiple identical sequential points is rejected by ES/OpenSearch, so these have to be handles specially.

@philvarner
Copy link
Collaborator Author

After discussion at the STAC meetup 2023-Feb-13: add some language around the fact that implementions are allowed to reject what they consider semantically-invalid geometries. For example, OpenSearch rejects self-crossing polygons and polygons with sequential duplicate coordinates (which could be considered either self-crossing or not forming a line between them.)

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

Successfully merging a pull request may close this issue.

1 participant