Skip to main content
Back to blog

What is OpenStreetMap and why it matters

·8 min readOutdoor Tech

Most people interact with OpenStreetMap data every day without knowing it. If you have used Komoot, OsmAnd, or any app that shows a map but is not Google Maps, the data probably came from OSM. It is one of the largest open data projects on the internet, and it powers an enormous amount of the mapping infrastructure that developers take for granted.

I have been working with OSM data for Landbound and wanted to write down what I have learned about the project itself. Not just how to use the data, but how the whole system works.

Wikipedia for maps

Steve Coast founded OpenStreetMap in 2004 while at University College London. The motivation was simple: the UK's Ordnance Survey held detailed geographic data collected with public funding but would not release it freely. Coast figured that if Wikipedia could build an encyclopedia from volunteer contributions, the same model could work for maps.

The first contribution was a street that Coast traced on December 10, 2004, after cycling around Regent's Park in London with a GPS receiver. Almost 19 years later, OSM has over 10 million registered users and covers virtually every part of the planet. The data is released under the Open Database License, which means anyone can use it for any purpose as long as they attribute OSM and share modifications to the data itself.

The data model

OSM does not store maps. It stores geographic data. The distinction matters. There are no tiles, no rendered images, no styled layers in the database. Just raw geographic primitives and metadata.

The model has three element types and one annotation system:

graph TD
    N["Node<br/>lat/lon point"] --> W["Way<br/>ordered list of nodes"]
    W --> R["Relation<br/>group of nodes, ways, or relations"]
    N --> R
    T["Tags<br/>key=value pairs"] --> N
    T --> W
    T --> R

Nodes are points on the earth's surface, defined by latitude and longitude. A standalone node might represent a bench, a traffic light, or a drinking fountain.

Ways are ordered lists of nodes that form lines or polygons. A road is a way. A building outline is a closed way. A river is a way.

Relations group elements together to represent complex structures. A bus route is a relation containing multiple ways (the streets the bus travels) and nodes (the stops). A lake with an island is a relation containing the outer boundary and the inner cutout.

Tags are key-value pairs attached to any element. This is where the real power lives. There is no fixed schema. The community decides on conventions through consensus, and the tagging system is flexible enough to describe almost anything:

  • highway=residential for a residential street
  • amenity=cafe for a coffee shop
  • building=yes for a generic building
  • natural=water for a body of water
  • name=Marienplatz for a named feature

The lack of a rigid schema is both OSM's greatest strength and its biggest source of inconsistency. Two mappers in different countries might tag the same type of feature differently. But the flexibility means OSM can represent things that no corporate mapping product has bothered to catalog.

Who contributes

Three groups do most of the editing.

Hobbyist mappers. People who care about their local area and want it accurately represented. Someone notices their street is missing a speed bump or a new cafe opened. They open the editor and fix it. This grassroots editing is the backbone of OSM.

Humanitarian mappers. The Humanitarian OpenStreetMap Team (HOT), formed in response to the 2010 Haiti earthquake, coordinates mapping efforts in disaster zones and underserved regions. When a natural disaster strikes, HOT organizes volunteers to trace buildings and roads from satellite imagery so that aid organizations have usable maps. Within hours of the Haiti earthquake, hundreds of contributors began mapping Port-au-Prince from scratch.

Corporate editors. This is the more recent development. Apple, Meta, Microsoft, and Amazon all employ teams that make large-scale edits to OSM. Apple has been one of the largest contributors since 2016, with tens of millions of edits focused on road geometry and addressing. Meta's map teams have added roads across Africa and Southeast Asia. Microsoft has contributed building footprints generated from aerial imagery. These corporate contributions have accelerated OSM's coverage enormously, though they also raise questions about governance and data quality when a small number of companies account for a significant share of edits.

How the data gets used

Raw OSM data is not directly useful to most applications. It needs to be processed into something specific. Here are the main transformation paths:

Tile rendering. Tools like Mapnik take OSM data and render it into visual map tiles, either raster images or vector tiles. I wrote about Protomaps for self-hosted vector tile serving from a single file. Commercial tile providers like MapTiler also build their tilesets from OSM data.

Routing. OSRM (Open Source Routing Machine) and Valhalla both build routing graphs from OSM data. They read the road network, respect one-way streets and turn restrictions, and calculate routes. Most open-source navigation apps use one of these two engines under the hood.

Geocoding. Nominatim is the default geocoding engine for OSM. It converts addresses to coordinates (forward geocoding) and coordinates to addresses (reverse geocoding). It powers the search bar on openstreetmap.org. I wrote about self-hosting Nominatim for Landbound, and it works well for country-level coverage.

Analysis and querying. The Overpass API lets you run queries directly against OSM data. It is like SQL for geographic features.

Querying OSM with Overpass

Overpass is one of the most useful tools in the OSM ecosystem. Instead of downloading a massive data extract, you can query for exactly the features you need.

Here is a query that finds all cafes within 500 meters of a coordinate in Berlin:

[out:json][timeout:25];
node["amenity"="cafe"](around:500,52.5200,13.4050);
out body;

Breaking it down:

  • [out:json] sets the output format to JSON
  • [timeout:25] limits the query to 25 seconds
  • node["amenity"="cafe"] filters for nodes tagged as cafes
  • (around:500,52.5200,13.4050) restricts to a 500-meter radius around that latitude/longitude
  • out body; returns full element data including tags

You can test this at overpass-turbo.eu, which provides a visual interface for building and running Overpass queries. The results come back as GeoJSON-compatible data that you can plot on a map or process programmatically.

Overpass supports more than just nodes. You can query ways and relations, combine filters, and build complex spatial queries. If you need all hiking trails in a bounding box, all bus stops along a specific route, or all buildings taller than 10 stories in a city, Overpass can do it.

Contributing to OSM

If you want to fix something on the map, the barrier to entry is low.

iD editor is the browser-based editor that loads when you click "Edit" on openstreetmap.org. It became the default editor in August 2013, replacing Potlatch 2. iD shows satellite imagery as a background layer and lets you draw and tag features directly. For adding a missing business, correcting a road name, or tracing a building outline, iD is all you need. No installation, no learning curve beyond the basics.

JOSM is the power user option. It is a Java desktop application with far more editing capabilities: support for plugins, advanced conflict resolution, bulk editing, and custom imagery sources. If you are doing serious mapping sessions or working with complex relations, JOSM is the tool. But for casual fixes, it is overkill.

OSM vs Google Maps

This comparison comes up constantly, but it misses the point. OSM is a database. Google Maps is a product. They serve fundamentally different purposes.

Google Maps is optimized for consumer use cases: finding businesses, reading reviews, checking opening hours, getting driving directions with real-time traffic. It is excellent at those things. The data is proprietary, collected by Google's Street View cars, purchased from data providers, and supplemented by business owners claiming their listings.

OSM is a raw geographic dataset that anyone can build on. It does not have business reviews or real-time traffic. What it has is depth. OSM consistently beats Google Maps for trail coverage, cycling infrastructure, outdoor features, and points of interest that are too niche for Google to care about. A bench in a park, a water fountain on a hiking trail, a specific type of power line tower. If someone cared enough to map it, it is in OSM.

For developers, the real difference is access. You cannot download Google Maps data and build your own routing engine on top of it. You cannot run your own tile server with Google's data. With OSM, you can do all of that. The entire planet file is a free download, updated weekly. That openness is why OSM is the foundation for almost every open-source mapping project that exists. I will be writing more about mapping libraries for the web in a future post.

Sources

Enjoying the blog? Subscribe via RSS to get new posts in your reader.

Subscribe via RSS