intersect used to work with points and lines, now only with polygons?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
I don't know if an example is needed, because this bug is documented here: https://turfjs.org/docs/#intersect
"Takes two polygons and finds their intersection..." (Emphasis mine.)
Apparently TurfJS intersect used to intersect properly as other GIS analysis libraries do. To quote the following question:
"In old turfjs versions, it was possible to intersect a line and a polygon, like in this example.
But changing the turf.js version to the last one makes it fail, as shown in this other example.
The docs say that the intersect function works only with two polygons, so the error is documented.
Is it possible to use some other function to do that? Is there any example around there showing how to do it?" (Emphasis mine.)
Is this ever planned to be fixed?
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 by reading the intersect documentation and comparing the old and current examples linked in the issue, then locate the intersect implementation and its existing tests. Determine whether line–polygon support is intended, and define done as either restoring that behavior with coverage or documenting the supported alternative; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100