mapbox / simplespec-to-gl-style

Converts GeoJSON styled with simplestyle-spec to a GL Style
ISC License
32 stars 6 forks source link

Wrap raw geometries in feature collections #30

Open 1ec5 opened 7 years ago

1ec5 commented 7 years ago

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:

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

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

/cc @bsudekum