Convert the orient predicate to AdaptivePredicates + minor predicate changes#275
Merged
asinghvi17 merged 3 commits intomainfrom Apr 17, 2025
Merged
Convert the orient predicate to AdaptivePredicates + minor predicate changes#275asinghvi17 merged 3 commits intomainfrom
asinghvi17 merged 3 commits intomainfrom
Conversation
This was referenced Mar 4, 2025
b52ef6c to
f2d90a8
Compare
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 4, 2025
Member
|
Graphite looks very good, I should start using too. And this looks good to me, accurate is good, we can make it faster later. |
Member
Author
|
AdaptivePredicates is at least 10x if not 40x faster than exact predicates :D |
Member
|
Yeah, I'm referring to the missing fast returns |
f2d90a8 to
974a162
Compare
974a162 to
5b0c4a1
Compare
5b0c4a1 to
c36826d
Compare
asinghvi17
added a commit
that referenced
this pull request
Apr 3, 2025
This was factored out of the "dev branch" #259 and contains the subset of changes that apply to GeometryOpsCore, for easier review. Child PRs: #271 (TGGeometry) -> #275 (AdaptivePredicates) -> #273 (clipping algorithm type) -> #274 (trees) - Use [StableTasks.jl](https://github.com/JuliaFolds2/StableTasks.jl) in apply and applyreduce - its type-stable tasks save us some allocations! - Remove `Base.@assume_effects` on the low level functions, which caused issues on Julia v1.11 and was probably incorrect anyway - Add an algorithm interface with an abstract supertype `Algorithm{M <: Manifold}`, as discussed in #247. Also adds an abstract Operator supertype and some discussion in code comments, but no implementation or interface surface there yet. - Split out `types.jl` into a directory `types` with a bunch of files in it, for ease of readability / docs / use. - (out of context change): refactor CI a bit for cleanliness. TODOs for later (not this PR): - [ ] Add a `format` method that takes in an incompletely specified algorithm and some geometry as input, and returns a completely specified algorithm. What does this mean? Imagine I call `GO.intersection(FosterHormannClipping(), geom1, geom2)`. That `FosterHormannClipping()` should get expanded to `FosterHormannClipping(AutoAlgorithm(), AutoAccelerator())`. Then, `format` will take `format(alg, args...)` and: - get the `crstrait` of the two geometries, scan for incompatibilities, assign the correct manifold to the algorithm (maybe warn or emit debug info) - if no geometries available, get the manifold via `best_manifold(::Algorithm)`. - maybe inflate the accelerator by checking `npoint` and later preparations to see what's most efficient, maybe not - depends on what we want!
bb1ded5 to
80ef751
Compare
62187d6 to
e29badb
Compare
08f7ef4 to
94fe7e2
Compare
e29badb to
23080c1
Compare
9e50abe to
7dac5d7
Compare
7dac5d7 to
87920f7
Compare
9ecce31 to
46c6b02
Compare
87920f7 to
7b5c4ef
Compare
https://github.com/JuliaGeometry/AdaptivePredicates.jl is a library that implements adaptive predicates - substantially faster, BUT harder to construct, than exact predicates. Adaptive predicates are valid through the range of coordinates that geometries usually have, but we may need exact predicates if they are not.
This should increase speed although we will have to benchmark. Still, at least it's benchmarkable now.
Only one of the geoms in g2 MUST touch the geom in g1, all others MUST be disjoint or touching. This could potentially be accelerated by building an STRtree if the query width is long enough, or we may also need some tree interface / preparation here. E.g. Canada has a lot of islands that a tree approach could get rid of.
7b5c4ef to
97015f9
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Spun out from #259
Replaces #272 (which was a bad branch name)
Parent: #271 (TG geometry and algorithm implementations for GEOS and PROJ)
Children: #273 (clipping changes and passthrough) -> #274 (trees)
https://github.com/JuliaGeometry/AdaptivePredicates.jl is a library that implements adaptive predicates - substantially faster, BUT harder to construct, than exact predicates. Adaptive predicates are valid through the range of coordinates that geometries usually have, but we may need exact predicates if they are not.