terraformer-wkt-parser

Well-Known Text parser

Terraformer Well-Known Text Parser

This package is part of the Terraformer project.

A bare-bones WKT parser. Given a WKT primitive, it parses and returns a Terraformer Primitive.

$ npm install terraformer-wkt 
var wkt = require('terraformer-wkt');

var primitive = wkt.parse('LINESTRING (30 10, 10 30, 40 40)');

// should return LineString Terraformer Primitive
var ret = tree.search({ x: 15, y: 15, w: 0, h: 0 });