Ticket #70 (closed enhancement/feature request: duplicate)

Opened 10 months ago

Last modified 3 months ago

automatically abbreviate street names if place is sparse

Reported by: anonymous Assigned to: somebody
Priority: major Milestone:
Component: core Version:
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

01/28/08 01:56:56 changed by KaZeR

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.

02/25/08 21:47:15 changed 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]);
        }
    }
}

08/20/08 17:45:15 changed by KaZeR

  • status changed from new to closed.
  • resolution set to duplicate.

Duplicate of #43