-
Notifications
You must be signed in to change notification settings - Fork 6
Convert the orient predicate to AdaptivePredicates + minor predicate changes #275
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
Conversation
b52ef6c
to
f2d90a8
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Graphite looks very good, I should start using too. And this looks good to me, accurate is good, we can make it faster later. |
AdaptivePredicates is at least 10x if not 40x faster than exact predicates :D |
Yeah, I'm referring to the missing fast returns |
f2d90a8
to
974a162
Compare
974a162
to
5b0c4a1
Compare
5b0c4a1
to
c36826d
Compare
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.