http://ws.geonames.org/hierarchy?geonameId=4887398
it tells you Chicago (geonameid=4887398) is in Cook County
(geonameid=4888671) is in Illinois (geonameid=4896861) is in the
United States (geonameid=6252001) is in North America
(geonameid=6255149) is in the world/globe (geonameid=6295630).
Where can I download this parent/child information. It's not on the
download page?
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
The first hierarchy is given by the feature_code:
So, you should start by looking nodes with feature_code = PCLI. That
place has a country_code, which will be the same for all the places in
the same country.
Then, you need to look for all the places with country_code you got
before, and feature_code=ADM1; this place will have an admin1_code
which will be the same in all places below this. Then, continue with
ADM2 and admin2_code, ADM3 and admin3_code, etc.
If you want, I can give you the source code to preprocess the dump.
:)
--
Martin Sarsale - mar...@malditainternet.com