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

The parser is forgiving unbalanced parens, missing commas, and invalid object names #35

Open
ikr opened this issue Aug 23, 2018 · 0 comments

Comments

@ikr
Copy link

ikr commented Aug 23, 2018

Those three strings, when parsed, result in a valid GeoJSON output:

MULTIPOLYGON(40 40,20 45,45 30,40 40)),((20 35,10 30,10 10,30 5,45 20,20 35)))
MULTIPOLYGON(((40 40,20 45,45 30,40 40))((20 35,10 30,10 10,30 5,45 20,20 35)))
MULTIPOLYGONN(((40 40,20 45,45 30,40 40)),((20 35,10 30,10 10,30 5,45 20,20 35)))

I'd expect a null instead.

Otherwise, in our use case, the invalid WKT passes the browser-side validation and makes it through to a Postgres/PostGIS DB. PostGIS then rejects anything like the three examples above.

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

1 participant