Opened 15 years ago
Closed 14 years ago
#70 closed enhancement/feature request (duplicate)
automatically abbreviate street names if place is sparse
Reported by: | anonymous | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | core | Version: | |
Severity: | Keywords: | ||
Cc: |
Description
it would be nice if street names could automatically be abbreviated.
Like f.e. "Landwehrstraße" to "Landwehrstr." in the top left of the example screenshot: http://wiki.navit-project.org/index.php/Image:Navit-liberation.png
(likewise "Road" Rd, "Street" St, "Place" Pl, "Lane" Ln, "Avenue" ...)
Change History (3)
comment:1 Changed 15 years ago by KaZeR
comment:2 Changed 15 years ago by anonymous
I'd expect something along the lines (trying some buggy pseudo-code)
const char * substitute_trailing_de_at[][2] = { { "strasse", "str."}, { " Strasse", " Str."}, { "weg", "w."}, // seen this abbreviation on several printed maps { " Weg", " W."}, { "gasse", "g."}, { "platz", "pl."}, { " Platz", " Pl."} } if( (0 == strstr(locale, "de" || 0 == strstr(locale, "at") && (maparea == DE || maparea == AT || maparea == CH )) { for( i = 0; i < sizeof something / sizeof somethingelse; i++ ) { if( islaststring(streetname, substitute_trailing_de_at[i][0] )) { substitute(streetname,substitute_trailing_de_at[i][0],substitute_trailing_de_at[i][1]; // characters_saved += strlen(substitute_trailing_de_at[i][0]) - strlen substitute_trailing_de_at([i][1]); } } }
comment:3 Changed 14 years ago by KaZeR
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #43
Note: See
TracTickets for help on using
tickets.
Question is how to determine how it should be abbreviated. Could you expand ?
Cutting straße to str. works only in german. In French for exemple, you would say "Rue de l'étoile' which can't be easily shotened.