Names of administrative level 1/2 POR (points of reference)

81 views
Skip to first unread message

Denis Arnaud

unread,
Feb 17, 2013, 4:23:35 AM2/17/13
to geon...@googlegroups.com
Hi,

AFAIU, the administrative level 1 (resp. 2) POR (points of reference) are extracted from the Geonames database, dumped and made available every day in the http://download.geonames.org/export/dump/admin1CodesASCII.txt (resp. http://download.geonames.org/export/dump/admin2Codes.txt) file. That is very good.

AFAIU, the (UTF8 and ASCII) names of those administrative level 1/2 POR are the English translations when available, or the generic ones when the English translations are not available. However, when several English translations exist for the same administrative level 1/2 POR (see http://www.geonames.org/2349961/anambra-state.html for a typical example), the database extraction algorithm seems to pick one randomly. As a consequence, from one day to another, the names of the administrative level 1/2 POR vary forth and back. With the given example, the names are chosen "randomly" from the {"Anambara", "Anambra", "Anambra State", "Udi State"} list. Which is... "less predictable" :)

Of course, I know that I do have access to all the translations, including the English ones, from the http://download.geonames.org/export/dump/alternateNames.zip (72 MB) data file. So, I could code a work-around myself.

May I suggest to just slightly amend the database extraction algorithm so that the join on the alternate name table be sorted and that the resulting extraction be more predictable? Note that the "p" ("preferred") flag could also be taken into account (be careful, though, that several translations may have the "p" flag set at the same time; so, the alphabetical sorting order may be a safe fall-back solution).

Thanks in advance

Denis

Marc Wick

unread,
Feb 24, 2013, 10:36:33 AM2/24/13
to geon...@googlegroups.com
Hi Denis

The flags are already taken into account.
I can add some sorting behaviour, though not alphabetical as we then end
up giving precedence to characters and terms. We would end up having a
lot of provinces starting with the same characters and only few starting
with others.

Best Regards

Marc
> --
> 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 http://groups.google.com/group/geonames?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Denis Arnaud

unread,
Mar 1, 2013, 1:01:42 PM3/1/13
to geon...@googlegroups.com
Hi Marc,

any sorting order would be nice enough, as I just need something consistent/reproducible.

Kind regards

Denis
Reply all
Reply to author
Forward
0 new messages