-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
PreparedGeometry
to speed up repeated Relate
operations.
Much of the cost of the `Relate` operation comes from finding all intersections between all segments of the two geometries. To speed this up, the edges of each geometry are put into an R-Tree. We also have to "self node" each geometry, meaning we need to split any segments at the point that they'd intersect with an edge from the other geometry. None of that work is new to this commit, but what is new is that we now cache the self-noding work and the geometry's r-tree. relate prepared polygons time: [49.036 ms 49.199 ms 49.373 ms] relate unprepared polygons time: [842.91 ms 844.32 ms 845.82 ms]
- Loading branch information
1 parent
f64ae17
commit 9452543
Showing
22 changed files
with
681 additions
and
275 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
mod edge_set_intersector; | ||
mod prepared_geometry; | ||
mod rstar_edge_set_intersector; | ||
mod segment; | ||
mod segment_intersector; | ||
mod simple_edge_set_intersector; | ||
|
||
pub(crate) use edge_set_intersector::EdgeSetIntersector; | ||
pub(crate) use rstar_edge_set_intersector::RstarEdgeSetIntersector; | ||
pub use prepared_geometry::PreparedGeometry; | ||
pub(crate) use rstar_edge_set_intersector::RStarEdgeSetIntersector; | ||
pub(crate) use segment::Segment; | ||
pub(crate) use segment_intersector::SegmentIntersector; | ||
pub(crate) use simple_edge_set_intersector::SimpleEdgeSetIntersector; |
Oops, something went wrong.