Correct datatype for latitude and longitude? (in activerecord)

前端 未结 6 1377
借酒劲吻你
借酒劲吻你 2021-01-30 03:07

Should I store latitude and longitude as strings or floats (or something else)?

(I\'m using activerecord / ruby on rails, if that matters).

Update:

Mysql

6条回答
  •  遇见更好的自我
    2021-01-30 03:41

    I would suggest using floats, although it doesn't really make that much of a difference. Floats are easier to do calculations on if you ever desire that in the future.

提交回复
热议问题