| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 17/08/2010 17:49:33
|
drzraf
Joined: 10/06/2010 11:27:15
Messages: 19
Offline
|
but available via geotree and the hierarchy webservice.
(as a side question, would you want to explain why the hierarchy may be missing from the dumps while being correct in the database/solr index the webservice is running ? )
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 17/08/2010 18:16:59
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
there has been a restructuring of IE in the database and the provinces have been added as ADM1:
http://www.geonames.org/search.html?q=adm1&country=IE
The counties are now ADM2.
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 17/08/2010 23:28:01
|
ludaw
Joined: 20/08/2009 11:27:24
Messages: 105
Offline
|
Hello,
By the way, why did you add this level?
Provinces are not administrative divisions, more "traditional" divisions...
Best
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/08/2010 10:16:07
|
drzraf
Joined: 10/06/2010 11:27:15
Messages: 19
Offline
|
+-----------+--------+-----------+-------+--------+---------+--------+
| geonameid | name | asciiname | fcode | fclass | country | admin1 |
+-----------+--------+-----------+-------+--------+---------+--------+
| 2964574 | Dublin | Dublin | PPLC | P | IE | 07 |
| 3306980 | Dublin | Dublin | PPL | P | IE | 26 |
+-----------+--------+-----------+-------+--------+---------+--------+
select 1 from geoname where country= 'ie' and fcode='adm1' and admin1 IN (07,26) == 0
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 18/08/2010 18:05:35
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
Ludovic
The counties are a bit unwieldy as top division. It is not even possible to attach the capital to any of those, because they are smaller than the capital.
There are a lot of countries where the adm1 division has not fully admin functionality with the official admin (as with iso/fips) on the adm2 level: GR, PH, also in a way IT, ES, FR.
PH has also been changed these days. Because there are so many provinces and cities that a division with fewer entries on top is preferable, and easier to maintain.
@drzraf: I think you are looking at an old file.
Best
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 19/08/2010 10:43:02
|
drzraf
Joined: 10/06/2010 11:27:15
Messages: 19
Offline
|
Still reproductible with today dumps, but should I understand a request to grab the hierarchy should be in the form :
Code:
SELECT d.geonameid as ADM1ID
FROM geoname s, geoname d
WHERE s.geonameid = XXXX AND d.country=s.country AND d.fcode='adm1'
AND (d.admin1 = s.admin1 OR d.admin1 = s.cc2)
Should I systematically use the "OR d.admin1 = s.cc2" condition ?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 19/08/2010 20:25:37
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
what is "OR d.admin1 = s.cc2" could for? This condition will never be true, or only accidentally.
The admin1 code of Dublin is no longer '07'. It is now the admincode2, which means you are using old data.
Best
Marc
|
 |
|
|
 |
|
|