地理名称数据库(城市、兴趣点)
我正在用 django 建立一个旅游网站。当用户输入目的地城市名称(或兴趣点,如黄石)时,我想做 ajax 自动建议。问题是我如何获得建议数据库?有网络服务吗?如果它也能支持外国城市那就最好了。多谢。
I am building a travel website with django. When a user is typing in the destination city name (or points of interest, like yellow stone), I want to do ajax auto suggestion. The question is how I could get the suggestion database? Is there any web service? Best if it could also support foreign cities. Thanks a lot.
您想要的称为 地名词典 数据库。
美国官方 USGS 地名词典可供下载。
两个全球地理编码数据库包括:
Geonames 拥有免费的城市和 POI 列表。它包括美国地质勘探局地名词典和许多其他信息。但是,您可能必须对他们的数据库进行子集化,因为它可能会为您返回太多结果。
Maxmind 还有一个免费的城市数据库。
What you want is called a gazetteer database.
The official USGS gazetteer for the USA is available for download.
Two global geocoded databases include:
Geonames has a free list of cities and POI. It includes the USGS gazetteer and lots of other info. You might have to subset their database however, as it might return too many results for you.
Maxmind also have a free database of cities.