-
Notifications
You must be signed in to change notification settings - Fork 180
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
Geometry validation error on Item spec #1164
Comments
Indeed, the spec says
but it is missing a constraint that it should not be specified if geometry is null. |
Yep, I agree. I believe the intention was that if you have a bbox, you must also provide a geometry with at least the extent of the bounding box. The JSON Schema seems to already follow this, but we'll likely need to clarify this in the written spec. Or do people prefer to fix the JSON Schema? @cholmes Anyway, to "solve" the issue in 1.0.0, you'd need to provide a geometry that is equivalent to the bbox. |
Yes @m-mohr, the problem was found "explorating" the schema, it is clear that with a full geometry everything works fine. Also, the clause:
doesn't really seem to be working, but I don't know if it is a problem with the validator or something else. |
@matthewhanson To do the Markdown PR, @m-mohr to do the JSON Schema. If there is a bbox you must have a geometry. We couldn't find a use case for having a bbox and not a geometry as you could always provide the bbox also as geometry. If you have use cases, please let us know. |
I agree that updating the written spec to state that It seems to be like the JSON schema is already enforcing this. |
It seems like the written spec is correct on the dev branch: |
Good catch, thanks! |
So we can close this? :-) |
Hi,
I'm getting an error using the item schema (https://github.com/radiantearth/stac-spec/blob/master/item-spec/json-schema/item.json)
I'm trying to create an item with a geometry equal to null, but with a populated bbox.
Looking at the definition it should work, but i'm getting back this error:
I'm using a Draft7 compliant validator (https://github.com/Julian/jsonschema)
Any hint for how to address this problem?
The text was updated successfully, but these errors were encountered: