Jennings Anderson
Project EPIC, Dept. of Computer Science
University of Colorado Boulder

February 22, 2017

Opening Question

What type of OSM data needs do you have?, Amy Lee Walton (Mapbox Gallery), Stamen Designs, MapOnShirt, MaptimeSLC

OpenStreetMap is everywhere

..all of these companies

(Mapbox Clients)


National Geographic

"Improve this Map"

If not this, then typically OSM

Port-Au-Prince, Haiti

January 10, 2010: 7.0M earthquake strikes Haiti

2010 Haiti Earthquake (wikipedia)

Haiti Earthquake 2010

2013 Typhoon Yolanda (Philippines)

Nepal Earthquake 2015

The Open Database License (ODbL)

OSM Data Model

Semi-Structured GeoSpatial Data

Points? Lines? Polygons?

Points, Lines, Polygons

Nodes, Ways, Relations (sort of)

OpenStreetMap Data: Node


OpenStreetMap Data: Way


OpenStreetMap Data: Way


OpenStreetMap Data: Tags

  • Descriptive, non-spatial characteristic of a map object
  • Unrestricted key-value pairs added to any map object.

Example tags for OSM objects in New York City

Objects w/ tag Key Most-common values
66% building yes, garage, house, school
64% height 8.2, 8.0
13% highway residential
11% name (various)
2% amenity parking, bicycle parking

OSM Data Types

xml (.osm / .osh)
pbf (.osm.pbf .osh.pbf)
Vector Tiles(.mbtiles)

Obtaining OSM Data

Overpass API

Optimized for read-only DB access.

Custom query language

The Overpass Turbo project is very helpful

Full history file is also available:

- Every version of an object

- Timestamp, user, version #
Vector Tile Description

Tools for Handling OSM Data

Benefits of an active dev community:
There are a lot of them, depending on your needs

osmium library

The primary library for working with full OSM data formats.

Written in C++, ported to Python, Node

Standalone utility as well



Command-Line utility to populate PostGIS database with OSM data


Tile Reduce 3 OSM Coverage from Mapbox on Vimeo.

Tile Reduce Example

OSM Lint (Bridge On Node)

use 'strict';
var turf = require('turf');

// Identify Point geometries with a bridge tag.
module.exports = function(tileLayers, tile, writeData, done) {
  var layer = tileLayers.osm.osm;
  var result = layer.features.filter(function(val) {
    if ( && (val.geometry.type === 'Point')) { = 'bridgeonnode';
      return true;

  if (result.length > 0) {
    var fc = turf.featureCollection(result);
    writeData(JSON.stringify(fc) + '\n');

  done(null, null);

Tile-Reduce Examples

OSM Lint

My OSM Analyses (osm-analysis-collab with Mapbox)

OSM Analytical Databases

Currently an active area of research...

Open Schema?


MongoDB: NoSQL document store. Works for smaller areas (small Countries) Epic-OSM

Who are the stakeholders?




Tile Reduce


Contributor Centric QA