Hi @RenatoF
Good point about using the Explore API endpoint to get some info about this territory code :)
Depending on your dataset and the country that contains the geographic data of your dataset, the retrieval of territory metadata is done via our reference geographic data. For instance these datasets are used when you use the Retrieve Admin Divisions Processor.
You have correctly guessed the breakdown of this code into three elements:
- country ISO code, CH for Switzerland
- an integer between 40 and 90 most of the time
- the unique identifier of the territory found as a field in the reference geographic dataset
The integer between ch and 2477 corresponds to the typology of the territory concerned, or in other words the administrative level. For example, it could be a territory at the scale of a city, department, district, region, etc. This is a convention inspired by the different levels in OpenStreetMap but remains an internal Huwise convention.
For Switzerland specifically, we have:
- 40 for Kanton
- 60 for Bezirk
- 80 for Gemeinde
- 81 for postal codes (4 digits)
- 82 for postal codes (6 digits)
The "largest" levels, i.e. those that encompass other levels, will have smaller numbers. And the finer the granularity, the larger the number will be. Depending on the country, this “admin level digit” don’t have the same meaning.
Hope this has been clear enough :)
Damien