Turf distance measurement doesn't match TurfJS
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 438
- Fork
- 117
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java và so sánh phép tính khoảng cách của nó với TurfJS, sau đó kiểm tra services-turf/src/test/java/com/mapbox/turf/TurfMeasurementTest.java. Xác định lý do các implementation tạo ra các giá trị khác nhau và cập nhật implementation hoặc các giá trị kỳ vọng để bài kiểm thử khoảng cách phản ánh hành vi TurfJS dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, javascript
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100