mapbox / mapbox/wellknown

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

Open
#33 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
281
Forks
47
PR merge metrics
No merged PRs in 30d

Description

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
````

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the parser entry point used by require('wellknown') and reproduce the issue with the POINT examples containing spaces inside both parentheses. Confirm that those inputs parse successfully and that existing geometry parsing behavior remains unchanged; the payload does not name a specific source file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.