The geometry syntax path
Parse text or bytes. Preserve the geometry meaning.
Choose WKT for readable interchange, WKB for compact binary geometry, or WKT-CRS for spatial reference definitions. The same module also provides the corresponding writers.
WKT
Readable geometry text
WKB
Compact binary geometry
WKT-CRS
Coordinate reference system syntax
Output
Geometry or CRS objects for GIS pipelines
Detailed guide
Format and API details
The reference below covers supported syntaxes, loaders, writers, CRS handling, and the upstream implementations used by the module.
See Coordinate Reference Systems for WKT syntax handling, shared CRS types, and cross-format CRS support.
Formats
The @loaders.gl/geospatial/wkt module handles the following formats:
| Format | Description |
|---|---|
Well Known Text (WKT) | ASCII format for geometry features |
Well Known Binary (WKB) | Binary format for geometry features |
Well Known Text Coordinate Reference System (WKT-CRS) | Text format for spatial reference systems |
Loaders and Writers
| Loader / Writer | Description |
|---|---|
WKBLoader | Parses Well-Known Binary geometry. |
WKBWriter | Writes geometry as Well-Known Binary. |
WKTLoader | Parses Well-Known Text geometry. |
WKTWriter | Writes geometry as Well-Known Text. |
WKTCRSLoader | Parses Well-Known Text coordinate reference systems. |
WKTCRSWriter | Writes coordinate reference systems as WKT-CRS. |
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.
The WKTCRSLoader and WKTCRSWriter are thin adapters over the dependency-free syntax codecs in
@math.gl/geospatial/crs.
Sources and credits
See the package source and license inventory and the project-wide Attributions and Credits.