TurfMeasurements should have a function for determining bearing deltas
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 438
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
TurfMeasurement.bearing(Point point1, Point point2
This function can return -180.0, 180.0.
In order to calculate the difference between two bearings. Downstream needs to create a normalizing function which can determine that the difference between -179.0 and 179.0, is 2 degrees.
double TurfMeasurements.shortestBearingDiff(double bearing1, double bearing2) {
...
}
This function should be proven with unit tests.
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 services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java, especially the bearing function referenced in the issue. Add the requested bearing-difference function and unit tests covering the -179.0 and 179.0 case, including the possible -180.0 and 180.0 results; done means the tests prove the shortest difference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100