radiantearth / stac-browser

A full-fledged UI in Vue for browsing and searching static STAC catalogs and STAC APIs
https://radiantearth.github.io/stac-browser
ISC License
275 stars 136 forks source link

Inconsistency in rendering collections with multiple bboxes #337

Closed christophfriedrich closed 1 year ago

christophfriedrich commented 1 year ago

When I saw the map of this collection, I was surprised to see more than one bbox, but it makes totally sense because the topic is sea ice. I then wondered how this is stored in the data, looked at the table on the right-hand side and found: not what I was expecting.

grafik

Looking at the JSON source (https://collections.eurodatacube.com/stac/sea-ice-index.json), we see bbox is an array with three items:

  "extent": {"spatial":{"bbox":[[-180,-90,180,90],[-180,39.23,180,90],[-180,-90,180,-30.98]]}, ...},

Prettified:

grafik

But only the first item is output in the table, and it seems only the other two in the map.

-> Please fix: Textual output and auxiliary visualisation should be consistent.

m-mohr commented 1 year ago

Hey @christophfriedrich!

What you are seeing in the table is the datacube extent, which is set in cube:dimensions. There's only one extent per dimension in cube:dimensions, so the table is correct.

Per stac-specification, the first extent in the Collection extents is the union of all following extents. So it doesn't make sense to show the first bbox if there are more precise bboxes following.

As such STAC Browser works as expected (it basically does what the specification asks to do).

christophfriedrich commented 1 year ago

Sounds super reasonable!