skillfed

geobuf

Geobuf is a compact binary geospatial format for lossless compression of GeoJSON.

geobuf v2.0.1 80.6K downloads/30d#14,281 on PyPI161
Permissive license MIT AGING released

What it is and what it does

Geobuf is a binary serialization format for GeoJSON that trades JSON's human readability for dramatic file-size reduction. It encodes geographic feature collections into a compact protobuf-based format, typically shrinking files by 6-8x compared to raw GeoJSON, and 2-2.5x compared to gzipped JSON. The format is lossless—all properties, coordinates, and geometries survive round-trip encoding and decoding intact.

The package provides both a command-line tool (geobuf encode/decode) and a Python API. It supports incremental parsing (reading features as they arrive rather than loading the entire dataset into memory), partial reads (skipping unneeded data), and trivial concatenation of multiple Geobuf files. It's designed as a modern, GeoJSON-native alternative to Shapefile for scenarios where you need compact storage or transmission of geographic datasets without tiling or coordinate projection.

Use it for:

  • Compress large GeoJSON datasets for storage or network transmission in web mapping applications.
  • Stream geographic features incrementally from a Geobuf file without loading the entire dataset into memory.
  • Replace Shapefile workflows with a simpler, JSON-compatible binary format that preserves all properties.
  • Reduce bandwidth for serving geographic data to browsers or mobile clients.
  • Concatenate multiple geographic datasets by simply appending Geobuf files together.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Geobuf encodes GeoJSON to a compact binary format and decodes it back, achieving 6-8x compression over raw GeoJSON while preserving all data losslessly.

Yes, if you work with GeoJSON and need significant file-size reduction without losing data. The low install friction, permissive license, and active maintenance make it a straightforward choice. The 6-8x compression ratio and support for incremental parsing are genuine advantages for large geographic datasets. No known vulnerabilities and stable API.

Install

geobuf on PyPI

pip

pip install geobuf

uv

uv add geobuf

poetry

poetry add geobuf

Installing geobuf

Before you install

Low install friction with three lightweight runtime dependencies (click, protobuf, six). Last release was 206 days ago; the project is archived on GitHub but remains actively maintained by the pygeobuf organization.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.

Quickstart

pip install geobuf

import geobuf
import json

with open('example.json') as f:
    geojson = json.load(f)

pbf = geobuf.encode(geojson)  # GeoJSON dict → binary
recovered = geobuf.decode(pbf)  # binary → GeoJSON dict

Verify before relying

  • Whether Python version support is truly unspecified or if there are practical constraints based on protobuf and six compatibility.
  • Performance comparison with native JSON implementations in production workloads.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — click, protobuf, six
Maintenance aging — 206 days since the last release
Last repo commit
First released
Downloads 80,613/month — #14,281 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: geobuf-2.0.1-py3-none-any.whl

Keywords: data, gis, geojson, protobuf

Tags

geojson compressionbinary geospatial formatgeobuf encode decodecompact gis datalossless geographic compression
geospatialdata-compressiongis

More Information Analysis packages