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

后端 未结 8 1250
醉酒成梦
醉酒成梦 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:38

    It really depends on how you are using the data. But in a gross over-simplification of the facts, decimal is faster but less accurate in aproximations. More info here:

    http://msdn.microsoft.com/en-us/library/aa223970(SQL.80).aspx

    Also, The standard for GPS coordinates is specified in ISO 6709:

    http://en.wikipedia.org/wiki/ISO_6709

提交回复
热议问题