Skip to content

TinyDB: fix spatial queries against null geometries#2209

Merged
tomkralidis merged 2 commits into
masterfrom
tinydb-query-nogeom
Jan 16, 2026
Merged

TinyDB: fix spatial queries against null geometries#2209
tomkralidis merged 2 commits into
masterfrom
tinydb-query-nogeom

Conversation

@tomkralidis

Copy link
Copy Markdown
Member

Overview

This PR fixes TinyDB spatial queries against features whose geometry is null.

Related Issue / discussion

geopython/demo.pygeoapi.io#72 (comment)

Additional information

None

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@tomkralidis

Copy link
Copy Markdown
Member Author

CI failure is unrelated/intermittent.

@pvgenuchten pvgenuchten left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it solves the case, just wondering if a try-except wouldn't be better, in case the geometry is not empty but invalid for example.

@tomkralidis

Copy link
Copy Markdown
Member Author

it solves the case, just wondering if a try-except wouldn't be better, in case the geometry is not empty but invalid for example.

Good idea @pvgenuchten. PR updated.

@tomkralidis
tomkralidis merged commit f98d5f9 into master Jan 16, 2026
6 checks passed
@tomkralidis
tomkralidis deleted the tinydb-query-nogeom branch January 16, 2026 10:55

@justb4 justb4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, also the test with null geom!

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

Labels

bug Something isn't working OGC API - Features OGC API - Features OGC API - Records OGC API - Records

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants