geobuf
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/geobuf package

    0.2.1 • Public • Published

    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.

    Install

    npm i [email protected]

    Version

    0.2.1

    License

    ISC

    Last publish

    Collaborators

    • 1ec5
    • aarthykc
    • ajashton
    • alulsh
    • amyleew
    • ansis
    • apendleton
    • arunasank
    • bergwerkgis
    • bhousel
    • bsudekum
    • dnomadb
    • emilymcafee
    • flippmoke
    • freenerd
    • geohacker
    • gretacb
    • ian29
    • ianshward
    • ingalls
    • isiyu
    • jfirebaugh
    • jrpruit1
    • karenzshea
    • kkaefer
    • lbud
    • lxbarth
    • lyzidiamond
    • mapbox-admin
    • mapbox-machine-user
    • mapbox-npm
    • mapbox-npm-01
    • mapbox-npm-02
    • mapbox-npm-03
    • mapbox-npm-04
    • mapbox-npm-05
    • mapbox-npm-06
    • mapbox-npm-07
    • mapbox-npm-08
    • mapbox-npm-09
    • mapbox-npm-advanced-actions
    • mapbox-npm-ci
    • mapsam
    • mattficke
    • mcwhittemore
    • miccolis
    • mollymerp
    • morganherlocker
    • mourner
    • mtirwin
    • nickidlugash
    • planemad
    • rclark
    • samanbb
    • sbma44
    • sgillies
    • springmeyer
    • themarex
    • tristen
    • virginiayung
    • willwhite
    • yhahn