Created: 2011-07-15 10:29
Updated: 2017-06-08 16:09
License: mit

MVP OSM: a tool to highlight high activity areas in OpenStreetMap based on detail level

By observing the world map offered by the OpenStreetMap community, it is relatively easy to realize which areas are higher in community activity and which are more marginal. A high level of detail can certainly be considered as a good indicator of OSM data quality in a particular area. The huge worldwide success of OpenStreetMap has been a magnet for further contributions by any kind of users... even those who don't have a GPS device and just import data retrieved from all sort of data sources. This way, the map has become increasingly rich, but the concept of data quality is often questioned.

MVP OSM is a tool to highlight areas where the OSMers have dedicated attention to such details which strongly require the use of a GPS device, or at least a deep knowledge of the mapped area and a consequent desire to see it represented the best way possible.




The input file is a SpatiaLite (the GIS extension for SQLite) file derived from an OSM map file through spatialite_osm_raw. This script processes the input file to create clusters, which are then used to derive single or multiple user activity on the area. Vector geometries and heat maps can be plotted from the output file using a tool such as QGIS.


  • python >2.7
  • spatialite >2.4
  • spatialite-tool (spatialite_osm_raw)
  • numpy


  1. Export a small area from the OSM archives in the form of an .osm file (unpack it to get the osm file)

  2. Convert the .osm file with spatialite_osm_raw e.g.: spatialite_osm_raw -o trentino_alto_adige.osm -d trentino_alto_adige.sqlite

  3. Launch the script python -i trentino_alto_adige.sqlite -o output.sqlite

  4. Explore your data e.g.: you could use QGIS Desktop and add output.sqlite as a SpatiaLite Layer.


If you want to visualize your output as a heatmap, we suggest to

  1. convert the .osm file into a SpatiaLite map first e.g.: spatialite_osm_map -o trentino_alto_adige.osm -d

  2. load both output.sqlite and as SpatiaLite Layers in QGIS

  3. Drag and drop all layers from

  4. Drag and drop layer "petlocations" from output.sqlite

  5. Set layer transparency to 90% for "petlocations"


Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more