Search code examples
geojson

Does GeoJSON support lists of FeatureCollection?


I have a JSON array of FeatureCollection which I want to visualize with tools like http://geojson.tools/ or https://geojson.io/.

[
  {
    "type": "FeatureCollection",
    "features": [
    ... 
    ]
  },
  {
    "type": "FeatureCollection",
    "features": [
    ... 
    ]
  },
  {
    "type": "FeatureCollection",
    "features": [
    ... 
    ]
  }
]

But all the tools I tested do not support the visualization of arrays of FeatureCollection as this is no valid GeoJSON element. :-(

Does GeoJSON know any element which contains a list of FeatureCollection? (Or is there any way to visualize this data?)


Solution

  • According to the GeoJSON Format Specification, arrays of FeatureCollection are not supported.

    A FeatureCollection can consist of any number of features of different geometries, so you should be able to combine your multiple FeatureCollections into a single FeatureCollection.