WKTLoader
Loader and writer for the Well-known text format for representation of geometry.
Loader | Characteristic |
---|---|
File Extension | .wkt , |
File Type | Text |
File Format | Well Known Text |
Data Format | Geometry |
Supported APIs | load , parse , parseSync |
Decoder Type | Synchronous |
Worker Thread Support | Yes |
Installation​
npm install @loaders.gl/wkt
npm install @loaders.gl/core
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).