GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
admin1/2/3/4 codes in the Geonames ontology  XML
Forum Index -> Administrative Divisions
Author Message

Joined: 25/05/2021 16:27:31
Messages: 2


I am currently trying to create an ontology in which, among other things, the hierarchy of the different administrative levels of a country (specifically: Germany) should be mapped. For this I would like to include the Geonames ontology. In the first step I downloaded this ontology and imported it into GraphDB. Afterwards I filled the ontology with the offered data ( for Germany ( using OntoRefine. To map the hierarchies I used the GeonamesID (For example: geonameid 2803460 -> parentADM2 -> geonameid 2955470).
In the next step I want to connect internal company data. I would like to do the linking using the admin1/2/3/4 codes (from the file). In the ontology I could only find the ISO Country Code as Data Property of a feature. Is the mapping of admin1/2/3/4 codes to the Geonames ID also provided for in the ontology?

Thanks a lot in advance!

Kind regards

Joined: 09/06/2021 05:14:55
Messages: 3

Details (including geonameids) for admin1 codes can be found in the admin1CodesASCII.txt file on the downloads page. Note that the name column in that file is '<countrycode>.<admin1code>'. Likewise admin2 codes can be found in the file admin2Codes.txt (same warning on the name column but now it is: '<countrycode>.<admin1code>.<admin2code>'. There are no separate downloads for admin3 and 4; the codes in the features (DE.txt) table are not geonameids, but you can reference back to those if needed by joining the table against itself (if you are familiar with relational databases like mysql or postgres). In this case you join the admin3 or 4 code against the same column but also look for feature class 'A' and feature code 'ADM3' (or 'ADM4' as the case may be). Hope this helps.

Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team