booleanIntersects returns false for LineStrings that share a point
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
I'm using turf version 6.5.0.
booleanIntersects returns false for the following 2 LineStrings although they share a point:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[
13.3930069,
52.5275117
],
[
13.3928956,
52.5274816
]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[
13.392838775,
52.527573275
],
[
13.3928956,
52.5274816
]
]
}
}
]
}
Gist: http://geojson.io/#id=gist:mschilde/fc89dc38b2fd81d1e80add4fa93f34c9&map=22/52.52753/13.39292
Other touching LineStrings that also share a point are treated as intersecting and booleanIntersects returns true, e.g.
[
{
"type":"Feature",
"properties":{ },
"geometry":{
"type":"LineString",
"coordinates":[
[
13.3930069,
52.5275117
],
[
13.3928956,
52.5274816
]
]
}
},
{
"type":"Feature",
"properties":{},
"geometry":{
"type":"LineString",
"coordinates":[
[
13.3927809,
52.5274499
],
[
13.3928956,
52.5274816
]
]
}
}
]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the booleanIntersects implementation and reproduce the issue with the supplied LineString coordinates, comparing them with the second example that returns true. The fix is complete when LineStrings sharing the reported endpoint are recognized as intersecting and the existing behavior is preserved for the comparison case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100