城市到大都市区 [英] Cities to Metropolitan areas
问题描述
我有一个城市数据库(在美国和世界其他地区).数据库条目是简单的文本字符串.目前,该数据库甚至包含小城市(人口 10,000).我希望通过将城市分配到更大的地理\大都市区来使用更大规模的数据库.例如,Google 的 AdWords API 中的大都会区域:
I have a database of cities (in both the US and the rest of the world). The database entries are simple text strings. Currently the database contains even small cities (population 10,000). I wish to use a larger scale database instead, by assigning the cities into larger geographical\metropolitan areas. An example can be the Metropolitan areas in Google's AdWords API:
http://code.google.com/intl/iw-IL/apis/adwords/docs/developer/adwords_api_us_metros.html
但是我改用其他数据库没有问题.
but I have no problem using other databases instead.
对于如何使用现有数据库\API 执行此操作的任何建议,我将不胜感激!
I'd be grateful for any advice on how this can be performed using existing databases\APIs!
推荐答案
您可以使用 雅虎的GeoPlanet 数据库.您可以轻松找到每个地方的父级(WOEID - where on earth ID).
You can use Yahoo's GeoPlanet database. You can easily find what's the parent of each place (WOEID - where on earth ID).
You can also access this database using YQL.
这篇关于城市到大都市区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!