应用程序中所有国家/地区的城市和邮政编码

发布于 2024-08-05 09:38:16 字数 320 浏览 2 评论 0原文

有没有一种方法可以将所有国家、州、城市的邮政编码存储在一个数据库中。

我一直在到处寻找。

我发现了 geonames.org,我猜它包含了所有内容。但无法直接获取该数据。

我正在使用导轨。如果有任何助手或插件就太好了。如果有任何可解析格式的完整资源,我可以使用它来获取该数据库,那就太棒了。

如果您有任何疑问,请推荐,谢谢

我有 ISO 国家/地区代码列表,但没有某些国家/地区的国家/地区。

提前致谢

Is there a way getting all countries, states,cities zipcodes/ in one single database.

I have been looking all over.

I discovered geonames.org, which has I guess all of the content. But there is no way to fetch that data directly.

I am using rails. If there any helpers or Plugins, it'd be great. It would be awesome if there is a complete resource in any parsable format which I can use to get this database in place.

Please recommend if you any thanks

I do have the iso country code list but no States for some countries.

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

抚你发端 2024-08-12 09:38:16

谢谢大家,

我得到了所有国家和州的所有信息,但没有邮政编码。

http://27.org/isocountrylist/iso_country_list.sql

这包含所有国家/地区,并且有iso-3166 代码(西伯利亚代码需要从“CS”更改为“RS”)

这是有州的国家/地区的 FIPS 文件

http://www.maxmind.com/app/fips_include

对于邮政编码验证,我正在使用

http://www.geonames.org 网络服务

还有一个 geonames ruby​​ gem,这使得它非常简单进行邮政编码验证

希望可以帮助任何需要此信息的人,值得将其保留在网络项目中方便使用。

另一个链接(感谢@laise):http://dev.maxmind。 com/static/csv/codes/maxmind/region.csv

Thanks Guys,

I got all the the countries and states of all of them, but no zip codes.

http://27.org/isocountrylist/iso_country_list.sql

This contains all countries, and there iso-3166 codes ( Siberia code needs to be changed from "CS" to "RS")

And here is the FIPS file for countries with states

http://www.maxmind.com/app/fips_include

For zip code validation I am using

http://www.geonames.org webservices

There is a geonames ruby gem as well, which makes it really simple to do zipcode validations

Hope that helps anybody who needs this information, worth keeping it handy for web projects.

Another Link ( thanks @laise ): http://dev.maxmind.com/static/csv/codes/maxmind/region.csv

断爱 2024-08-12 09:38:16

Carmen 插件 几乎肯定是您正在寻找的。

The Carmen plugin is almost certainly what you're looking for.

極樂鬼 2024-08-12 09:38:16

这需要一些跑腿工作和数据整理,但这还不错。

国家和国家代码很容易获得。听起来你已经拥有它们了。

并非所有国家都分为州。您可能必须简单地一一解决这些问题——可能有一些综合参考,但据我所知并非如此。

美国城市可用,并查找诸如 FIPS 代码之类的内容。有一些商业数据提供商可以为您提供干净、组织良好的数据,但他们是收费的。

邮局有一些包含所有邮政编码的数据库。请注意,这些服务会定期收费,并且单个邮政编码并不意味着单个邮政编码(远非如此!)。并且可能没有必要真正拥有所有这些信息的数据库,因为有免费的邮政编码验证/更正服务。

要加载数据,请查看有关该主题的最新 Railscast

This will take a little legwork and data munging, but it's not too bad.

Countries and country codes are easy to come by. Sounds like you already have them.

Not all countries are divided into states. You may have to simply address these one by one-- there may be some combined reference, but not that I know of.

U.S. cities are available, and look for things like FIPS codes. There are commercial data providers that will provide you clean, well-organized data, but they are charging for it.

The post office has some databases with all the zip codes. Note that these charge periodically, and a single zip code doesn't imply a single single (far from it!). And it may not be necessary to actually have a database of all of them, as there are zip verification/correction services available for free.

For loading the data, check out a recent railscast on the subject.

源来凯始玺欢你 2024-08-12 09:38:16

我一直在寻找同样的东西并找到了这个资源。我希望有人能像我一样服务好。

http://dev.mysql.com/doc/world-setup/en /index.html

I was looking for the same and found this resource. I hope somebody serves well as me.

http://dev.mysql.com/doc/world-setup/en/index.html

生生不灭 2024-08-12 09:38:16

对于那些使用 FIPS 10-4/FIPS 5-2 标准的人,我一直在维护国家一级行政区划的 NGA GEC(以前的 FIPS 10-4/5-2)Excel 电子表格(原始格式)。该电子表格目前已更新至 Update 15(2014 年 3 月):
http://www.opengeocode.org/archive.php

For those using the FIPS 10-4/FIPS 5-2 standard, I have been maintaining the NGA GEC (formerly FIPS 10-4/5-2) Excel spreadsheet (original format) for 1st level administrative divisions of countries. The spreadsheet is currently updated to Update 15 (March 2014):
http://www.opengeocode.org/archive.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文