Adding tolerance to @turf/boolean-point-on-line
Open
Nobody has claimed this yet.
@turf/boolean-point-on-line
enhancement
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
A couple of days ago @DenisCarriere raised the possibility of adding a tolerance threshold to @turf/boolean-point-on-line. Currently the point has to be exactly on the line, there is 0 margin for error.
A few finds from my investigations
- As far as I can work out the current algorithm doesn't really support adding in a tolerance check
- I did find a pretty neat algorithm for finding the distance between a point and a line here
- we don't really have a module for this currently, is this something we'd like to package up @DenisCarriere ?
- this is quite a bit slower than the current algorithm (eg half the number of ops per sec) but if it only got called when the tolerance threshold was set that might be acceptable...
- there are a couple of other potential options that I'd like to explore still that would be an entire replacement
I knew I should've paid more attention in maths!
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 @turf/boolean-point-on-line entry point and review the linked point-to-line distance algorithms and the existing implementation. The issue does not name files or tests, and completion is not defined beyond exploring a tolerance approach and deciding whether a reusable distance module is appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100