Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse WKT string #31

Open
polizz opened this issue Mar 25, 2020 · 1 comment
Open

Unable to parse WKT string #31

polizz opened this issue Mar 25, 2020 · 1 comment

Comments

@polizz
Copy link

polizz commented Mar 25, 2020

The wkt POLYGON((-89.31029407 38.72017071,-89.30548017 38.72017071,-89.30421905 38.72418814,-89.31029407 38.72376013,-89.31029407 38.72017071))

causes parse to throw the following error:

_string-trim.js:25 Uncaught RangeError: Maximum call stack size exceeded
    at RegExp.exec (<anonymous>)
    at RegExp.[Symbol.replace] (<anonymous>)
    at String.replace (<anonymous>)
    at ./node_modules/@babel/polyfill/node_modules/core-js/modules/_string-trim.js.exporter.trim (_string-trim.js:25)
    at parseFloat (_parse-float.js:5)
    at WktParser../node_modules/wkx/lib/wktparser.js.WktParser.matchCoordinate (wktparser.js:103)
    at WktParser../node_modules/wkx/lib/wktparser.js.WktParser.matchCoordinates (wktparser.js:112)
    at Function../node_modules/wkx/lib/polygon.js.Polygon._parseWkt (polygon.js:56)
    at Function../node_modules/wkx/lib/geometry.js.Geometry._parseWkt (geometry.js:61)
    at Function../node_modules/wkx/lib/geometry.js.Geometry.parse (geometry.js:26)

via:

wkx.Geometry.parse('POLYGON((-89.31029407 38.72017071,-89.30548017 38.72017071,-89.30421905 38.72418814,-89.31029407 38.72376013,-89.31029407 38.72017071))')

Can you let me know what I'm doing wrong?

cschwarz added a commit that referenced this issue Mar 26, 2020
@cschwarz
Copy link
Owner

I've tested your wkt with node 12.x and in Chrome, but couldn't reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants