GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Administrative levels: a data integrity issue?  XML
Forum Index -> Administrative Divisions
Author Message
Steinar



Joined: 23/05/2009 15:56:21
Messages: 2
Offline

Hello.

First, thanks all for a fantastic data source.

I have been building a database where the hierarchy is based on the geonames dump (allCountries.txt, etc).

I noticed that some geonames has an adminsitrative level 2 BUT at the same time has no administrative level 1. So I ran a query, and it turned out that this situation is true for 17277 geonames. In addition: 15449 geonames have administrative level 3 set, without administrative level 2. 12 geonames have administrative level 4 set, without administrative level 3.

For example:
http://ws.geonames.org/hierarchy?geonameId=5880985&style=full
countryCode=AS
adminName=null
adminName2=AS.null.250

Why would a geoname have a second administrative level without a first?

Of course, this might be some feature of the geonames data that I don't understand. Otherwise it is a data integrity issue - so I thought that I should let you know.
marc



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

Hi

AS depends on the US, but we have recently decided to use the admin1code and the countrycode to be the same for those countries (Puerto Rico, Guam, etc).

These countries will be fixed with the next dump.

For some other regions it is because we simply don't know or because a lower level division does not have a higher level division for historical reasons.

Best

Marc

[WWW]
Steinar



Joined: 23/05/2009 15:56:21
Messages: 2
Offline

Thanks for the quick reply.

So the administrative levels of Geonames represents "political" entities, which usually map to geographic entities - but not always. So that makes sense, depending on what you want to use the data for

I think I discovered some anomalities between administrative levels as set in admin1Codes.txt and featurecodes set in allCountries.txt

This becomes apparent if we compare the the population of featurecodes A.ADM1 & A.ADM2 with the number of entities in admin1Codes.txt and admin2Codes.txt:

Code:
 select count(*)
 from geoname g
 where featurecode='A.ADM1' or featurecode='A.ADM2'
 group by featurecode;
 


Shows 3719 geonames of A.ADM1 - but admin1Codes.txt has 4506 entries
Shows 23418 geonames of A.ADM2 - but admin2Codes.txt has 23408 entries

Again, maybe I'm missing things, but it seems a bit odd, particularly for administrative level 1.
marc



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

The file admin1Codes.txt includes obsolete codes, they are no longer in the database but the codes are still listed in the file in case you find the code somewhere and want to know what it was.

Marc

[WWW]
bradcapo1



Joined: 21/07/2009 04:31:57
Messages: 1
Offline


Thanks for the feedback. That is very useful.



taux pret auto - taux pret auto differe selon la rise en compte ... calculent automatiquement le taux pour un prĂȘt automobile donne.
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team