Attention: For current news look at www.omniscale.com

Development of a modern city map based on official data and OpenStreetMap

In 2013 Omniscale developed an attractive city map for the German state of Mecklenburg-West Pomerania .

A special feature for this map is that official data from the public administration as well as data from the OpenStreetMap project were processed and displayed on a single map.

At the beginning of this year the city map was updated. In addition a new web application, based on the OpenLayers 3 library, was developed.

The data

To display official data from the public administration combined with data from the OpenStreetMap project the data has to be processed and simplified. The data was transformed into the coordinate system UTM 32 and was imported into a PostGIS database

OpenStreetMap

For the import of the OpenStreetMap data the open source software Imposm was used. Imposm is designed to create databases that are optimized for rendering services.

From the OpenStreetMap project all streets, areas, building labels, all water areas and points of interest (POIs) were imported. POIs are not displayed on the map by default, but they can be selected and printed in the web application by the user.

Imposm can limit imported geometries. Geometries outside the polygon were deleted or truncated, in this case the data from Mecklenburg-West Pomerania were used.

During the import Imposm optimizes the data for rendering. Imposm creates generalized tables with lower spatial resolutions automatically: This is perfect for rendering large road networks in low resolutions.

Data from public administration

From the data of the public administration all buildings with house numbers, the land use and the borders were used.

During the import the data is optimised as well. In this case, the number of polygons were drastically reduced. Areas with the same type of use are rendered in the same color and so these areas can be combined and simplified. With this optimization the number of objects to draw, and therefore the time it takes to render a map, has been reduced.

Updating the data

The system was developed to allow an update of the official data by changing the official source shapefiles. An import script performs all other import and optimization steps automatically.

For updating the OpenStreetMap data the open source software Osmosis with diff-support was used. Diffs are small compressed XML files that contains the changes in the OpenStreetMap data over some period in time. After updating the OSM file with the diff, Imposm was used to import the data in the database again. Future iterations of the project can avoid the extra step with Osmosis by use of the new Imposm 3 release.

The Map

For the server-based map rendering the open source software MapServer was used. Besides the technical realization, the focus was also on the individual design of the maps. The design was adapted to the requirements of the customer.

On the first development iteration MapServer 6 was used. Particular emphasis was laid on the on the labelling of streets. The aim for the city map was to label as many streets as possible. Because of this, a lot of labels were placed often in curved or ring-shaped streets. Thus a lot of labels were hard to read.

In the course of this project the labeling of MapServer was improved. MapServer now moves labels away from sharp corners until they are readable. The following image show labels rendered with MapServer 6 and with a development version of MapServer 7.

The city map service is also provided by the open source software MapProxy. MapProxy accelerates the map service and provides a WMS and a tile service. MapProxy is also responsible for updating of the tiles when the OSM data changed during a new import.

Application

To reach people you need more than a map. Therefore Omniscale developed a new web application which uses the city map and adds additional functions.

The application based on OpenLayers 3 combined with AngularJS. The complete application was published as open source project Anol.

On the FOSSGIS-conference, the largest german-language conference for Free and Open Source Software for GIS and Free Geodata, we will introduce Anol for the first time. Afterwards we will write an article in this blog an introduce Anol in detail.

Additionally, the application provides POIs. The user can display different POIs of a specific category and personal interests on the map.

The application and the city map service were also extended by a print service. Ominiscale's print service makes it possible for the user to download a map in a high quality. The maps are available for download in various image formats (PNG, PDF, SVG, etc.) and with a resolution of 300 DPI.

In addition to the download of the maps, the application allows to create a search grid including a street index for the selected region. This function is typically known from city maps. The search grid is displayed on the map and all streets in the index can be easily located on the map with the reference to the corresponding grid cell.

Additional links