lineOverlap does not recognize partially overlaps
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start by reproducing the supplied GeoJSON example through the lineOverlap and booleanOverlap entry points, then inspect how they determine whether one segment is completely covered. Done means partial overlaps such as the shared green section are recognized by both functions, with the existing example still behaving correctly.
Written by the indexing model from the issue text.
Description
The lineOverlap function currently does not recognize when two lines partially overlap. This also affects booleanOverlap.
You can see it in this example:
The blue and red lines clearly overlap in the green area. However, this is not recognized because the implementation can currently only recognize an overlap if a segment is completely overlapping.
- Example on geojson.io
- Playground on jsfiddle
- GeoJson:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"stroke": "#0F0",
"fill": "#0F0",
"stroke-width": 25
},
"geometry": {
"type": "LineString",
"coordinates": [
[120, -25],
[150, -25]
]
}
},
{
"type": "Feature",
"properties": {
"stroke": "#F00",
"fill": "#F00",
"stroke-width": 10,
"stroke-opacity": 1,
"fill-opacity": 0.1
},
"geometry": {
"type": "LineString",
"coordinates": [
[120, -25],
[160, -25]
]
}
},
{
"type": "Feature",
"properties": {
"stroke": "#00F",
"fill": "#00F",
"stroke-width": 3,
"stroke-opacity": 1,
"fill-opacity": 0.1
},
"geometry": {
"type": "LineString",
"coordinates": [
[110, -25],
[150, -25]
]
}
}
]
}
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
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.
More from Turfjs/turf
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
@turf/boolean-contains
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·