You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's your idea for a cool feature that would help you use OHM better.
As preparation for multilingual label / browser locale label support, we should add all name:* keys to the vector tiles.
Current workarounds
None, as only the base name key is currently available in the vector tiles.
As a reminder, this isn’t specific to any particular layer: any layer that exposes name should also expose name:*.
There are a few subkeys we might not want to expose, such as name:pronunciation and name:etymology. Now that we’ve settled on name:source instead of source:name, we’ll need to exclude that key too. (We might need to restore it later, in a different form, as part of #559.) A regular expression such as ^name:\w{2,3}(-[^:]+)?$ should match every name key that we would want to expose.
Here's the HRE chronology relation with multiple localized names. The member relations also have localized names. And... the members of those relations (E.g., HRE 962-1002), should be any number of member states (E.g., Duchy of Lotharingia) with multiple name strings.
I'm sure there's a clever Overpass Turbo query @1ec5 could provide to generate a more thorough list, but that's beyond the range of my immediate memory / Overpass-fu.
However, in some cases, like Jeff's example, some language names are not displaying, such as name:nds_nl and name:nds. Those attributes has not been imported into the database. It seems to be an issue with imposm, so I have updated the version of the imposm container, but even so, those attributes are not appearing yet. Maybe some other configuration in imposm is required. I am going to dive deeper into this, but the other common languages are already in the vtiles staging and ready for testing.
I have implemented support for all languages listed in the Language-related subkeys section. Those already visible in vtiles staging:
This works for now, though I’m not sure this will be a scalable solution long-term. OpenHistoricalMap/ohm-deploy@15e5a39 enumerates a ton of languages explicitly, presumably because you need each one in a separate column. But even the expansive list on that wiki page will eventually be inadequate, because OHM will likely care about historical languages too. (Also, name:left is a valid key but not for language support.)
Would it be possible to add fields based on the regular expression in #679 (comment)? The general syntax is name: followed by any valid IETF language tag according to the BCP 47 standard. You could store the names in an hstore to avoid having to write out each column by hand. go-spatial/tegola-docs#8 says Tegola does support hstores in this manner.
However, in some cases, like Jeff's example, some language names are not displaying, such as name:nds_nl and name:nds.
Dutch Low Saxon should be name:nds-NL, rather than name:nds_nl, based on the BCP 47 standard.
Tegola displays attributes according to the columns. so I was testing two approaches:
Using Regex in a function, where the tags (hstore) are passed as an argument to the function, it returns a list of filtered name:*. The function performs an evaluation with a loop over each key/value, which takes time according to the number of tags. This query is more expensive and takes longer to complete a tile request.
I understand the list could be lengthy, but it takes almost the same time as a request without the language filters. Tegola handles null values effectively. so Currently, this woudl be the best approach, considering the time it takes.
OK, that’s pretty impressive then. At least images/tiler-server/config/lenguages.sql is pretty straightforward for us to modify in the future if we need to add more languages.
Looking through that file, I think we should add some script-qualified codes as well:
A user is considerably less likely to be using a browser in one of these historic languages, but they might choose to enable it in their OHM settings or using a URL parameter.
The lists above only include valid, non-deprecated codes.
I have added the additional languages. Since the column labels do not support : and - signs, they have all been replaced with _(underscore). Therefore, tags like:
Activity
jeffreyameyer commentedon May 29, 2024
@Rub21 - can we add these
name:*=*values to theland_ohm_centroidslayer now?1ec5 commentedon May 29, 2024
As a reminder, this isn’t specific to any particular layer: any layer that exposes
nameshould also exposename:*.There are a few subkeys we might not want to expose, such as
name:pronunciationandname:etymology. Now that we’ve settled onname:sourceinstead ofsource:name, we’ll need to exclude that key too. (We might need to restore it later, in a different form, as part of #559.) A regular expression such as^name:\w{2,3}(-[^:]+)?$should match every name key that we would want to expose.Rub21 commentedon Jul 26, 2024
@jeffreyameyer @1ec5 do you have some objects as example in OHM?
Rub21 commentedon Jul 26, 2024
I found one: https://www.openhistoricalmap.org/node/2091139302
jeffreyameyer commentedon Jul 26, 2024
Here's the HRE chronology relation with multiple localized names. The member relations also have localized names. And... the members of those relations (E.g., HRE 962-1002), should be any number of member states (E.g., Duchy of Lotharingia) with multiple name strings.
I'm sure there's a clever Overpass Turbo query @1ec5 could provide to generate a more thorough list, but that's beyond the range of my immediate memory / Overpass-fu.
Rub21 commentedon Jul 29, 2024
I have implemented support for all languages listed in the Language-related subkeys section. Those already visible in vtiles staging:
https://vtiles.staging.openhistoricalmap.org/#20/37.6994257/36.592885

https://vtiles.staging.openhistoricalmap.org/#13.78/51.89969/21.25611

However, in some cases, like Jeff's example, some language names are not displaying, such as
name:nds_nlandname:nds. Those attributes has not been imported into the database. It seems to be an issue with imposm, so I have updated the version of the imposm container, but even so, those attributes are not appearing yet. Maybe some other configuration in imposm is required. I am going to dive deeper into this, but the other common languages are already in the vtiles staging and ready for testing.Rub21 commentedon Jul 29, 2024
It seems Jeff’s example has issues in the data: https://www.openhistoricalmap.org/relation/2750624. I have added boundary=administrative to the relation, but it is not clear which members are part of the relation.
Additionally, I found another relation: https://www.openhistoricalmap.org/relation/2805484, which is related to the Roman Empire. This one is fine, and the language tags are displaying correctly.

@vknoppkewetzel This is ready for styling!
1ec5 commentedon Jul 29, 2024
This works for now, though I’m not sure this will be a scalable solution long-term. OpenHistoricalMap/ohm-deploy@15e5a39 enumerates a ton of languages explicitly, presumably because you need each one in a separate column. But even the expansive list on that wiki page will eventually be inadequate, because OHM will likely care about historical languages too. (Also,
name:leftis a valid key but not for language support.)Would it be possible to add fields based on the regular expression in #679 (comment)? The general syntax is
name:followed by any valid IETF language tag according to the BCP 47 standard. You could store the names in an hstore to avoid having to write out each column by hand. go-spatial/tegola-docs#8 says Tegola does support hstores in this manner.Dutch Low Saxon should be
name:nds-NL, rather thanname:nds_nl, based on the BCP 47 standard.Rub21 commentedon Jul 29, 2024
Tegola displays attributes according to the columns. so I was testing two approaches:
Using Regex in a function, where the tags (hstore) are passed as an argument to the function, it returns a list of filtered name:*. The function performs an evaluation with a loop over each key/value, which takes time according to the number of tags. This query is more expensive and takes longer to complete a tile request.
The list is based on hstore https://github.com/OpenHistoricalMap/ohm-deploy/blob/staging/images/tiler-server/config/lenguages.sql , the column tags is hstore data-type in the database . Basically, we are using hstore in the database and to get valalues from it , we run
tags -> 'name:ab' AS name_ab. I understand the list could be lengthy, but it takes almost the same time as a request without the language filters. Tegola handles null values effectively. so Currently, this woudl be the best approach, considering the time it takes.Regarding Tegola's support for
hstore, go-spatial/tegola-docs#8, I believe it refers to what we already use:tags -> 'name:ab' AS name_ab.I am going to to remove that key/value
I think this section is related to data
1ec5 commentedon Jul 29, 2024
OK, that’s pretty impressive then. At least images/tiler-server/config/lenguages.sql is pretty straightforward for us to modify in the future if we need to add more languages.
Looking through that file, I think we should add some script-qualified codes as well:
name:ko-Hani(Korean in Hanja)name:sr-Latn(Serbian in Latin)name:vi-Hani(Vietnamese in chữ Nôm)name:zh-Hans(Simplified Chinese)name:zh-Hant(Traditional Chinese)Here are additional modern languages that are in use in the OHM database, from most common to least common:
name:sme(Northern Sami)name:bua(Buryat)name:old(Central Kilimanjaro, but in practice a misspelling ofold_name)name:ale(Aleut)name:be-tarask(Taraškievica, an exception to the usual format granted by the IANA)name:tpi(Tok Pisin)name:tzm(Central Atlas Tamazight)name:cst(Ohlone)name:tli(Tlingit)name:lut(Lushootseed)name:pes(Iranian Persian)name:hyw(Western Armenian)name:hye(Eastern Armenian)name:jam(Jamaican Patois)name:int(Intha-Danu, but in practice a misspelling ofint_name)name:ksb(Shambala, but in practice a misspelling ofname:csb)name:chn(Chinook Jargon)name:evn(Evenki)name:yrk(Nenets)name:rif(Tarifit)Here are additional historical languages that are in use in the OHM database, from most common to least common:
name:egy(Egyptian)name:sux(Sumerian)name:orv(Old East Slavic)name:akk(Akkadian)name:mkh-x-mvi(Middle Vietnamese)name:cop(Coptic)name:xaa(Andalusi Arabic)name:peo(Old Persian)name:phn(Phoenician)name:zkg(Goguryeo)name:gez(Geʽez)name:otk(Old Turkic)name:prg(Old Prussian)name:mga(Middle Irish)name:hit(Hittite)name:mxi(Andalusi Romance)name:elx(Elamite)name:xib(Iberian)name:xpu(Punic)name:xng(Middle Mongol)name:txg(Tangut)name:okm(Middle Korean)name:pal(Middle Persian)name:nci(Classical Nahuatl)A user is considerably less likely to be using a browser in one of these historic languages, but they might choose to enable it in their OHM settings or using a URL parameter.
The lists above only include valid, non-deprecated codes.
Rub21 commentedon Jul 31, 2024
I have added the additional languages. Since the column labels do not support
:and-signs, they have all been replaced with_(underscore). Therefore, tags like:name:mkh-x-mvi->name_mkh_x_mvi.name:nci->name_ncidanrademacher commentedon Aug 27, 2024
This is done and deployed to staging and prod