RandomFractals / geo-data-viewer

Geo Data Analytics tool for VSCode IDE with kepler.gl support to generate and view maps πŸ—ΊοΈ without any Python 🐍, IPyWidgets βš™οΈ, pandas 🐼, Jupyter notebooks πŸ“š, or ReactJS βš›οΈ app code.
https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.geo-data-viewer
Apache License 2.0
404 stars 43 forks source link

Single feature geojson not displaying - Read File Failed #157

Open dreadedhamish opened 7 months ago

dreadedhamish commented 7 months ago

Currently a geoJSON with a single Feature will fail to load, throwing the Read File Failed error. Wrapping the Feature in a FeatureCollection works.

Single Features are supported by kepler-gl - https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.md#geojson

To recreate put the example code from the kepler supported file formats section into a .geojson file:

  {
    "type": "Feature",
    "geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [-10.0, -10.0],
          [10.0, -10.0],
          [10.0, 10.0],
          [-10.0, -10.0]
        ]
      ]
    },
    "properties": {
      "name": "foo"
    }
  }