Skip to content
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

Port turf-line-intersect #37

Closed
1ec5 opened this issue Jan 20, 2018 · 2 comments
Closed

Port turf-line-intersect #37

1ec5 opened this issue Jan 20, 2018 · 2 comments
Labels
improvement Improvement for an existing feature. JS parity

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jan 20, 2018

There’s already a Turf.intersection(_:_:) method for calculating the intersection between two line segments, but it would be nice to support a more generalized turn-line-intersect.

/**
Returns the intersection of two line segments.
*/
public static func intersection(_ line1: LineSegment, _ line2: LineSegment) -> CLLocationCoordinate2D? {

turn-line-intersect optimizes the search for an intersection using RBush. We could port RBush, but first we should investigate other implementations already written in Objective-C or Swift. On iOS, macOS, and tvOS, GameplayKit’s GKRTree implements an R-tree.

/cc @frederoni @mourner

@1ec5 1ec5 added improvement Improvement for an existing feature. JS parity labels Jan 20, 2018
@okcoker okcoker mentioned this issue Mar 7, 2021
@1ec5
Copy link
Contributor Author

1ec5 commented Mar 15, 2021

On iOS, macOS, and tvOS, GameplayKit’s GKRTree implements an R-tree.

But note that this project also supports watchOS and Linux.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 13, 2022

Whoops, I filed #141 as a duplicate of this issue and it got implemented in #167. #171 tracks making it more efficient via a port of RBush.

@1ec5 1ec5 closed this as completed Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement for an existing feature. JS parity
Projects
None yet
Development

No branches or pull requests

1 participant