mapbox / mapbox/wellknown

parse not working for geometrycollection containing multipoint and other geometries

Open
#43 0 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

geometries like this return null from parse

GEOMETRYCOLLECTION(MULTIPOINT(1 2, 3 4), LINESTRING(5 6, 7 8))

this code here seems to cause a problem
![image](https://user-images.githubusercontent.com/5223812/171467425-f9458285-3c45-4efd-8bb6-5c92b66e58d5.png)

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 by reproducing the null result with the GEOMETRYCOLLECTION example and inspect the parser code referenced by the attached image. Trace how a collection containing MULTIPOINT and LINESTRING is handled, then add regression coverage showing that parsing this input returns the expected GeoJSON rather than null.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.