Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Location
    Malaysia
    Posts
    24

    Unanswered: Latitude & Longitude in mysql

    hye,
    i'm using mysql version 5.0.17....
    i'm also using phpmyadmin as the interface....
    hope anyone can give me solution to this problem bcoz i'd never manage this kind of data b4...


    Question:
    - how should i store this latlong data in mysql?? is it in varchar or mysql have a data type dat support this latlong data(i've heard dat mysql support this kind of data but i don't know how )....
    - i 've seen in one of mysql forum...but they use float as data type...

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    traditionally Lattitude & Longitude are expressed as degrees, minutes & seconds, however that isn't the most sensible way of stroing the data.

    The float datatype, of double precision woul dbe appropiate, you will need to create a function in your user interface to convert from a decimal number into the latitude & longitude display.

    There may even be a freely available MYSQL native function to dot his for you.

    As you are using version 5 of MySQL you could do it as part of a stroed procedure (you woulkd need 2, one to convert each way).
    HTH
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2004
    Location
    Malaysia
    Posts
    24
    thanx 4 d solution....
    Learn from the expert and be the best

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •