View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 09:36 AM
Peter H. Coffin
 
Posts: n/a
Default Re: Best Field Type for Latitude & Longitude

On 16 Nov 2006 16:26:03 -0800, lucanos@gmail.com wrote:
> Hi All,
>
> I am still trying to understand the field types available in MySQL, so
> I am hoping to be able to call upon the experience and knowledge of you
> guys to try and get my head around this.
>
> I am trying to figure out which field type to use when storing Latitude
> and Longitude values.
> The field type would need to be able to handle numbers between -180 and
> 180, out to about 8 decimal spaces (maybe more).


What are you recording? There's less than 400,000 feet in a degree of
longitude. 8 decimal points would put you down to about 1/8th of an
inch, and I'd laugh in your face if you told me you have a device in
your pocket that can measure that accurately to any point on the planet.

For most purposes, if you can get *four* decimal points, you're close
enough.

> I realise that this is a simple question, but I would appreciate any
> help you can give.


Maybe the spatial extentions might help you:

http://dev.mysql.com/doc/refman/5.0/...xtensions.html

--
79. If my doomsday device happens to come with a reverse switch, as soon as it
has been employed it will be melted down and made into limited-edition
commemorative coins.
--Peter Anspach's list of things to do as an Evil Overlord
Reply With Quote