terraformer-js / terraformer

A geographic toolkit for dealing with geometry, geography, formats, and building geodatabases
MIT License
182 stars 28 forks source link

this.parseError is not a function #92

Closed hbarrameda closed 3 months ago

hbarrameda commented 1 year ago

The function wktToGeoJSON of package @terraformer/wkt version 2.1.2 fails with error: Unable to parse: TypeError: this.parseError is not a function when the wkt is invalid.

To reproduce it just do wkt.wktToGeoJSON("POINT(0,0)")

jgravois commented 1 year ago

a PR to catch the error and return a more informative message would be welcome.

mpalmerlee commented 3 months ago

Thank you for maintaining this useful library @jgravois, I just started using it for a GIS project and hit this error also, the linked PR seems to address it 🙌