I'm looking for a dataset that contains a complete hierarchical geographic representation of the world. Basically, I want names, boundaries, relationships ("is a member of"), ISO codes, and more for:
- continent (optional but useful)
Postal code would be nice, too, but that can complicate things since postal codes can sometimes span multiple regions (e.g., ZIP code 02861 covers area in both Pawtucket, Rhode Island and Attleboro, Massachusetts).
Some sort of globally unique ID for each location would be really useful. ISO 3166 specifies country codes (3166-1) and sub-country (state/province/territory generally) codes (3166-2), but it doesn't seem to contain any finer administrative units. Is there an ISO standard for finer administrative areas than state/province/territory? For example, is there a standard (ISO?) that labels the following administrative areas?:
- Orange County, CA, USA
- Anaheim, CA, USA (a city within Orange County)
- Bengbu District, Anhui Province, China
Basically, I want a full geographic hierarchy of the entire world. Does such a dataset exist?
Things I've explored:
- Natural Earth - Great open source dataset that contains good data on countries, states, and cities. It doesn't offer county/district data, though, and there doesn't appear to be any sort of standard global location ID. It also doesn't offer boundary data for cities; instead, cities are represented by a point (centroid?).
- Universal Postal Union POST*CODE Database - From what I can tell, this has global postal code data, but I'm not sure where/how I can get the full dataset; all I see are a few sample files.
- UN/LOCODE - This is a really extensive dataset that seems to have lots of cities and special locations (Air Force bases, airports, etc.) and even offers a unique 3-letter identifier for each, but it doesn't seem to have counties.
What else should I be looking at? Surely such a dataset exists, right?