OSM Abbreviations

The osm-abbrev project provides abbreviations of addresses. Especially names of streets, places and other geographic places.

Why abbreviations for street and place names?

Abbreviated street names on maps help to increase the infomration density as you can see very well on the comparison between OpenStreetMap.org with long and OpenStreetMap.de with shortend street names below.

Long names Short names
img_org img_de

Installation

If you just installed the debian package all you have to do now ist to enable the extension in your PostgreSQL database:

1
 CREATE EXTENSION osmabbrv;

Usage

The following functions are provided for use in the database. This sample will return

1
 SELECT osmabbrv_street_abbrev_all('Gutenbergstrasse')

Gutenbergstr. to be used later.

Contributions

The project is far away from being completed, if you would like to contritute a little bit or a lot feel free to fork and hand in pull-request or just open an issue. Below are some major steps on the roadmap, but priorities may change.

Abbreviation rules

Target generators

The next ToDos

  1. [ ] Build a Vagrant development box.
  2. [ ] Export .csv definition to pgSQL (PostGre Extension).
  3. [ ] Export .csv definition to Markdown
  4. [ ] Export .csv definition to JSON.
  5. [ ] Export .csv definition to XML.
  6. [ ] Export .csv definition to Python.

About the build

The architecture is focused on two parts:

  1. A set of CSV files, one per language to define the rules and testcaeses.
  2. A another set of generators or implementations to provide solutions for as many languages & formats as possible. Currently main target are JSON and PGPLSQL, but feel free to extend it with any language you master well.
  3. Integrated tests in the CI/CD pipeline to prove that the code produced by 2. is working well according to the testset of 1.
https://raw.githubusercontent.com/chatelao/osm-abbrev/master/img/build/build.png

Special thanks

The technical foundation and inspiration for this project was laid in the mapnik-german-l10n project, which focus on transliteration of maps. Having is recommended for all omni-lingual fans, as well as the use of OpenStreetMap.de.