Skip to content

Integrate previously prepared geometries into STRtree query / bulk query#246

Merged
brendan-ward merged 2 commits intopygeos:masterfrom
brendan-ward:issue235
Nov 15, 2020
Merged

Integrate previously prepared geometries into STRtree query / bulk query#246
brendan-ward merged 2 commits intopygeos:masterfrom
brendan-ward:issue235

Conversation

@brendan-ward
Copy link
Copy Markdown
Contributor

Resolves #235

The overall strategy is to fetch both the original and prepared geometry from the GeometryObject, and only prepare internally within evaluate_predicate if not previously prepared.

Checked with valgrind to make sure we're not leaving prepared geometries around accidentally.

I discovered and corrected an autoformatting issue with the doc string for evaluate_predicate, hence the larger number of lines changed (the autoformatter previously rolled all params into single paragraph, to avoid this I made them separated by lines).

@brendan-ward brendan-ward added the enhancement New feature or request label Nov 12, 2020
Copy link
Copy Markdown
Member

@caspervdw caspervdw left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Can you append the changelog? Then feel free to merge.

@brendan-ward brendan-ward added this to the 0.9 milestone Nov 15, 2020
@brendan-ward brendan-ward merged commit 9af5cc6 into pygeos:master Nov 15, 2020
@brendan-ward brendan-ward deleted the issue235 branch November 15, 2020 15:13
jorisvandenbossche pushed a commit to jorisvandenbossche/shapely that referenced this pull request Nov 29, 2021
Integrate previously prepared geometries into STRtree query / bulk query
jorisvandenbossche pushed a commit to jorisvandenbossche/shapely that referenced this pull request Nov 29, 2021
Integrate previously prepared geometries into STRtree query / bulk query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: update strtree.query_bulk to use previously prepared geometry if available

2 participants