城市大都会地区 [英] Cities to Metropolitan areas
问题描述
我有城市的一个数据库(在美国和世界其他地区)。
数据库中的条目是简单的文本字符串。
目前,该数据库包含甚至小城市(人口10,000)。
我希望用更大规模的数据库,而不是通过分配城市到更大的地理\\大都市地区。
一个例子可以是大都市区在谷歌的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://$c$c.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 - 地球上的ID在哪里)
You can use Yahoo's GeoPlanet database. You can easily find what's the parent of each place (WOEID - where on earth ID).
编辑:您也可以访问这个数据库<一个href=\"http://developer.yahoo.com/yql/console/#h=select%20placeTypeName%2C%20name%20from%20geo.places.ancestors%20where%20descendant_woeid%20in%20%28select%20woeid%20from%20geo.places%20where%20text%3D%22sunnyvale%2C%20usa%22%20limit%201%29\"相对=nofollow>使用YQL 。
You can also access this database using YQL.
这篇关于城市大都会地区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!