Re: GIS In MySQL Database

"Dr. Virginia R. Hetrick" <[email protected]>
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
Hi, folks -

Having worked with GIS for 37 years, I'd like to make a suggestion on this
subject:

Consider what you want to do with the data whenever you retrieve the
long/lat from the database.  Do you want to find nominal distances between
points?  Do you want to represent the data as DMS when giving the long/lat
for a place?  Both?

If the nominal distance is required, I'd save the data as a float (possibly
double depending on the accuracy) because you're going to wind up having to
convert from DMS to decimal representations in order to do the proper
calculations.  Might as well have 30.12345 (or whatever) already in a
decimal format.

If you just want to display the long/dat in some other context, for example,
location name followed by the long/lat, then representing it as a char
probably makes sense.  Varchar in this situation doesn't make sense to me
*unless you have other varchars* because the number of bytes you'd save is
probably trivial. Might as well have them represented as  a DMS string.

HTH.

virginia
--
\ /     Virginia R. Hetrick, here in sunny California
0      Voicemail:  310.471.1766  Email:  [email protected]
Oo     "There is always hope."
        Keeping track of the weather:
        http://www.washington.edu/cambots/camera1_l.gif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.