GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Admin1 Codes not unique and orpahaned Admin2 codes  XML
Forum Index -> Administrative Divisions
Author Message
tr_burger@yahoo.com



Joined: 23/09/2007 20:30:10
Messages: 1
Offline

What you guys are doing is awesome. I just spent a bunch of money on a product that has so many issues that I’m now hand rolling a solution to get Country-State-County relationships. I do have a few questions about the data and perhaps the questions are really around what files/data to use. I’m working solely from the data in allCountries.zip as it seems like this is the most complete though not sure that is either the case or the best approach given what we are trying to do.

Admin1 Codes are not unique within a country

I’m trying to build a hierarchical structure of countries, states, counties, and cities. Things are going well though when I’m trying to align a County (ADM2) with as State (ADM1), I’m running into scenarios where the state code is not unique for a country as is the case for Yemen and a few others. I then started looking at the admin1Codes.txt and admin1CodesASCII.txt thinking they might explain something and it raises more questions. This lack of uniqueness exists for the following countries as well: MD, NP, UG, NG, SI, YE, TJ

Yemen (YM)
- Querying data from allCountries.zip – There are 18 entries with 4 or 5 that have an ADM1 with a value of “00”
- admin1Codes.txt – There are 26 entries
- admin1CodesASCII.txt – There are 15 entries. Only one with a ADM1 of “00” (perhaps a distinct on all of the states)

When trying to align Admin2 (county) to there appropriate state (Admin1), there is no way to properly align them as there are multiple Counties with an admin1 code of “00” and there are multiple states/Admin1 with a value of “00”


Admin2 Codes are referencing Admin1 codes that do not exists


There are some Admin2 values that have an Admin1 value that doesn’t exist in data from allCountries.zip. To continue on the Yemen example above, there are no Admin1 values for Yemen with a value of 17 though there is a county (GeoNameId = 72514) that has the value of 17 for Admin1. After looking at admin1Codes.txt and admin1CodesASCII.txt, there is a 17 in admin1Codes.txt. Should I use admin1Codes.txt for Counties? After running some queries just against data in allCountries.zip, there are 2207 Admin2 records that reference a Admin1 record that doesn’t exist.

Questions-

If I’m trying to allign Country, state, and county, what should I use to seed/populate the State and County? I am tring to just use the data in allCountries.zip though that might not be the best way as I’m running into data issues as mentioned above. I’v been working under the impression that the data in allCountries.zip is the “best” source though not sure if that is a safe assumption

If there is anything I can do to help in anyway, please let me know. Keep up the good work.. Donations will be coming from us soon

Thanks,

Troy
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Hi Troy

The '00' codes basically means that we don't know the administrative division.

Administrative divisions are rather complex and it is often difficult to get the required information. This is a fact I still don't understand the reasons for. Why do administrations make it difficult for people to find out how they are organized? It would seem logical that they make the information freely available, but they don't.
Another issue is that they is a constant merging, splitting and reorganising of administrative divisions. Often we know that something has changed, but we don't really know which city now belongs to which administrative division. This leads to the inconsistancies you have found. The file admin1Codes.txt contains obsolete administrative divisions, you should find the name of missing administrative divisions there.

Cheers


Marc

[WWW]
tcytra



Joined: 12/04/2009 22:47:04
Messages: 1
Offline

I need to echo Troy's sentiments, this is an amazing project and I want to thank everyone for the work they've put into it.

I'm trying to accomplish something very similar, in that I am attempting to establish a consistent means of connecting countries and regions, but not only do I find some of the existing data incomplete, but also some data that is non-existing... Troy's example with Yemen is pertinent.

I have been able to extract 18 region from the data as belonging to Yemen, however Yemen is listed in other sources as having 21 regions (twenty governorates and one municipality)

sources:
http://en.wikipedia.org/wiki/Yemen#Governorates_and_districts
http://www.statoids.com/uye.html

Also, there seems to be a duplicate entry for Muhafazat al Jawf, one with a admin1 code, and the other without...

marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

A have spent some time over the weekend to update the data for Yemen as it seems to important to so many of you.

As a general rule: please contribute actively to the project. Posting some general comments about missing data is not helpful. If you miss something then help add or fix it: http://www.geonames.org/manual.html


Marc

[WWW]
Doug Cooper



Joined: 14/05/2009 09:04:02
Messages: 2
Offline

Greetings from Bangkok.

I looked at the manual.htm page, but it isn't clear how to deal with the problem of large numbers of incorrect admin1 codes.

For example, Laos should have 16 provinces and 1 special administrative zone (the capital), not 26 due to duplicates and variant spellings, e.g.:

LA.04 Khammouan LA.15 Khammouan
LA.05 Louang Namtha LA.16 Loungnamtha
LA.06 Louangphrabang LA.17 Louangphabang
LA.09 Saravan LA.19 Salavan
LA.10 Savannakhet LA.20 Savannahkhét
LA.08 Phongsali LA.18 Phôngsali
LA.11 Vientiane LA.27 Viangchan

(no blame, btw -- it is very confusing!)

Is there a way I can provide a corrected list of reference names/spellings (based, say, on Wikipedia "...Provinces_of_..." page entries), and have _all_ the incorrect pointers currently in the database corrected? I'd be happy to sort out the wrong ones in Admin1 file, and I am willing to address this problem for Southeast Asian countries.

Thanks,
Doug
http://sealang.net
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Doug

The file "admin1Codes.txt" includes obsolete admin divisions. The file "admin1CodesASCII.txt" has the current admin divisions only. For the current admin divisions two were missing an admincode1 (Vientiane), I have added them and they will show up tomorrow.
In the database some records are still attached to obsolete admin divisions because we don't know yet where they now belong to.

The easiest way to update them would be with polygon information of the current province borders. Do you know whether some Southeast Asian countries make these polygons available?

Best

Marc

[WWW]
Doug Cooper



Joined: 14/05/2009 09:04:02
Messages: 2
Offline

Aha, I see what you mean. You might want to fix the documentation while you're at it

The only likely source of polygon data I know is World Language Mapping Systems http://www.gmi.org/wlms/. If you check it out (if you're not familiar with it) and it will suit your needs, I'd be happy to write or call them on behalf of geonames.org (no special pull, but I've spoken with them before).

Re "In the database some records are still attached to obsolete admin divisions because we don't know yet where they now belong to." As noted above, many of the problems I see aren't obsolete admin divisions -- they're just historical spelling variations. E.g. in Laos, since 1975 "r" is either dropped or written as "l" in Lao orthography, and presumably romanization follows suit. These should be unambiguously fixable if you can't get the boundary data.

Be well,
Doug
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

You are right I found the transformation for the fips codes here:
http://earth-info.nga.mil/gns/html/fips/FIPS10-4CN-01-d.pdf
The database has been updated with this transformation.

Somehow I cannot copy the relevant part I have therefore added a screenshot.

I didn't know WLMS. It looks great, though it is not free and for the administrative divisions I was thinking about polygons for the administrative divisions. Some countries do publish them, it is just tricky to find them.

Best

Marc
[Thumb - laos-adm1.png]
 Description [Disk] Download
 Filesize 83 Kbytes
 Downloaded:  1004 time(s)


[WWW]
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team