geobuf

geographic compact binary encoding specification

geobuf

A compact encoding for geographic data.

Like vector-tile-spec, this is a protobuf-based encoding.

Unlike vector-tile-spec, this deals with untiled data in native projections.

Given a GeoJSON FeatureCollection as an object, return a Buffer of geobuf as a ProtoBufjs object.

Given a GeoJSON Feature as an object, return a Buffer of geobuf as a ProtoBufjs object.

Given a Buffer of geobuf, return a GeoJSON Feature as an object.

Given a Buffer of geobuf, return a GeoJSON FeatureCollection as an object.

npm install -g geobuf

Installs these nifty binaries:

  • geobuf2geojson: turn geobuf from stdin to geojson on stdout
  • geojson2geobuf: turn geojson from stdin to geobuf on stdout
  • shp2geobuf: given a shapefile filename, send geobuf on stdout
  • geojsonp - the base for this project, this is more or less geojsonp with more wheelies.
  • twkb - relative to TWKB, this is an implemented project that does not support topology and uses protobuf as its serialization
  • vector-tile-spec
  • topojson - a variant of GeoJSON that supports topology and delta-encoding. geobuf uses delta encoding by virtue of using protobuf, but does not support topology
  • WKT and WKB - popular in databases. Not an open standard.
  • EWKB is a popular superset of WKB.