Turf distance measurement doesn't match TurfJS
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 438
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java から始め、その距離計算を TurfJS と比較し、次に services-turf/src/test/java/com/mapbox/turf/TurfMeasurementTest.java を調べます。実装によって異なる値が生成される理由を特定し、距離テストが意図された TurfJS の動作を反映するように、実装または期待値を更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, javascript
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100