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.

Is it possible to geocode an address, save the result in a database, then read that result from there on?

I'm using a Google map that is geocoding hundreds of addresses which obviously hit the geocode limit. Once geocoded, the address is very unlikely to change again so it makes sense to save the geocode result in a database.

I'm using Wordpress as a platform so if possible I'd like to save the geocoded result as a field in the database that relates to the particular company.

THE CLIENT HAS SPECIFICALLY ASKED FOR GOOGLE TO BE USED THROUGHOUT THE PROJECT THUS RULING OUT YAHOO OR ANYTHING ELSE.

UPDATE: Everyone's saying about what I'm asking is going against their TOS but isn't their very own example doing the same thing - developers.google.com/maps/articles/phpsqlgeocode?

share|improve this question
6  
Please read the terms and conditions 10.0.3 (a,b,c) developers.google.com/maps/terms you must not use the Content to create an independent database of "places" or other local listings information. –  Mapperz Jun 11 '12 at 13:21
3  
Yahoo PlaceFinder developer.yahoo.com/geo/placefinder has better Terms and Conditions - Placefinder API does not have the mentioned restriction about storing returned location data. –  Mapperz Jun 11 '12 at 13:24
    
@Mapperz Ok thanks. Is it possible to save to a google fusion table and somehow link that to wordpress? –  Rob Jun 11 '12 at 13:35
    
Do you have need of the ZIP+4 mailing data? If so, that changes the answer. So, are you going to be mailing anything to the address or just using the geo-data for location and position? –  Jeffrey Jun 11 '12 at 14:25
1  
Hold up... I'm pretty sure it's still a TOS violation with Yahoo's API, too. –  Matt Jun 11 '12 at 21:39
show 3 more comments

4 Answers

Using FME workbench to do 'bulk' geocoding from Yahoo PlaceFinder API

50,000 requests limit per 24 hours:

enter image description here

Key component is the HTTPFetcher

This screenshot is a high modified version of the freely available 'Building Web services workspace' http://fmepedia.safe.com/articles/FAQ/Building-Web-services-workspace

Modifications:

Multiple Address input (csv is the fastest)

Quality of every geocoded match is recorded (above 87 is good)

Added Elevation from a different service (geonames gtop30 dem)

Validating and filtering bad addresses to be looked into.

(Will try and get on the FME Store after looking at agreement/terms).

share|improve this answer
    
I would be very interested in seeing your Workspace also, since this falls into several of my program goals too... –  D.E.Wright Jun 11 '12 at 21:02
    
This looks like a great workflow but keep in mind, that storing the results would certainly be a violation of the TOS. –  Jeffrey Jun 11 '12 at 21:46
    
only if you store it longer than 6 hours... or are using it in conjunction with Yahoo Maps to display the locations –  Mapperz Jun 11 '12 at 21:49
    
Use of PlaceFinder does not require the use of Yahoo! Maps or Yahoo! Maps APIs.Eddie Babcock Yahoo! Geo Technologies developer.yahoo.com/forum/PlaceFinder-General-Discussion/… –  Mapperz Jun 11 '12 at 21:53
    
@Mapperz Well, the TOS says "YOU SHALL NOT:" {uppercase quoted as well} "store or allow end users to store map imagery, map data or geocoded location information from the Yahoo! Maps APIs for any future use." It looks pretty clear that if the intention is to "store" the data, it violates the TOS. But, it is certainly left to interpretation. All that said, If I were building a commercial app, I would want to ensure that my interpretation was the same as the data providers interpretation since they (Yahoo in this case) hold the ultimate kill switch. –  Jeffrey Jun 11 '12 at 21:56
show 8 more comments

According to the YahooMaps Terms Of Service, you are not permitted to store the data that you gather from using the API. (specifically viii) "YOU SHALL NOT:"

(vi) use the Yahoo! Maps APIs with location information that is less than 6 hours old and derived from a GPS device or any other location sensing device;

(vii) use the Yahoo! Maps APIs with location information derived from a GPS device or any other location sensing device where such information was not uploaded to your application or service directly by the end user;

(viii) store or allow end users to store map imagery, map data or geocoded location information from the Yahoo! Maps APIs for any future use;

