Nice, France/Buildings Heights Import

From OpenStreetMap Wiki
Jump to navigation Jump to search


The goal of that import is to update existing OSM buildings of Nice with height information (see Key:height tag).


Almost all buildings of Nice are already into OSM (thanks to the data import of the French land registry) but there is no height data and so no realistic 3D view of the city of Nice is possible.

Luckily enough, the city of Nice has an OpenData website where Digital Elevation Models (DEMs) are available under the ODbL licence:

  • Digital Terrain Model (DTM) or Modèle Numérique de Terrain (MNT) in french: it contains the elevation of the ground (ie. excluding vegetation and buildings).
  • Digital Surface Model (DSM) or Modèle Numérique de Surface (MNS) in french: it contains the elevation of the surface (ie. including vegetation and buildings).

With these 2 datasets, it is possible to calculate a maximum height of each building already present in OSM.


The import should be launched only once in September 2017.

Import Data


Data source site: Open Data de Nice Côte d'Azur (
Data license:
Type of license: Open License (OL/LO).

OSM Data Files

There's no prepared files since the import program updates directly buildings into the OSM database via the OSM API.

Import Type

The import is designed to be launched one-time (although it can be relaunched many times).

All the process is automatic and done in one shout.

Data Preparation

Data Reduction & Simplification

There's no special reduction or simplification since the imported data are elevation ("Z") values from DEM files (DSM + DTM).

Tagging Plans

On each created changeset there are 2 tags :

Changeset Tags

Every 1000 updated buildings a new changeset is created with the tags described above.

Data Transformation

The only data transformation is to add a new building:height tag to the way-building, nothing more.

Data Merge Workflow

There's no merge workflow because data are directly imported via the OSM API.

But note that the import is not aggressive: it updates a building only if the relative way element has no building:height tag already present. That way it cannot disturb works of other contributors.

Team Approach

I'm doing it solo for now but any help or suggestions are welcome.

The software itself is available on GitHub :

The import has been discussed on french forum and on the talk-fr mailing list.


Well there's no really workflow since the import process is fully automatic. The only thing to do is to the launch the main class :)


As described above there's no big risk of conflation since the program doesn't touch buildings which have already a building:height tag.


A lot of manual checks has been performed on hundreds of buildings.

Theses checks was based on the Google Earth because the area of Nice is covered by the photogrammetry technology of Google so it's very easy to see elevation of buildings and compare them with the elevation of the ground.

At the end I can say that the accuracy is very good, about ~1 meter.


The imports into the live database was done on 2017-09-27 and the settings were like that:

  • Minimum matching score is: 0.3
  • Minimum matching point is: 4
  • Tolerance delta is: 1 meter
  • Building skrink radius: 2 meters

Here are the results:

  • Total of targeted elements (ie. buildings which are inside filtering areas): 101799
  • Total of matched elements (ie. buildings which have at least one matching point): 58174
  • Total of matching points (ie. points which are inside a targeted building): 8315657
  • Average of matching points by building: 142
  • Total of updatable buildings: 52315
  • Total of updated buildings: 52310