@loaders.gl/wkt
Version:
Loader and Writer for the WKT (Well Known Text) Format
28 lines (27 loc) • 621 B
JavaScript
// loaders.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { VERSION } from "./lib/utils/version.js";
import { encodeWKB } from "./lib/encode-wkb.js";
/**
* WKB exporter
*/
export const WKBWriter = {
name: 'WKB (Well Known Binary)',
id: 'wkb',
module: 'wkt',
version: VERSION,
extensions: ['wkb'],
options: {
wkb: {
hasZ: false,
hasM: false
}
},
async encode(data, options) {
return encodeWKB(data, options?.wkb);
},
encodeSync(data, options) {
return encodeWKB(data, options?.wkb);
}
};