You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · GIS vector

OSM — OpenStreetMap PBF (Protocolbuffer Binary Format)

Compact binary format based on Protocol Buffers for storing OpenStreetMap nodes, ways, relations and tags.

Type
Vector · GIS vector
Extension
.osm.pbf, .osm, .pbf
Converter
Read only
Coordinate system
Always WGS 84 (EPSG:4326)
Layers
Multiple

What is a OSM file?

OSM PBF is the binary encoding of OpenStreetMap data, defined by the OpenStreetMap project as an alternative to the OSM XML format. The full planet file and many regional extracts are distributed in it. Files are much smaller than uncompressed XML and considerably faster to read and write.

The file is a sequence of blocks encoded with Google Protocol Buffers and typically compressed with zlib. Each block holds OSM primitives: nodes with coordinates, ways as ordered node references, and relations grouping other elements. Free-form key-value tags describe all of them. Coordinates are WGS 84 longitude and latitude stored as integers with a defined granularity, and delta coding keeps node data compact. The format contains no ready-made GIS geometries. Software such as osm2pgsql or GDAL/OGR assembles ways and relations into points, lines and multipolygons on import, and polygon detection depends on tagging rules and relation completeness.

OSM PBF files are mostly received from public extract providers or exported from OpenStreetMap tools, often as a country or region download. Because the file stores raw nodes, ways and relations rather than finished GIS features, results depend on the importing software. Check that the extract is complete, since ways cut at the boundary may lose nodes or relation members and affect polygons.

Typical uses

  • Distributing the full planet or regional OpenStreetMap extracts.
  • Loading OSM data into a PostGIS database for rendering or analysis.
  • Extracting roads, buildings or points of interest for GIS projects.
  • Preparing input data for routing engines and offline map tools.
Files: Compact binary encoding of OSM nodes/ways/relations.

Sample OSM files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena OpenStreetMap data st-helena.osm.pbf

Saint Helena (complete OSM extract)

All OpenStreetMap nodes, ways and relations of the island of Saint Helena (osmium extract of the Geofabrik file).

  • points · Point · 515
  • lines · LineString · 1295
  • multilinestrings · MultiLineString · 17
  • multipolygons · MultiPolygon · 3578
  • EPSG:4326
  • 395 kB

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Saint Helena OpenStreetMap data jamestown.osm.pbf

Jamestown (OSM extract)

OpenStreetMap data of the capital Jamestown and its valley (bbox extract).

  • points · Point · 41
  • lines · LineString · 122
  • multipolygons · MultiPolygon · 545
  • EPSG:4326
  • 47.7 kB

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Saint Helena OpenStreetMap data jamestown.osm

Jamestown (OSM XML)

The same Jamestown extract as plain OSM XML (.osm).

  • points · Point · 41
  • lines · LineString · 122
  • multipolygons · MultiPolygon · 545
  • EPSG:4326
  • 744.5 kB

© OpenStreetMap contributors, ODbL 1.0

Frequently asked questions

The file holds nodes, ways and relations, not ready geometries. GDAL/OGR exposes separate layers for points, lines, multilinestrings, multipolygons and other relations, so choose the layer you need. Areas appear as polygons only when tagging and relation members allow it.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.