Skip to content

Refactor STRtree implementation to store geoms/idx sequences instead of reverse mapping#1177

Merged
jorisvandenbossche merged 1 commit intoshapely:masterfrom
jorisvandenbossche:strtree-refactor
Aug 21, 2021
Merged

Refactor STRtree implementation to store geoms/idx sequences instead of reverse mapping#1177
jorisvandenbossche merged 1 commit intoshapely:masterfrom
jorisvandenbossche:strtree-refactor

Conversation

@jorisvandenbossche
Copy link
Copy Markdown
Member

@jorisvandenbossche jorisvandenbossche commented Aug 3, 2021

This PR takes the implementation details from #1064 (i.e. using geoms and idxs sequences (lists) to store the data with which the GEOSSTRtree gets created, instead of using a mapping), but cleanly on top of the new interface (query_geoms/query_items) from #1112, without all the discussion on the interface from #1064.

It doesn't change any user facing API now after #1112, but only refactors the implementation (how to store the items). As mentioned in #1112 (comment), this version is closer to what we would do in the shapely-2.0 branch on top of the C-based STRtree (which I started in #1161). IMO it is useful to already do this now (it will also make it a bit easier to have the master and shapely-2.0 branches next to each other for a while).

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 85.31% when pulling 6a10369 on jorisvandenbossche:strtree-refactor into 9a76173 on Toblerity:master.

@jorisvandenbossche
Copy link
Copy Markdown
Member Author

cc @sgillies what do you think about this PR?

Copy link
Copy Markdown
Contributor

@sgillies sgillies left a comment

Choose a reason for hiding this comment

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

👍 thanks @jorisvandenbossche !

@sgillies
Copy link
Copy Markdown
Contributor

I'll merge and then we could have another pre-release on Monday.

@sgillies sgillies mentioned this pull request Aug 20, 2021
@jorisvandenbossche jorisvandenbossche merged commit c047f49 into shapely:master Aug 21, 2021
@jorisvandenbossche jorisvandenbossche deleted the strtree-refactor branch August 21, 2021 17:17
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

Successfully merging this pull request may close these issues.

3 participants