ISO-3166-2 codes as ADM1 codes?

681 views
Skip to first unread message

Denis Arnaud

unread,
Oct 2, 2018, 2:06:54 PM10/2/18
to GeoNames
Dear All,

the admin1CodesASCII.txt file contains the details for administrative-level 1 (ADM1) points of reference (POR). The ADM1 codes are sometimes (rarely actually) based on ISO-3166:2 codes, ie the ISO codes for the first level of subdivision for countries (themselves coded according to ISO-3166-1), sometimes (most of the time, actually) not. For instance, the ADM1 codes of the United States correspond to the well known US state codes (eg, CA for California or NY for New York), and the same for the UK.

I was wondering whether Geonames could adopt ISO-3166:2 codes as ADM1 codes?
If not, would you have some utility to do the mapping (between the ADM1 codes and the ISO-3166:2 codes)?

Note that ISO-3166:2 does not necessarily stop at ADM1 level. For UK for instance, it goes up to ADM2 level codes.

Kind regards

Denis




Info Cascade

unread,
Feb 27, 2019, 11:55:45 AM2/27/19
to GeoNames
I, too, need access to this data.  Wouldn't it be possible to simply include it in the admin1CodesASCII.txt file?
I'm not too hopeful, since no one replied to this message and it was posted in October or 2018.
But still, this seems like it would be an easy thing to do, that would probably not be a breaking change.
Is anyone paying attention to messages in this group?

Osvaldo Banuelos

unread,
Feb 27, 2019, 12:01:41 PM2/27/19
to geon...@googlegroups.com
I was wondering whether Geonames could adopt ISO-3166:2 codes as ADM1 codes?
If this is done it'd be great to keep it as a map in a new file or a new column, to not break existing systems. In particular, I use state codes, not ISO-3166-2 codes as ADM1 for US locations. Perhaps as alternate_adm1_codes column?

Thanks
Osvaldo

--
You received this message because you are subscribed to the Google Groups "GeoNames" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geonames+u...@googlegroups.com.
To post to this group, send email to geon...@googlegroups.com.
Visit this group at https://groups.google.com/group/geonames.
For more options, visit https://groups.google.com/d/optout.

Denis Arnaud

unread,
Feb 28, 2019, 3:52:48 AM2/28/19
to GeoNames
On the Open Travel Data (OPTD) project I co-maintain, we now have such a mapping file: https://github.com/opentraveldata/opentraveldata/blob/master/opentraveldata/optd_country_states.csv
The field separator is the hat (^) character.
That file is manually curated, meaning that if anything is missing or inaccurate, it is easy to add or fix: pull requests are welcome :)

Kind regards

Denis
Reply all
Reply to author
Forward
0 new messages