You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation splits thepassed features into lineStrings. Then, for each segment in feature2, rbush is used to search whether there are overlapping points to a segment from feature1. In principle, at least one point must lie within the bounding box of a feature1 segment. The bug is, that the tolerance parameter passed is not taken into account here.
Even if two segments are very close to each other and run parallel, no overlapping would be detected even if a generous tolerance value was selected.
In TurfDart, I have chosen the approach of increasing the bounding box by the tolerance. This allows us to find all segments that lie within the specified tolerance. For details see: line_overlap.dart
In this example, I have two LineStrings that run parallel to each other. The distance is 11.4km and if you pass a tolerance of 12km, I think lineOverlap should return a result. Admittedly the distance is quite long, the example is for demonstration purposes and also works at distances of a few meters.
smallsaucepan
changed the title
@turf/turf-line-overlap tolerance is not handled in every case
lineOverlap tolerance is not handled in every case
Mar 10, 2024
The current implementation splits thepassed features into lineStrings. Then, for each segment in feature2, rbush is used to search whether there are overlapping points to a segment from feature1. In principle, at least one point must lie within the bounding box of a feature1 segment. The bug is, that the tolerance parameter passed is not taken into account here.
Even if two segments are very close to each other and run parallel, no overlapping would be detected even if a generous tolerance value was selected.
In TurfDart, I have chosen the approach of increasing the bounding box by the tolerance. This allows us to find all segments that lie within the specified tolerance. For details see: line_overlap.dart
In this example, I have two LineStrings that run parallel to each other. The distance is 11.4km and if you pass a tolerance of 12km, I think lineOverlap should return a result. Admittedly the distance is quite long, the example is for demonstration purposes and also works at distances of a few meters.
The text was updated successfully, but these errors were encountered: