NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Short question:

How do I inform OSM renderers that some common streetname words should be abbreviated?

Long question:

This maybe a question about Mapnik, but it can be useful for contributors from non-English speaking countries.

It seems reasonable that streetnames in OpenStreetMap should be always in their unabbreviated versions, with very few exceptions. This is better for searching/geocoding and avoiding duplicates.

But maps can be cluttered while rendering long streetnames in certain areas, so my question is, how can I inform Mapnik or other renderers used by OpenStreetMap that a streetname started with "Avenida" should be rendered as "Av."?

These are examples from my country, Brazil, but I'm sure mappers from other parts of the world have the same problem:

"Avenida Doutor Ricardo Jafet" => "Av. Dr. Ricardo Jafet"

"Rua Professor Roberto Hottinger" => "R. Prof. Roberto Hottinger"

asked 28 Jul '11, 19:36

vgeorge's gravatar image

vgeorge
2014610
accept rate: 0%

in Potlatch 2, in the "naming" tab, you have an "alternative name" field: search for its use, maybe it can convey what you need?

(29 Jul '11, 10:52) Herve5
2

I think this tag is more suitable for completely different names, and it is more efficient to have renderers and geocoders to handle country-specific abbreviations.

(29 Jul '11, 18:42) vgeorge

adding tags for alternate names (in the same language specified by the language suffix) is certainly the best solution for the general case. Renderers will then select the longest name that fit in their rendering style. But renderers may also automatically recognize some common words that can be abbreviated, provided the language code is specified, and knowing the linguistic rules about how peoples are named (this allows abbreviating known first names, keeping the last name that occurs most often after the first name in most languages). In case of ambiguity, the other translations may help.

(28 May '12, 07:22) Verdy_p

There is actually a list of common abbreviations for various languages used by Name Finder and Nominatim: http://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations

I can't speak for Mapnik, but as the developer of Maperitive, I intend to add support for user-defined abbreviations in Maperitive in the near future.

permanent link

answered 28 Jul '11, 20:33

Breki's gravatar image

Breki
2.0k51843
accept rate: 10%

For anyone looking at doing anything like this, I added a comment to the potlatch2 enhancement request aimed at doing the reverse: http://trac.openstreetmap.org/ticket/3432

It obviously can be done, but it's difficult and requires a lot of thought. At the organisation I work for, we decided it was too risky because of what we are doing with the data.

(29 Jul '11, 17:48) c2r
1

c2r: This is very country specific, but seems a good idea. It would be useful to have a plugin in JOSM for that.

Breki: I've asked in the talk-page for Nominatim in wiki about this six months ago and no one aswered, so it seems that it's not the right communication channel with the developers. I have no problem in coding this myself, but I can't find instructions to do so.

(29 Jul '11, 18:40) vgeorge

Automatically generating abbreviations or deciphering abbreviations into full words is horribly complicated and can easily fall into stupidities. For these reasons, acceptable abbreviations should better be part of tags. But as "alt_name:*" are used for completely different alternate names.

(28 May '12, 07:32) Verdy_p

I would suggest adding variants like equivalent abbreviations by appending a numeric suffix to the key, e.g. "name:2"="value of name abbreviated", "name:fr:2"="valeur de name:fr abrégée". The numeric suffix can grow if the name is more abreviated and several levels of abbreviations are used. The standard key for each language or for the default language (without the language code) should be the full unabbreviated name.

(28 May '12, 07:32) Verdy_p

Note however that some places have used the key "short_name" for abbreviations. We may also avoid multiple keys for several levels by using a list of values separated by semicolons. Another idea could be to set a key like "name:suffix:en=Street", "name:prefix:fr=Rue", to indicate which parts of the name is an abbreviatable prefix or suffix in the full street name given in key "name:", or the opposite by indicating the key "name:main:" to indicate which part in "name:*" should NOT be abreviated (the rest being resolved according to generic rules for each language)

(28 May '12, 07:39) Verdy_p

I know, that this can be implemented independently in different rendering engines, but the majority of users will probably still use mapnik/osm.org. Personally I would love to have a button [Abbreviate names] on osm.org next to the layers widget! :)

@Verdy_p: Generating full names from abbreviations is certainly tricky. But abbreviating "Street" to "St." (and others: osm.org/wiki/Name_finder:Abbreviations) should be quite easy since we probably know the correct language either from the coordinates or the (name:en=*) tag. But maybe I'm missing something here. [See below...]

If the abbreviation can be obviously generated from the name without any doubt (as in East Street) then there is probably no point in adding complexity to the tagging scheme. Only if the automatic abbreviation is likely to fail ('Thomas Street' Square > 'Thomas St.' Sq.) then a more complex tagging makes sense.

(23 Nov '12, 18:08) Zeptomoon
showing 5 of 6 show 1 more comments

In the case of Mapquest, they already do this for the USA (have a look here for an example). You could try and influence them to do the same (with presumably different abbreviations) for your country too.

permanent link

answered 23 Nov '12, 18:25

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

-1

Shortened names should IMHO be in short_name tag, possibly with several values. This way the rendered does not need to make up an abbreviation itself, following numerous national conventions, but rather select one of the predefined ones.

Example

name=Střední odborná škola civilního letectví
official_name=Střední odborná škola civilního letectví, Praha - Ruzyně 
short_name=SOŠCL Praha-Ruzyně;SOŠCL Pha-Ruz.

I can imagine that renderer decides what is the longest text which can fit in the label (in particular context) and than select longest form from name / short_name which fits in there.

permanent link

answered 08 Nov '19, 20:24

gorn's gravatar image

gorn
542212537
accept rate: 11%

edited 08 Nov '19, 20:35

Different renderers want to abbreviate differently in different situations. I find it difficult to ask the mapper to cater for all different needs by putting a list of possible short names on an object.

(08 Nov '19, 21:27) TZorn

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×440
×341
×193
×133
×111

question asked: 28 Jul '11, 19:36

question was seen: 13,040 times

last updated: 08 Nov '19, 21:27

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum