@loaders.gl/wkt
Version:
Loader and Writer for the WKT (Well Known Text) Format
24 lines (23 loc) • 615 B
JavaScript
// loaders.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { VERSION } from "./lib/utils/version.js";
import { encodeTWKB } from "./lib/encode-twkb.js";
/**
* WKB exporter
*/
export const TWKBWriter = {
name: 'TWKB (Tiny Well Known Binary)',
id: 'twkb',
module: 'wkt',
version: VERSION,
extensions: ['twkb'],
encode: async (geometry, options) => encodeTWKB(geometry, options?.twkb),
encodeSync: (geometry, options) => encodeTWKB(geometry, options?.twkb),
options: {
twkb: {
hasZ: false,
hasM: false
}
}
};