JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 176793
  • Score
    100M100P100Q156756F
  • License ISC

geographic compact binary encoding specification

Package Exports

  • geobuf

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (geobuf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

geobuf

build status

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.

API

featureCollectionToGeobuf(geojson)

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

featureToGeobuf(geojson)

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

geobufToFeature(buf)

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

geobufToFeatureCollection(buf)

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

Binaries

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

See Also

  • 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.