Adds WKB export support to cgeo.
This augments all geometry types (in a TypeScript-friendly way)
with a toWKB method returning a Uint8Array.
The method takes an optional configuration object with the member:
endian, default isEndian.little. See cbin.
Additionally, the static method Geometry.fromWKB takes a Uint8Array
and returns the appropriate geometry object.
import * as cgeo from 'cgeo';
import 'cgeo-wkb';
const point = new cgeo.Point(12, 34);
console.log(Buffer.from(point.toWKB()).toString('hex'));Copyright (c) 2017 BusFaster Ltd