Alex Rivera | Logout

What is the ideal data type to use when storing latitude / longitude in a MySQL database?

Asked 2008-10-01T19:18:13.960
502

Bearing in mind that I'll be performing calculations on lat / long pairs, what datatype is best suited for use with a MySQL database?

Edit
Report

1 Answer

8

We store latitude/longitude X 1,000,000 in our oracle database as NUMBERS to avoid round off errors with doubles.

Given that latitude/longitude to the 6th decimal place was 10 cm accuracy that was all we needed. Many other databases also store lat/long to the 6th decimal place.

answered 2008-10-19T01:45:25.267

Your Answer