geo-data-viewer icon indicating copy to clipboard operation
geo-data-viewer copied to clipboard

Single feature geojson not displaying - Read File Failed

Open dreadedhamish opened this issue 7 months ago β€’ 0 comments

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"
    }
  }

dreadedhamish avatar Jan 27 '24 23:01 dreadedhamish