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 divisions  XML
Forum Index -> Administrative Divisions
Author Message
Anonymous



First of all: great service! Thanks!

When I use the search option on this page, I get results in a hierarchy like 1. adminstrative division -> 2. adm. div. -> location. (For Norway). When I download the db dump I cannot figure out how to recreate such an hierarchy. I suppose it is not possible...

How do you build this hierarchy and why isn't there a linking field (table self reference) supplied in the db dump?

Cheers!

Marius,
Norway
marc



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

Hi Marius
First of all: great service!  

thanks.

When I use the search option on this page, I get results in a hierarchy like 1. adminstrative division -> 2. adm. div. -> location. (For Norway). When I download the db dump I cannot figure out how to recreate such an hierarchy. I suppose it is not possible...

How do you build this hierarchy and why isn't there a linking field (table self reference) supplied in the db dump?

Cheers!

Marius,
Norway 


You find the first administrative dision in the column 'admin1 code' in the dump. It currrently contains the fips code, but we are working on replacing it with the more meaningful iso 3166-2 code. For the time being you find fips and iso codes here :
http://www.geonames.org/NO/administrative-division-norway.html

For Norway the feature distribution is :
geonames_db=> select count(*),admincode1 from geoname where countrycode = 'NO' group by 2;
count | admincode1
-------+------------
613 |
560 | 13
951 | 00
2357 | 06
3168 | 08
7448 | 09
3053 | 15
2961 | 16
131 | 12
741 | 20
2329 | 11
1362 | 02
870 | 01
2038 | 14
5291 | 07
6929 | 18
3329 | 10
2995 | 17
5205 | 05
1647 | 04
1027 | 19
(21 rows)

Hope this helps

Marc

[WWW]
Anonymous



Aah, thanks

-Marius
Anonymous



One more question:

Is the downloadable country files actual representations of the table, or do you have a more normalized structure in your DB? Just curious...

Thanks,
Marius
marc



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

The downloadable country files are a simplyfied version of the database. In particular Alternatenames are normalized.

[WWW]
Anonymous



Hi, I'm french and I'm trying to use your database but I've found some problems in the 'admin1 code' column. Some of the cities doesn't have an 'admin1 code' whereas they have one in the NGA database ('Grenoble' for example) and I really need them. Is it normal? How can I get the lacking codes?

(Sorry for my english)
marc



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

The process updating the population has accidentally removed the admin1 code. I have now restored the admin1 code where it has disapeared.

Thanks for finding this bug and letting us know.

I am now running an admin2 update on the French dataset. In the dump of tomorrow you will find the restored admin1 code and new admin2 codes for many records. The admin2 code here is the iso code for the French Départments.
http://www.insee.fr/fr/nom_def_met/nomenclatures/cog/dbf/2005/txt/depts2005.txt

Let me know if the admin2 code is useful, I will then run the update for other european countries as well.

[WWW]
Thomas



Joined: 29/04/2006 12:27:48
Messages: 3
Offline

Thanks for the quick answer (i'm the Anonymous french)
I don't know if you have check only the french database but it seems that others countries are concerned by the same problem.
In fact I'm working on the wole world dump to create a directory of all the practitioners of a sport named the "Parkour" combined with google map. So, to automate the creation of a new user, I need all the cities of the world having an admin1 code. An admin2 code may be usefull but just if the whole world cities have one...
I'll wait until tomorow and I'll reupload the database
Thanks again for your answer
marc



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

Thomas wrote:
I don't know if you have check only the french database but it seems that others countries are concerned by the same problem. 

I have restored admin1 code for all countries.
It is just the admin2 update running now that is for france.

Good luck with your project.

Marc

[WWW]
dpc_map



Joined: 07/02/2007 04:02:37
Messages: 16
Offline

Is there a plan to put the Admin2 column into the country dumps? I'd like to have the county information in the US data. I've seen that the county is returned from a US postal code query, but not from a geoname query.

Thank you.
marc



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

Hi dpc_map

The admincode2 is included in the normal geonames query with the style=FULL :

http://ws.geonames.org/search?q=london&maxRows=10&style=FULL&country=US

Putting an additional column in the country dumps breaks the API and users synchronizing their database with the daily modification will run into problems.
We plan to change many countries from FIPS code to ISO codes shortly and at this moment we could also add a new column to the dump.

Cheers

Marc

[WWW]
bewelcome


[Avatar]
Joined: 01/06/2010 23:15:11
Messages: 3
Location: France
Offline

I found this thread where the case of the place name Grenoble in France is quoted.

Grenoble is a city (it should be a PPL place not and ADMIN2)

http://en.wikipedia.org/wiki/Grenoble
The ADMIN1 where this city is is Rhône-Alpes, the ADMIN2 is Isère

could you fix this ?
The are several people complaining about this in http://www.bewelcome.org which is an Open Source hopsitality exchange web site using the geonames.org database
[WWW]
bewelcome


[Avatar]
Joined: 01/06/2010 23:15:11
Messages: 3
Location: France
Offline

I found how to edit it and fixed it

Thanks, great platform !
[WWW]
marc



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

What exactly did you change? Grenoble was and is a PPLA2. This is correct. No need to change.

Marc

[WWW]
bewelcome


[Avatar]
Joined: 01/06/2010 23:15:11
Messages: 3
Location: France
Offline

It seems to me that it was previously set as an ADM2, I tried to move it to a Populated place.

Is it possible that I did nothing ?
[WWW]
svakinn


[Avatar]

Joined: 30/11/2013 21:39:48
Messages: 3
Location: Iceland
Offline

Hi there, I see here from previous post (2006) that you were discussing changing the admin codes for Norway into more appropriate system (ISO 3166-2)

I see that this has not been changed (now 7 years later).
However in the Norwegian ZIP-code file the admin codes are on 3166-2 form.

I ask this question because I am trying to link the Zip-codes to the admin areas and it is impossible for Norway unless I change the codes myself in my DB.

Any thoughts on this Marc?

What about you Norwegians, are you happy with current admin codes?

Best Regards,
Sveinn (from Iceland)
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team