GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Build a four-layer table structure  XML
Forum Index -> General
Author Message
manrash



Joined: 09/05/2007 17:01:53
Messages: 3
Location: Spain
Offline

Hi,

I would like to transform geonames table into
hierarchic tables: country, subdivision1, subdivision2 and city.

In order to do it, I used the following commands:

Country: Imported from CountryInfo.txt

Subdivision1: Imported from AllCountries.zip and filtered with feature_code = ADM1

Subdivision2: Imported from AllCountries.zip and filtered with feature_code = ADM2

Is correct asume that admin1_code of subdivision2's rows mean in which subdivision1 is?

Thank you, Diego
marc



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

Hi Diego

It sounds reasonable what you plan to do. The adminCode1 field is in fact the subdivision1 and tells you in which subdivision1 a subdivision2 is.

Cheers

Marc

[WWW]
manrash



Joined: 09/05/2007 17:01:53
Messages: 3
Location: Spain
Offline

Hi Marc,

but in Andorra there are 3 admin1 zones sharing the same admin1_code and there is just one admin2 zone that also has the admin1_code.

Code:
 ADM1:
 
 geonameid	ansiname	feature_class	feature_code	admin1_code
 3039162	Parroquia de Sant Julia de Loria  	A  	ADM1  	01
 3039676	Parroquia d'Ordino 	A 	ADM1 	01
 3041566	Parroquia d'Andorra la Vella 	A 	ADM1 	01
 
 ADM2:
 geonameid	ansiname	feature_class	feature_code	admin1_code
 6453307  	Andorra  	A  	ADM2  	01
 
 


them, Which one is the admin1 of geonameid = 6453307 ?

Thank you, Diego
marc



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

Hi Diego

The ADM1s for Andorra with adminCode1 '01' have been wrong. I have corrected it.
As for ADM2, I don't know Andorra well enough to be able to say how it should be.

Cheers

Marc

[WWW]
manrash



Joined: 09/05/2007 17:01:53
Messages: 3
Location: Spain
Offline

I think that Andorra hasn't any admin2_zone and the cities depend only of "parroquias".

Diego
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team