views:

371

answers:

3

Hi, I've been looking for list of types of queries that geocoder supports beyond regular address geocoding. At this time I need to query google for airport locations. I have sumbled upon this document: http://www.ibm.com/developerworks/java/library/j-grails05208/index.html but it mentions no place where I can get up-to-date list of allowed and useful Google geocoder query parameters.

TIA.

+1  A: 

You can do geocoding with the Google Maps API using the following HTTP request:

Simple CSV:

http://maps.google.com/maps/geo?q=London+Heathrow+Airport&output=csv&sensor=false

More Complex XML:

http://maps.google.com/maps/geo?q=London+Heathrow+Airport&output=xml&sensor=false

Simply change the "q" parameter with your Airport.

Daniel Vassallo
+1  A: 

You can also geocode airport codes:

http://maps.google.com/maps/geo?q=PDX&output=csv&sensor=false

Where PDX is the airport code for Portland, OR

Jeff B
Unfortunately it does not work with all the airport IATA codes.
Daniel Vassallo
One possible consideration is the data suppliers that Google bought the database from. Some suppliers might consider IATA codes to be addresses to be included in the database and other suppliers might not. The Geocoder is only supposed to geocode addresses. Perhaps Google AJAX Local Search might have more airport codes, in situations where the data supplier considered IATA codes to be business names rather than addresses. Obviously, IATA codes in countries that are not yet supported are unlikely to work.
Mike Williams
A: 

Also look at the Yahoo APIs. I tend to find them a bit more hacker-friendly than Google's APIs. Specifically, look at http://developer.yahoo.com/maps/rest/V1/geocode.html for geocoding with Yahoo.

Randal Schwartz