locationtech / locationtech/spatial4j
WithinDistanceCalculator
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 961
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
For most distance calculation methods, there is redundant math being performed when the formula is being used to check if a point is within a circle, many times over. Addressing this is an API issue. The DistanceCalculator abstraction as it is currently formed isn't so great. Perhaps instead it should be named WithinDistanceCalculator and you initialize it with a point and distance. Not only would LawOfCosines benefit, but the others would too.
See #80.
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 DistanceCalculator abstraction and the LawOfCosines implementation, then review the related discussion in issue #80. Compare the distance calculation methods to identify the repeated work involved in within-circle checks. Done means the API direction is settled and the affected calculators consistently support the proposed within-distance use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100