国家/州/城市数据库? [英] Country/State/City Database?

查看:238
本文介绍了国家/州/城市数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

国家及其城市数据库

这一个是一个非技术问题。我创建一个商业目录,我想按位置对商品分类。我将向用户提供一个遵循国家/州/州/城市格式的位置列表,而不是为用户提供输入位置的选项。我试过GeoWorldMap由GeoBytes。它在一开始看起来很有前途,我觉得这是完成工作,直到我意识到,它提供了一个大约275个国家的名单,虽然被认可的国家数量在192到195之间。所以我不知道额外80个国家/地区。当我意识到这个问题,我去他们的网站做一些估计,发现他们的列表是定期更新。所以这给我带来了一个问题。是否可以找到列出所有可能位置的准确数据库?

Ok, this one is a non technical question. I am creating a business directory and I'd like to categorize listings by location. Instead of giving users an option to enter the location, I am going to provide them with a list of locations which follow a Country/State/City format. I tried GeoWorldMap by GeoBytes. It looked promising in the beginning and I felt that is exactly what would get the job done until I realized it provided a list of around 275 countries even though the number of countries that are recognized is between 192 to 195. So I am not sure about the extra 80 countries. When I realized this issue, I went to their website to do some reckon and found out that their list is updated on a regular basis. So this brings a question to my mind. Is it possible to find an accurate database that lists all possible locations? What do most developers here use for something like this?

推荐答案

很好的问题。我认为Yahoo!的 GeoPlanet 对此非常有用:它们提供了一个非常详尽的列表以及它们之间的层次关系,您可以下载名称列表或使用其API。

Excellent question. I think Yahoo!'s GeoPlanet can be very useful for this: they provide a pretty exhaustive list of places and the hierarchical relationships between them, and you can either download the list of names or use their API.

其他地名词典重新寻找)包括 GeoNames ,该网站还免费提供可下载的数据。 (我相信StackOverflow甚至谷歌搜索可以给你更多的选择沿着同一行。)

Other gazetteers (that's the term-of-art you're looking for) include GeoNames, which also has downloadable data free of charge. (I'm sure StackOverflow or even a Google search could get you more options along the same lines.)

此外,如果你打算创建一个UI,让用户从您的地点列表中选择,我喜欢推荐 Freebase Suggest 插件,一个jQuery插件将强制用户从某个类别(在你的情况下,国家,说)选择,并提供一个很好的用户界面从Freebase的语义数据库认为是正确的。它甚至提供一些类似wiki的上下文来帮助消除歧义。

Also, if you're planning to create a UI to let users select from your list of places, I like to suggest the Freebase Suggest plugin, a jQuery plugin that will force users to select from a certain category (in your case, countries, say) and provide a nice UI for choosing from what Freebase's semantic database considers correct. It even provides some wiki-like context to help with disambiguation.

这篇关于国家/州/城市数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