How accurately should I store latitude and longitude?

后端 未结 7 540
囚心锁ツ
囚心锁ツ 2020-11-29 15:22

I was reading this question here:

What datatype to use when storing latitude and longitude data in SQL databases?

And it seems the general consensus is that

7条回答
  •  萌比男神i
    2020-11-29 16:13

    Accuracy versus decimal places at the equator

    decimal  degrees    distance
    places
    -------------------------------  
    0        1.0        111 km
    1        0.1        11.1 km
    2        0.01       1.11 km
    3        0.001      111 m
    4        0.0001     11.1 m
    5        0.00001    1.11 m
    6        0.000001   0.111 m
    7        0.0000001  1.11 cm
    8        0.00000001 1.11 mm
    

    ref : https://en.wikipedia.org/wiki/Decimal_degrees#Precision

提交回复
热议问题