Skip to content

Use bbox intersection logic for rectangles - #2326

Merged
karussell merged 2 commits into
graphhopper:masterfrom
otbutz:bbox_contains
May 28, 2021
Merged

karussell merged 2 commits into
graphhopper:masterfrom
otbutz:bbox_contains

Conversation

@otbutz

@otbutz otbutz commented May 18, 2021

Copy link
Copy Markdown
Contributor

If a polygon describes a rectangle, we don't need to load the way geometry to check for an intersection.
This should be especially beneficial for large areas, for which we previously had to load all intersecting edge geometries.

@otbutz

otbutz commented May 28, 2021

Copy link
Copy Markdown
Contributor Author

@karussell any objections?

@karussell karussell added this to the 4.0 milestone May 28, 2021
@karussell

karussell commented May 28, 2021 •

Copy link
Copy Markdown
Member

Looks good - thank you!

(There could be rare problems with this approach in general, when the bbox of the tower nodes is smaller than the bbox of the entire geometry, but this is not a new problem and tricky to make fast without storing the bbox for every edge.)

@karussell
karussell merged commit a72004c into graphhopper:master May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants