qgis-stac-plugin icon indicating copy to clipboard operation
qgis-stac-plugin copied to clipboard

Asset with GeoJSON media type cannot be added as layer, but it should be allowed

Open philvarner opened this issue 2 years ago • 1 comments

When I have an Item that has an asset of type geojson, the "Add asset as layer" button is disabled for that item.

For example:

{ 
  "type": "Feature",
  ...
  "assets": {
    "my_geojson": {
      "href": "https://s3.amazonaws.com/my-bucket/my.geojson",
      "type": "application/geo+json",
      "title": "My Geojson"
    }
 }
}

assets_dialog.py and asset_widget.py have a list of 4 media types that are allowed to be added as layers from a STAC Item:

        layer_types = [
            AssetLayerType.COG.value,
            AssetLayerType.COPC.value,
            AssetLayerType.GEOTIFF.value,
            AssetLayerType.NETCDF.value,
        ]

However, asset AssetLayerType defines others that can be loaded, e.g., GeoJSON, that I think are supposed to be in the layer_types but are missing.

philvarner avatar Jul 05 '22 17:07 philvarner

+1. Loading GEOJSON and GEOPACKAGE [1] would be useful

remicres avatar Oct 13 '22 10:10 remicres