mapbox/wellknown

Parse not working for POINT with space(s) after first parenthesis and/or space(s) before last parenthesis

Opened this issue · 2 comments

Parsing fails for WKT POINTS that have spaces directly after the open parenthesis and/or directly before the closing parenthesis. I haven't tested this issue on other types of geometry.

POINT ( -68.1712366598 -16.5122344611 4124.6247727228 )

var parse = require('wellknown'),
    geometry = parse('POINT ( -68.1712366598 -16.5122344611 )');
console.log(geometry);// geometry will be null

Is this library no longer being actively managed?

I've never seen a WKT string with spaces before or after the numbers. Is there somewhere in the spec that allows this or do other apis return such a value?