Tagged: How to win the lottery?
- AuthorPosts
- October 5, 2016 at 22:39 #13335JohnPercyParticipant
When rendering vector maps, Locus often has difficulty in fitting street names on to segments of highways, especially at tile boundaries. A possible help would be to abbreviate the displayed street names, such as changing “Street” to “St”, as suggested here: http://wiki.openstreetmap.org/wiki/Names#Abbreviation_.28don.27t_do_it.29 using a standard table such as http://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations though this may be best done in the stage of preparing the maps.
I have suggested this in the Locus Helpdesk but it may be better treated as a suggestion for the preparation of the OpenAndroMaps maps themselves.Voluntary and Velocity themes - https://voluntary.nichesite.org
October 6, 2016 at 15:28 #13375ChristianKKeymasterHi John!
IMO a good idea – I will give it a try it in TagTransform preprozessing.
However, I will limit this to Street > St
Its the most common abbreviation, more of this would mean to create a seperate tool that have to scan the whole database against a table of name/abreviations = tonns of Gigabytes – and this would mean many hour of prozessing for big maps.
The same would happen if I add numerous rules for tagtransform.Best regards
ChristianOctober 6, 2016 at 17:29 #13381TobiasKeymasterHi Christian and John,
I also think it’s a good idea, I recently stumbled upon a similar topic (discussion that abbreviated street names are not liked in OSM) and thought about proposing it, so thanks for looking into it 🙂
@Christian: I would say adding the most common/notorious cases would make sense, not just street. I’m with you when you say the whole too much, just the most common languages with the most common cases, e.g. with usually quite long street names in German, strasse/straße > str. and Straße/Strasse -> Str., or Spanish Calle > c/
Best regards,
TobiasDeveloper of Elevate mapstyle
October 6, 2016 at 19:48 #13385ChristianKKeymasterThis week I installed another SSD for better load balancing and found several optimizations for saving RAM so this should’nt be a problem and IMO this will result in much better rendering of street names.
Again, very good idea!I will render Spain, UK and Austria for testing.
<translation> <name>replace name|name:en = ".* Street" with ".* St"</name> <description>replace name|name:en = ".* Street" with ".* St"</description> <match type="way" mode="and"> <tag k="highway" v=".*"/> <tag k="name" match_id="_name" v="(.*)([s|S]t)reet"/> </match> <output> <copy-all/> <tag k="name" from_match="_name" v="{1}{2}"/> </output> </translation> <translation> <name>replace name|name:en = ".* Street" with ".* St"</name> <description>replace name|name:en = ".* Street" with ".* St"</description> <match type="way" mode="and"> <tag k="highway" v=".*"/> <tag k="name:en" match_id="_name" v="(.*)([s|S]t)reet"/> </match> <output> <copy-all/> <tag k="name:en" from_match="_name" v="{1}{2}"/> </output> </translation> <translation> <name>replace name|name:de = ".* Strasse|Straße" with ".* Str."</name> <description>replace name|name:de = ".* Strasse|Straße" with ".* Str."</description> <match type="way" mode="and"> <tag k="highway" v=".*"/> <tag k="name" match_id="_name" v="(.*)([s|S]tr)a(ss|ß)e"/> </match> <output> <copy-all/> <tag k="name" from_match="_name" v="{1}{2}."/> </output> </translation> <translation> <name>replace name|name:de = ".* Strasse|Straße" with ".* Str."</name> <description>replace name|name:de = ".* Strasse|Straße" with ".* Str."</description> <match type="way" mode="and"> <tag k="highway" v=".*"/> <tag k="name:de" match_id="_name" v="(.*)([s|S]tr)a(ss|ß)e"/> </match> <output> <copy-all/> <tag k="name:de" from_match="_name" v="{1}{2}."/> </output> </translation> <translation> <name>replace name|name:es = ".* Calle .*" with ".* c/.*"</name> <description>replace name|name:es = ".* Calle .*" with ".* c/.*"</description> <match type="way" mode="and"> <tag k="highway" v=".*"/> <tag k="name" match_id="_name" v="(.*)Calle (.*)"/> </match> <output> <copy-all/> <tag k="name" from_match="_name" v="{1}c/{2}"/> </output> </translation> <translation> <name>replace name|name:es = ".* Calle .*" with ".* c/.*"</name> <description>replace name|name:es = ".* Calle .*" with ".* c/.*"</description> <match type="way" mode="and"> <tag k="highway" v=".*"/> <tag k="name:es" match_id="_name" v="(.*)Calle (.*)"/> </match> <output> <copy-all/> <tag k="name:es" from_match="_name" v="{1}c/{2}"/> </output> </translation>
Best regards
ChristianOctober 7, 2016 at 16:31 #13424ChristianKKeymasterSpain Map crashed (RAM issues, nothing related to TagTransform) so maps for testing are:
UK-Scotland, Great_Britain, Austria – available Saturday 8:00h am MEZ.I will add some more abreviations for the next update like
French: Avenue > Av.
@Tobias:
German: (.*)gasse > (.*)g. ?Best regards
ChristianOctober 7, 2016 at 22:06 #13441TobiasKeymasterOctober 8, 2016 at 22:30 #13543TobiasKeymasterSpain Map crashed (RAM issues, nothing related to TagTransform) so maps for testing are:
UK-Scotland, Great_Britain, Austria – available Saturday 8:00h am MEZ.I had a look at Austria an Scotland, definitely better at ZL 16/17, but of course still problems with really long names.
Also no error found at first glance. Good work!Developer of Elevate mapstyle
October 9, 2016 at 00:36 #13551JohnPercyParticipantGreat Britain works fine, as well!
A quick check with taginfo tells me that:
” street” occurs 288,961 times in name
” road” occurs 717,478 times
” drive” occurs 304,842 times
” avenue” occurs 175,000 times
I haven’t been through the full list but at least “road” and “drive” crop up more frequently than “street”.Voluntary and Velocity themes - https://voluntary.nichesite.org
October 9, 2016 at 10:16 #13564TobiasKeymasterI dug also a bit deeper, here are some abbreviations that would also make sense. Only the more common languages, only more than 10,000 times, and where the abbreviations make sense (Italian often saves only one letter…):
DE:
Platz -> Pl.EN:
Boulevard -> Bvd
Highway -> Hwy
Square -> SqES:
Avenida -> Av.
Camino -> Cno.
Carretera -> Ctra.
Plaza -> Pl.FR:
Allée -> All.
Avenue -> Av.
Boulevard -> Bd.
Place -> Pl.
Ruelle -> RLENL:
Straat -> str.RU:
улица -> ул.Sometimes there might be some language conflicts, e.g. Plaza/Place/Boulevard are used in several languages, I used the abbreviations of the word origin.
Developer of Elevate mapstyle
October 9, 2016 at 15:20 #13598JohnPercyParticipantAlso possibly:
” Close” -> Cl. 52k
” Court” -> Ct. 201k
” East” -> E. 39k
” West” -> W. 51k also ” North” and ” South”
“Highway” -> Hwy 18k
” Lane” -> Ln 247kVoluntary and Velocity themes - https://voluntary.nichesite.org
October 16, 2016 at 14:52 #13841ChristianKKeymasterI haven’t forgotten this issue.
However, I played arround a lot with tagtransform trying to combine abr.rules cause each abr. needs at least 2 Rules (name:default, name:[##]).
In short: it is not possible build abr. from multiple search patterns. Its posiblle to search in multiple pattern seperated by the pipeline symbol and return the search string but you cant build an abreviation out of it.
So I will concentrate on abr. where the effort pays off.EDIT: Found a solution 🙂 , at least for “real” abreviations like Street > ST – for abr. like Highway > Hwy I have to make seperate rules.
- AuthorPosts
- You must be logged in to reply to this topic.