Download Brazil map in Geobuf format
A map built from OpenStreetMap data, ready to download
Customize the map
Open this place's area in the constructor and adjust everything to your needs
Open in constructor →Map passport
What this map contains by default
This is how the map is built as-is — every setting can be changed in the constructor.
About Geobuf
Map of Brazil in Geobuf — an export of real OpenStreetMap data for the selected area.
Geobuf is a compact binary packing of GeoJSON on Protocol Buffers, created at Mapbox (Vladimir Agafonkin, 2015). It encodes the same objects as GeoJSON but typically 6–8x smaller thanks to varint, coordinate delta encoding, and a key dictionary; decoding returns an equivalent GeoJSON losslessly. It is a transport layer for mobile maps, edge CDN caches, and IndexedDB storage, not an analytical format. Our exporter builds a FeatureCollection from the OSM layers and encodes it into real protobuf .pbf with 6-digit precision (~0.1 m). Important: the format is honest — if encoding fails the export errors out, we do NOT substitute gzipped GeoJSON under a .pbf name.
Which layers are in the file
This file for the selected area contains:
- Water
Geometry by layer
- Water — waterbody polygons and watercourse lines with tags
What the file carries
The Geobuf file for Brazil: the whole map comes as a single file, the file is binary — it is opened by a program, not by an editor, all features lie in one collection, and the source layer name stays in the _layer field, OpenStreetMap tags are kept as feature attributes.
File size
The expected size of the Geobuf file for Brazil is about 7.5 MB; the exact size depends on the chosen layers and area.
Coordinate systems
WGS 84 (EPSG:4326), selectable in the wizard
Units
Meters (projected in the chosen coordinate system)
| Category | GIS |
| File extension | .geobuf |
| Tier | Open Beta |
How to use Geobuf for Brazil
- JavaScript — npm install geobuf pbf, then geobuf.decode(new Pbf(buffer)) returns ready GeoJSON that you can hand straight to Leaflet or Mapbox GL.
- Python — pip install geobuf, then geobuf.decode(open("map.pbf", "rb").read()); after that it is ordinary GeoJSON work or loading into GeoPandas.
- A mobile app — the file goes into the resources or is pulled from the server: decoding takes a fraction of a second, and the traffic is several times smaller.
Programs that open Geobuf
FAQ: Geobuf for Brazil
Does Geobuf replace GeoJSON?
No, it is an encoding layer over it. Decoding returns a semantically equivalent GeoJSON ready for Leaflet, Mapbox GL or D3. GeoJSON is handy for reading and debugging, Geobuf for transport and storage.
How do I open a Geobuf .pbf file?
Install the geobuf library (npm install geobuf pbf for JavaScript or pip install geobuf for Python) and call decode — the output is a plain GeoJSON FeatureCollection.
Do you substitute gzipped GeoJSON for Geobuf?
No. Encoding goes into real protobuf via the geobuf library. If something goes wrong the export honestly errors out rather than emitting gzip(GeoJSON) under a .pbf extension.
What is the coordinate precision?
6 decimal places by default, about 0.1 meters — enough for most tasks including urban-level detail.
Can this .pbf be confused with Mapbox vector tiles?
The extension is the same, but the formats are different. Mapbox Vector Tiles contain a tile with geometry clipped to the grid and recomputed into tile coordinates; here it is a whole FeatureCollection in WGS84 coordinates. The geobuf decoder will read our file; a tile reader will not.