geobuf-merge
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

geobuf-merge

Merge two geobuf-encoded GeoJSONs together

Installation

Using npm npm i geobuf-merge

Using yarn yarn add geobuf-merge

Usage

In CommonJS env

const { mergeGeobufs } = require('geobuf-merge');

Using imports

import { mergeGeobufs } from 'geobuf-merge';

Then

import Pbf from 'pbf';
import { encode } from 'geobuf';

const pbf1 = encode({ "type": "Point", "coordinates": [-3.652954, 40.417678] }
, new Pbf());
const pbf2 = encode({ "type": "Point", "coordinates": [-4.042969, 39.863371] }
, new Pbf());

const mergedPbf = mergeGeobufs([pbf1, pbf2]);

mergedPbf is a Geobuf-encoded FeatureCollection including all PBFs to merge.

Documentation

See DOCS

/geobuf-merge/

    Package Sidebar

    Install

    npm i geobuf-merge

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    9.23 kB

    Total Files

    9

    Last publish

    Collaborators

    • alrico88