Hi!
Maybe someone will help solve my problem…
On my custom map I’ve road shields with it name/number.
For secondary and tertiary I get some OSM internal refs which are useless (no real live use while navigation).
I would like to get rid of them.
Example crossing: https://www.openstreetmap.org/#map=18/52.31347/21.00157
Secondary 633 is OK, tertiary 5580W - not.
Lines code:
highway = secondary & ref! (~ ‘[0-9][0-9][0-9][0-9][A-Z]’) {name ‘${ref|highway-symbol:oval}’} [0x10d04 resolution 18-19 continue]
highway = secondary & ref ~ ‘[0-9][0-9][0-9][0-9][A-Z]’ [0x10d04 resolution 18-19 continue]
To goal is to not show shields for roads with OSM internal refs like 5580W.
Gerd, please take a look at provided link. At this crossing there is a road with ref 5580W.
This number is useless - there is no road called 5580W in real life so in such condition there no need to display shield with this number.
Rule which I try to appply need to hide shields for such roads.
In Germany you don’t see refs for tertiary roads on normal road signs but you find them on milestones and they are also used in newspapers in articles about construction work or accidents.
I don’t want to get rid of those road. I just don’t want to display shields for it. So working regex is needed with logic as follow:
If ref length = 5 and 1st char is digit[0-9] and 2nd char is digit[0-9] and 3rd char is digit[0-9] and 4th char is digit[0-9] and 5th char is letter[A-Z] don’t display shield for it.
The rule (highway=secondary | highway=tertiary) & ref=* {name ‘${ref|highway-symbol:oval}’; addlabel ‘${name}’} is only adding a shield. If you remove this line it does not remove the road from your map.
Edit…
After some more modifications of lines file I get what I need.
Moreover I dig deeper to find source of road naming and I found that those ref names are OK but I never saw it on road signs or maps.