Turf distance measurement doesn't match TurfJS
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 438
- Fork
- 117
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java e confronta il relativo calcolo della distanza con TurfJS, quindi esamina services-turf/src/test/java/com/mapbox/turf/TurfMeasurementTest.java. Determina perché le implementazioni producono valori diversi e aggiorna l’implementazione o le aspettative in modo che il test della distanza rifletta il comportamento previsto di TurfJS.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, javascript
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100