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

Why are null geometries not allowed? #325

Open
McSurf84 opened this issue Nov 26, 2024 · 2 comments
Open

Why are null geometries not allowed? #325

McSurf84 opened this issue Nov 26, 2024 · 2 comments

Comments

@McSurf84
Copy link

The stac-spec says that the geometry of an item may also be null - see stac-spec.

However, the migration for the database sets the geometry field to NOT NULL at pgstac.0.9.1.sql#L2030 and it is therefore not possible to create items with a zero geometry.

Does this have a deeper meaning or why is NULL not allowed?

If this is not intention, I would create a pull request to change this.

@bitner
Copy link
Collaborator

bitner commented Dec 5, 2024

I believe that earlier in the stac spec, geometry may have been required.

I'm happy to take a PR to remove that constraint, but I would warn that it may be more work that just removing that constraint as some of the transformations to and from the table layout to json may be making the assumption that a geometry always exists.

@vprivat-ads
Copy link

vprivat-ads commented Dec 17, 2024

I ran the tests without the NULL constraint and no error is reported: https://github.com/vprivat-ads/pgstac/pull/1/checks

But I guess we are far from having a complete coverage?

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

3 participants