Chevron DownCommand-Line Reference
Chevron DownAPI Reference

Overview

The @loaders.gl/wkt module handles the Well Known Text (WKT) format, an ASCII format that defines geospatial geometries; and the Well Known Binary format, WKT's binary equivalent.

Installation

npm install @loaders.gl/wkt
npm install @loaders.gl/core

Loaders and Writers

Loader
WKBLoader
WKBWriter
WKTLoader
WKTWriter

Format Notes

A number of variants of WKT and WKB exist

FormatSupportDescription
WKTYText representation
WKBYBinary representation
EWKTNWKT that starts with a spatial reference id (SRID)
TWKBNWKB variant that uses varints, precision truncation and zigzag point encoding to reduce uncompressed binary size ~2x (compressed size reduction is less).

Attribution

The WKTLoader is based on a fork of the Mapbox wellknown module under the ISC license (MIT/BSD 2-clause equivalent). The WKBLoader and WKBWriter are forked from https://github.com/cschwarz/wkx under MIT license, Copyright (c) 2013 Christian Schwarz.