(ix) use the stand-alone geocoder for any use other than displaying Yahoo! Maps or displaying points on Yahoo! Maps;

(x) publish or display, or allow other users to publish or display, any geocoded location information using any Yahoo! Maps APIs;

This is consistent with what I have seen in the TOS from Google, Bing, MapQuest, and Yahoo. The reason for this is that they benefit directly from being able to present the results to the end user. If their logo and "maps by google" isn't displayed, they don't get any "street cred" or exposure. Thus, their incentive to provide the service is gone. They make it very easy for you to use the service (extremely easy) but they also place reasonable limits. As long as you are using their data to make them money (even if they're just getting exposure) you are within the terms of their TOS. If you try to sidestep those terms, you run the risk of being cut off at any time. Not a happy story if your service is based on their service.

I have never used FME workbench, it looks really powerful (and at the same time, more complex than is needed), but will still be subject to the TOS of the data providers. Compare the FME workflow to this simple HTTP request to the LiveAddress API by SmartyStreets:

https://api.qualifiedaddress.com/street-address/?street=1600+Ampytheatr+Pkway+Mountain+Vew+ca&auth-token=23350695

It takes the following address and standardizes it (including obvious spelling correction), verifies that it is deliverable, and then geocodes it and breaks the address down into the various components outputting it as a JSON stream. (if you don't read JSON, you can plug the output into a JSON formatter for much more readable results. (Feel free to use your own data in the URL string as well, for testing purposes)

1600 Ampytheatr Pkway Mountain Vew, CA

becomes

1600 Amphitheatre Pkwy Mountain View, CA 94043-1351

There are a number of commercial APIs available that do address verification, SmartyStreets just happens to be the one that I park my car at each morning. (Cdyne, StrikeIron, QAS are a few others that offer a similar service.) These commercial services offer you use of their data that is not bound by an overly-restrictive TOS. You can basically use the resulting dataset for just about anything short of competing directly.

You are correct that the geocoding data doesn't change very frequently and is something that can certainly be cached locally, or within your database to minimize the number of requests to the server. Good thinking.

share|improve this answer
    
The data is refreshed every 6 hours and the intention is to be used with Yahoo Maps - key part >> use the Yahoo! Maps APIs with location information that is less than 6 hours old and derived from a GPS device or any other location sensing device; –  Mapperz Jun 11 '12 at 21:46
    
@Mapperz The freshness and input source of the address data wasn't the main issue in the TOS. I quoted those merely to add context to the most significant point which is: "YOU SHALL NOT" (viii) store or allow end users to store map imagery, map data or geocoded location information from the Yahoo! Maps APIs for any future use. It doesn't matter how fresh or stale the data is. –  Jeffrey Jun 11 '12 at 21:49
    
@Jeffrey I have no choice but to use Google's services throughout, this is a specific requirement from the client. This rules out using Yahoo or anything else. –  Rob Jun 13 '12 at 10:58
    
@Teamworksdesign.com Excellent, that eliminates a lot of looking around and now you can dig into the code. Luck! –  Jeffrey Jun 13 '12 at 14:41
add comment
up vote 1 down vote accepted

After a lot of digging Google actually shows how to store Geocode results in a database. As there is an actual tutorial from Google on how to do it, I'm assuming that this doesn't violate the clear as mud terms of service that so many have mentioned.

https://developers.google.com/maps/articles/phpsqlgeocode

share|improve this answer
add comment

The short answer to your initial question is yes, as long as you use Google's mapping service, you can store the results. It's spelled out clearly (after a few re-reads) in their ToS and their geocoding API.

You should be aware that like many other popular geocode services, they also require that you

  1. Only use the Google acquired and cached data with their mapping utilities
  2. If this is an internal, rather than external publicly free utility, you must register as a commercial client to legally use it.

Note carefully #1... very critical distinction, you can cache, but they don't want you using the lat/long (for instance) on someone else's mapping utility, be that another website or a "homebrew" (although to be honest, I'm not sure how anyone can track where lat/long data is used.

all limits and other restrictions as stated by their ToS and other governing docs.

share|improve this answer
add comment

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.