Package Exports
- cgeo-wkb
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 (cgeo-wkb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cgeo-wkb
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.
Usage
import * as cgeo from 'cgeo';
import 'cgeo-wkb';
const point = new cgeo.Point(12, 34);
console.log(Buffer.from(point.toWKB()).toString('hex'));
License
Copyright (c) 2017 BusFaster Ltd