Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Several questions, such as this one, discuss whether to store only lat/long in the database & calculate the street address every time it is needed, but they seem to miss a few points & seem to be opinion, rather than authoritative.

Hence this question, seeking a final, definitive clarification, with justification.

1) reverse geocode every time
pro - smaller database size (why should everyone duplicate Google's database?)
cons - might occasionally fail whereas storing the result will not

2) store address in the database
pro - less likely to hit a Google imposed limit on the number of requests
con - could be a large amount of data. A few hundred vehicles storing a new location every 5 minutes or so, 16 hours per day... probably more coding

If I take approach 2), I plan a new MySql table for addresses, indexed by lat/long and storing the street address. Every time a vehicle reports position, look for a matching address. If none, calculate & add.

In addition: later, when a client requests movement history, if the address is blank, attempt to calculate & store if found.

Please note that I am restricted to a MySql database.

Thanks in advance for any help

share|improve this question
    
In response to the con in #1, in most cases a private database will probably fail more often than Google's services. –  Trevor Aug 26 at 23:00

1 Answer 1

up vote 4 down vote accepted

You cannot legally cache or store results from Google's Map API (with pretty narrow exceptions).

From the Terms of Service (with emphasis added):

10.1.3 Restrictions against Data Export or Copying.

...

(b) No Pre-Fetching, Caching, or Storage of Content. You must not pre-fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily (and in no event for more than 30 calendar days), securely, and in a manner that does not permit use of the Content outside of the Service; and (ii) any content identifier or key that the Maps APIs Documentation specifically permits you to store. For example, you must not use the Content to create an independent database of "places" or other local listings information.

So option 1 it is, unless you only use the geocoding for the purposes described in the Maps API ToS, and only temporarily cache.

share|improve this answer
3  
Note that it is permitted limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily (and in no event for more than 30 calendar days). –  Cthulhu Apr 21 at 13:46
    
Cthulhu: Noted, and I did quote that. Extended the last sentence. –  BradHards Apr 21 at 20:54
    
+1 Thanks, I forgot to RTFM. Given that restriction, I now have to decide whether to cache for zer0 days or 29 days. And I suspect that we each of us have a different piece of string. –  Mawg Apr 22 at 4:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.