Database/SQL: How to store longitude/latitude data?

后端 未结 8 1241
醉酒成梦
醉酒成梦 2020-12-07 10:03

Performance question ...

I have a database of houses that have geolocation data (longitude & latitude).

What I want to do is find the best way to store t

8条回答
  •  死守一世寂寞
    2020-12-07 10:43

    I would store it as integers (int, 4-bytes) represented in 1/1,000,000th degrees. That would give you a resolution of few inches.

    I don't think there is any intrinsic spatial datatype in MySQL.

提交回复
热议问题