Re: GIS In MySQL Database
Armando <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
I'm currently working on a project in which we are storing lat/long values in our database of locations which is very substantial (over 375,000 unique locations) to calculate nominal distances and we're using float values since the data is already in decimal format. We've found that for nominal distance caluclation, we're saving time having to convert values, and increasing efficiency since the data is already in a decimal format. As a side note, the only thing I would caution on is if you're using some type of mapping software to determine lat/long values prior to entering them in the database - mind you I'm in Canada so our zip code system is somewhat bulky and complex. We're using MS MapPoint and have noticed some inconsistencies with the values it returns. For instance, we could have 2 unique locations at the same physical address; think a building with multiple businesses. What I've seen is two different values returned even though the only difference in the data being sent is that the Country for one is "Canada" and the other is "CA". Something to consider! Cheers. Armando Dr. Virginia R. Hetrick wrote: > 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 > -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]