GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Associate Airport with City ?  XML
Forum Index -> General
Author Message
petoulachi



Joined: 16/12/2009 11:39:18
Messages: 1
Offline

Hello all,

I'm really newbee in geonames so maybe my question is really easy, but can't find a way to do it.

I'm trying to associate every AirportCode (like LAX for exemple) with a City (in this case, Los Angeles).
Is there a way to do this ?

Thanks,
geotree


[Avatar]
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline

Just perform 2 webservices calls :

1/ retrieve lat and lng of the airport :
http://ws.geonames.org/search?featureCode=AIRP&name_equals=LAX

2/ retrieve nearby places using lat and lng :
http://ws.geonames.org/findNearbyPlaceName?lat=33.9425129&lng=-118.4089655&style=full&radius=30&maxRows=99

You may adjust radius,
and filter result by population to get the biggest city.

More information:
http://www.geonames.org/export/ws-overview.html

Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team