-
Notifications
You must be signed in to change notification settings - Fork 4
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
Geometry corrections (unofficial dev branch) #69
Conversation
* Add geometry correction framework * Basic benchmarking * Fix example in ClosedRing * Fix the geometry correction interface * Add benchmarks! * fix doc build * fix again * Literatify with Documenter.jl * Add all necessary packages to `docs/Project.toml` * Minor fixes * Fix typo in utils script * OGC benchmarks * Add a couple more benchmarks, don't actually execute on CI * Yet more benchmarks * Correct type instability when using booleans-as-types in `threaded` * Add `within` benchmark * More benchmarks!
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.
Looks good overall! Excited to have this on its way. We should add some tests though.
The type instability fix from here also exists in #74 so I'll make this one purely about geometry corrections |
* CompatHelper: add new compat entry for Statistics at version 1, (keep existing compat) (#70) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> * Add segmentization * Fix method ambiguity and benchmarks * Squash type instabilities and get the benchmark going * Fix plot in display * Apply suggestions from code review Co-authored-by: Rafael Schouten <rafaelschouten@gmail.com> * Add tests * Add benchmark plotting functionality to docs * In-file benchmark for simplify * Reorganize the polygonize file to use multiline comments * get tests running * Fix area for linear rings * Fix segmentize doubling points unnecessarily * Fix some simplify test errors * Add benchmark plots file to the top level * Switch area for linear rings back to 0 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: Rafael Schouten <rafaelschouten@gmail.com>
I guess this is the dev branch now :D. It will be ideal to rebase and merge instead of squashing, since this touches a lot of code and I want to keep the history intact if possible. |
This implements a package extension for Proj and avoids us having to depend explicitly on it. With this, GeometryOps has no explicit dependencies on C libraries! We might also extend the `reproject` interface to allow e.g. FastGeoProjections and other projection interfaces. The issue with this is that the GeodesicSegments struct holds a Proj.geod_geodesic object. That field is currently untyped, we may choose to type it and only accept GeodesicSegments{Proj.geod_geodesic} in principle.
When I was profiling a case of `intersection` between two polygons with holes, I noticed that a LOT of time was spent on the calls to `ExactPredicates.meets`. It is generated code and for some reason didn't seem to be doing that efficiently. That can be seen in the left and right (type stable) towers below: ![](https://github.com/asinghvi17/GeometryOps.jl/assets/60117338/6f7ce2ca-e7d4-4752-81f7-da973df07d43) Here was the performance with `ExactPredicates`: ![](https://github.com/asinghvi17/GeometryOps.jl/assets/60117338/74f4ed4e-7949-46c2-8c1f-c14c71f4bfac) I realized that I had code that was serving a similar purpose with `segment_segment_orientation` and that if I developed the `_intersection_points` code to cover all cases, then we had all of the needed functionality. After removing `ExactPredicates`, here is the performance of the same polygons: ![](https://github.com/asinghvi17/GeometryOps.jl/assets/60117338/9475b9ba-1f1c-4b1a-b5fc-d70a37d92da9) You can see my issue on the type instability in the above profile in #73. Co-committed-by: Skylar Gering <sgering@g.hmc.edu>
Try to fix doc benchmark issue More benchmark fixes Solve import error Add Proj to docs/Project.toml Add CoordinateTransformations to Docs project.toml Import CairoMakie into simplify to solve the build issue Fix simplify execution Implement doc benchmarks for segmentize
81b127c
to
9a751a0
Compare
…oint It needs more optimization as well, which can happen later...
I think I'm pretty much done with what I want to accomplish here! IMO this is mergeable as is - what do you think @rafaqz @skygering? Change log:New features
Code changes
|
These are the geometry correction and type stability changes forked out from #64.