Using Geo APIs to pick a random town from anywhere in the world
Posted
by Dan Forys
on Stack Overflow
See other posts from Stack Overflow
or by Dan Forys
Published on 2010-03-25T08:18:07Z
Indexed on
2010/03/25
8:23 UTC
Read the original article
Hit count: 268
Hi all,
I'm trying to use Yahoo's excellent GeoPlanet API: http://developer.yahoo.com/geo/geoplanet/guide/api-reference.html
I would like to pick a random town from anywhere in the world but can't see an easy way to do it. I have tried querying by country and asking for children of type 'town', but can't seem to do that directly.
Can anyone think of a way to pluck out a random town WOEID without having to query the country, then the admin regions, then the admin 2, then the admin 3 etc.
I have also experimented using YQL, but don't have enough of an understanding about the available APIs.
© Stack Overflow or respective owner