2

I'm saving latitude and longitude values in a MySQL. Right now I'm saving them as Varchar, but I wonder whether I'll be able to make queries for example to get Rows with latitude and longitude in a range so I can get results in a certain radio.

Should I use a different column type to store them?

lisovaccaro
  • 32,502
  • 98
  • 258
  • 410
  • possible duplicate of [What is the ideal data type for latitude / longitude?](http://stackoverflow.com/questions/159255/what-is-the-ideal-data-type-for-latitude-longitude) – Michael Berkowski Jan 22 '12 at 21:14
  • Would this: http://stackoverflow.com/questions/6188197/problem-storing-latitude-and-longitude-values-in-mysql-database answer your question? – Dmitri Jan 22 '12 at 21:15

2 Answers2

0

Use MySQL Spatial Extensions and GIS?

0

Depending on the precision your application requires, you would select from either Fixed-Point Types (Exact Value) or Floating-Point Types (Approximate Value).

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328