mapbox / mapbox/simplespec-to-gl-style

Wrap raw geometries in feature collections

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
34
Forks
3
PR merge metrics
No merged PRs in 30d

Description

This library assumes that a GeoJSON object can only contain Feature and FeatureCollection objects, but it can also contain raw Geometry objects such as Point or MultiPolygon:

```json
{
"type": "Point",
"coordinates": [0, 0],
}
```

We haven’t been running into these geometries because we rely on [geojson-normalize](https://github.com/mapbox/geojson-normalize/) to wrap them in FeatureCollections via [static-map-string-format](https://github.com/mapbox/static-map-string-format). We should either make geojson-normalize a dependency of this library or duplicate its functionality here.

/cc @bsudekum

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 inspecting the JavaScript entry points and dependency configuration in simplespec-to-gl-style, then compare the wrapping behavior provided by geojson-normalize and static-map-string-format. The work is done when raw GeoJSON geometries such as Point and MultiPolygon are accepted as FeatureCollections, with coverage for the supported input forms.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.