Skip to main content

WKT module · geometry writer

WKTWriter

Encode structured geometry as readable Well-Known Text for inspection, interchange, logs, and systems that accept the OGC text representation.

What it writes

Make geometry readable at the interchange boundary.

WKTWriter provides the text counterpart to WKTLoader, turning loaders.gl geometry into a standard syntax that remains easy to inspect and move between GIS tools.

Input

Structured geometry objects

Output

Readable WKT text

Types

Common and extended geometry forms

APIs

encode and encodeSync

Detailed guide

WKTWriter reference

The sections below document format metadata, installation, usage, options, and attribution.

Writer for the [Well-known text] format for representation of geometry.

WKTWriter
File Extension.wkt,
File TypeText
File FormatWell Known Text
Data FormatGeometry
Supported APIsencode, encodeSync

Installation​

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

Usage​

import {WKTWriter} from '@loaders.gl/geospatial/wkt';

Options​

N/A

Attribution​

The WKTWriter is based on a fork of the Mapbox wellknown module under the ISC license (MIT/BSD 2-clause equivalent).