Turf distance measurement doesn't match TurfJS
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java, javascript
- Domain
- backend
Research direction
Start with services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java and compare its distance calculation with TurfJS, then inspect services-turf/src/test/java/com/mapbox/turf/TurfMeasurementTest.java. Determine why the implementations produce different values and update the implementation or expectations so the distance test reflects the intended TurfJS behavior.
Written by the indexing model from the issue text.
Description
I am trying to port transformRotate from Turf.JS as I need it for a project.
In the method comments there are some examples with the expected result, my port didn't match. In trying to debug this I've noticed that the distance tests don't match between JS and the Java port.
The standard test points [-75.343,39.984][-75.534, 39.123] used the km distance in TurfJS is 97.12922118967835
Those same points are tested in the port but the expected result is different: 97.15957803131901
This third party suggests TurfJS is correct.
I've noticed Earth radius is different between the implementations so I guess this is the why
I see JS nearly changed to the same value for earth's radius but got reverted.
Is there a reason the port doesn't produce the same result as the original?
- Dominant language
- Java
- Stars
- 438
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
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 mapbox/mapbox-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mapbox/mapbox-java#1640 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
mapbox/mapbox-java#1635 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapbox/mapbox-java#1619 ·
-
Mapbox-java incompatible with gson 2.13.0 and up - call to internal GSON classes that were renamed Open
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
mapbox/mapbox-java#1614 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
mapbox/mapbox-java#1612 · 1 reaction ·
All issues in mapbox/mapbox-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FasterXML/jackson-databind#6229 ·