All Countries States Cities and Zipcodes in a Application

前端 未结 5 1537
Happy的楠姐
Happy的楠姐 2021-02-02 03:48

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

相关标签:
5条回答
  • 2021-02-02 04:32

    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

    0 讨论(0)
  • 2021-02-02 04:38

    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

    0 讨论(0)
  • 2021-02-02 04:44

    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.

    0 讨论(0)
  • 2021-02-02 04:49

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

    0 讨论(0)
  • 2021-02-02 04:52

    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

    0 讨论(0)
提交回复
热议问题