คำถามติดแท็ก geography


6
รับระยะทางระหว่างจุดสองจุดโดยอิงตามละติจูด / ลองจิจูด
ฉันพยายามใช้สูตรนี้: http://andrew.hedges.name/experiments/haversine/ aplet ทำงานได้ดีสำหรับสองประเด็นที่ฉันกำลังทดสอบ: แต่รหัสของฉันไม่ทำงาน from math import sin, cos, sqrt, atan2 R = 6373.0 lat1 = 52.2296756 lon1 = 21.0122287 lat2 = 52.406374 lon2 = 16.9251681 dlon = lon2 - lon1 dlat = lat2 - lat1 a = (sin(dlat/2))**2 + cos(lat1) * cos(lat2) * (sin(dlon/2))**2 c = 2 * …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.