Skip to content

Prepared geometry #278

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

Open
wants to merge 4 commits into
base: as/trees
Choose a base branch
from
Open

Prepared geometry #278

wants to merge 4 commits into from

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Mar 9, 2025

This is on top of the trees PR, to enable prepared geometry. The idea is that we should be able to do index = get(geometry, EdgeTreeLike, NaturalEdgeTree) and have it give us some form of edge tree we can query.

Prepared geoms will be structured as wrappers, with a single geom field and then a tuple of "preparations". Note that this can't influence the underlying geometry memory layout at all - although Prepared will default to calling tuples, maybe deactivated by a keyword tuples = false.

Preparations need to have a desired application trait / level. It's a bit tricky because things like STRtrees can apply at the polygon level, multipolygon level, and at the level of individual polygon rings (might be useful for things like a country with a lot of lakes).

We should be able to "get" or instantiate a preparation by get(geom, SpatialIndexLike#=or trait=#, STRIndex) for example, since most algorithms that can be accelerated only care that you have an accelerator, not how you got it. And the main part of the runtime is creating the index anyway.

Copy link
Member Author

asinghvi17 commented Mar 9, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@asinghvi17 asinghvi17 marked this pull request as ready for review March 9, 2025 20:27
@asinghvi17 asinghvi17 changed the base branch from as/trees to graphite-base/278 April 16, 2025 20:38
@asinghvi17 asinghvi17 changed the base branch from graphite-base/278 to as/trees April 16, 2025 21:26
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.

1 participant