Table of Contents
Chevron DownAPI Reference

WKTLoader

Loader and writer for the [Well-known text] format for representation of geometry.

LoaderCharacteristic
File Extension.wkt,
File TypeText
File FormatWell Known Text
Data FormatGeometry
Supported APIsload, parse, parseSync

Usage

import {WKTLoader} from '@loaders.gl/wkt';
import {parseSync} from '@loaders.gl/core';

const data = parseSync('LINESTRING (30 10, 10 30, 40 40)', WKTLoader);
// => {type: 'LineString', coordinates: [[30, 10], [10, 30], [40, 40]]}
import {WKTLoader} from '@loaders.gl/wkt';
import {load} from '@loaders.gl/core';

const data = await load(url, WKTLoader);

Options

N/A

Attribution

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