-
Notifications
You must be signed in to change notification settings - Fork 179
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
GeometryCollection not allowed according to Item schema #1160
Comments
Hmm, indeed. It seems the GeoJSON Geometry schema is somewhat incomplete and we'd need to add the GeometryCollection schema separately... |
The GeometryCollection geometry type was intentionally left out, because it's not a widely supported geometry type, and the current GeoJSON spec recommends against the use of them: |
But still, the spec doesn't cover that and it would at least need a clarification in the Markdown then. Where is it discouraged though? I only see that they should not be nested? |
The language may have been updated, I've generally used the advice given in https://macwright.com/2015/03/23/geojson-second-bite.html#multi-geometries I think doing intersections with geometry collections may be more difficult implementation wise, as backends may not supported mixed geometry single queries. |
Yes, all agreed. We have also discouraged the usage in openEO etc, but we need to find a good way to disallow them in the Markdown then (is that breaking? Or is it not breaking because it's enforced by the schema?). :-) |
I think in the markdown we can still reference the RFC, but state that GeometryCollection is not supported, which is enforced by the schema. |
Discussed during the sprint: We don't allow GeometryCollection and remove it from the Item Spec Markdown. |
Just needs a PR and then can close @matthewhanson |
The section for the geometry field in item-spec.md refers to RFC 7946, section 3.1, which includes all seven geometry types, so I assume that the intent is that items can have a GeometryCollection.
In the JSON schema, the geometry field must be null or conform to https://geojson.org/schema/Geometry.json. However, this file only defines the six base geometry types and does not allow for the object to be a GeometryCollection.
Not sure if this is actually an issue with the GeoJSON schema but as things stand, items with a GeometryCollection as its geometry will not validate against the schema.
The text was updated successfully, but these errors were encountered: