Skip to content

Add wkt parser

Compare
Choose a tag to compare
@alexbol99 alexbol99 released this 26 Jun 15:06
· 19 commits to master since this release

What's Changed

Add function parseWKT(str) to utils to convert single WKT element to flatten-js shape.
Type converted as following
POINT -> Point,
LINESTRING -> Multiline
POLYGON -> Polygon
MULTIPOINT -> Array
MULTILINESTRING -> Array
MULTIPOLYGON -> Polygon
GEOMETRYCOLLECTION -> Array<Point | Multiline | Polygon>

Circular arcs and other types not supported

Full Changelog: v1.5.3...v1.5.5