--- id: geobuf version: "2.0.1" license: MIT license_treatment: permissive maintenance: aging --- # geobuf — Geobuf is a compact binary geospatial format for lossless compression of GeoJSON. License: permissive · Maintenance: aging · Downloads: 80.6K/mo ## 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 above — 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 pip install geobuf uv add geobuf 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 80.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags geojson compression, binary geospatial format, geobuf encode decode, compact gis data, lossless geographic compression, geospatial, data-compression, gis [View on SkillFed](https://skillfed.io/packages/geobuf) · [View on PyPI](https://pypi.org/project/geobuf/)