Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI for long list of collections #253

Closed
ycespb opened this issue Jan 18, 2023 · 37 comments
Closed

GUI for long list of collections #253

ycespb opened this issue Jan 18, 2023 · 37 comments
Labels
enhancement New feature or request
Milestone

Comments

@ycespb
Copy link

ycespb commented Jan 18, 2023

To facilitate selecting the collection to be used for an item search on the normal search panel (https://radiantearth.github.io/stac-browser/#/search/external/eovoc.spacebel.be/), it would be helpful if there would be a way to reduce the number of collections listed in the listbox for instance by allowing to type a few characters to limit the visible entries to select from in the listbox to the matching entries. As there is no separate functionality yet for collection-search, such improvement of the item search GUI would be very helpful for the case where there are hundreds of collections to choose from in the listbox (retrieved from /collections and following paging links) which will be the case in a future version of our server.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 18, 2023

The current implementation doesn't request additional pages to load the full list of collections. So a list of collections is only shown if no pagination for collections is present. If pagination is present, it would just show a "taggable" textfield as it shows for Item IDs. This only applies for search, of course and paging through collections is possible in the main UI for catalogs. The main reason for this is that it's usually not clear how many pages of collections are available so loading them all just for the select box may spawn too many (sequential) requests and load for too long.

In general it's possible to enhance the collection field, of course.

@m-mohr m-mohr added the enhancement New feature or request label Jan 18, 2023
@m-mohr m-mohr added this to the 3.1.0 milestone Jan 18, 2023
@chiarch84
Copy link

I think this feature would be very helpful too!
I would expect to have a background query returning the whole list of collections from STAC API endpoint GET /collections
And then from there a js text search could be done after the user has typed at least 2 or 3 characters.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 19, 2023

I would expect to have a background query returning the whole list of collections from STAC API endpoint GET /collections

That's the case already, except for pagination because in this case it would be an unknown number of sequential requests and that can be rather slow.

And then from there a js text search could be done after the user has typed at least 2 or 3 characters.

That's what is missing right now.

Whenever #249 is available, we may use collection search to query for specific collections in case of paginated /collections.

@chiarch84
Copy link

Hmm ok, so maybe I'm not using the good implementation. In our case we return the whole list from /collections but I don't see any combobox appearing in the search.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 19, 2023

@chiarch84 I assume so, too. And I assume you are using the latest STAC Browser from the dev branch. Here's an example how it looks like with a compliant endpoint: https://radiantearth.github.io/stac-browser/#/search/external/planetarycomputer.microsoft.com/api/stac/v1/

grafik

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 19, 2023

Please let me know how you like the new version.

@m-mohr m-mohr closed this as completed Jan 19, 2023
@chiarch84
Copy link

Thanks @m-mohr I like the possibility to have the list!!! I would though maybe prefer writing of a couple of characters and from there selecting the collection to add (with tags as it was before). Just because if the list is long (we have about 500 collections) it is hard to manage it by selecting different collections here and there. If I start to type DEM it is easier to select only the collections including DEM in the word.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 19, 2023

That's possible now?! Just start typing...

grafik

Might be that you need to clear the cache first?

@chiarch84
Copy link

That seems super nice! Thanks! I couldn't test it though, because in the link you had posted before there is still the same interface as before. I already tried deleting the cache.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 19, 2023

Oh, yeah, the deployment to gh-pages fails right now... not sure why, looks like a GitHub issue.

@chiarch84
Copy link

I just saw it now! Very nice! Thanks a lot for the improvement!

@iliion
Copy link

iliion commented Jan 20, 2023

Cheers! Very good addition

@chiarch84
Copy link

Dear @m-mohr could you please give me a hint to understand which branches I should use for deployment?

In the past months I've always been using dev, but should I use together also gh-pages and others or these ones substitute the dev one? Sorry but I couldn't really find documentation about this. In case there is just point it out to me and I'll read it by myself. Thanks!

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

@chiarch84 Please open separate issues for separate concerns.

@chiarch84
Copy link

chiarch84 commented Jan 31, 2023

Sure sorry, it is just that I was trying to visualize your change about this specific issue and so wanted to know which branch to use to visualize it.

@chiarch84
Copy link

chiarch84 commented Jan 31, 2023

I'm trying to understand why I don't see this new feature in my deployment.

I'm currently deploying dev branch and so getting version 3.0.0-beta.6
My GET /collections method returns all the collections and is not paginated
I already tried to clear browser's cache

When I go to your example, and I open the developer console of the browser, I see the call /collections
When I go to my instance and click on the /search button I don't see any call in the console. Plus, but this might have nothing to do with this issue, if I try to load the search page itself I get an error. I can view it only if I click on the button after having gone to one whatever page of the browser.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

@chiarch84 Please provide a reproducible example, otherwise, I probably can't help you. Also, what are the error messages you see?

@chiarch84
Copy link

chiarch84 commented Jan 31, 2023

I think there are 2 different problems.

The first one is that by clicking on the search button NO calls are performed. I don't know how you could reproduce my error since I don't think it depends on the data itself.

The following image is from your demo. When I click on the "search" button a /collections call is fired:
image

image

When I do the same thing on mine, no call is fired I see the dev console empty.

When trying to understand what the problem was I also tried to reload the search page by itself. And there I don't get any error, but I get a spinning wheel trying to load something that never arrives:
image

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

Sounds like an issue with your metadata. Could you at least post the full API landing page JSON for a check?

@chiarch84
Copy link

chiarch84 commented Jan 31, 2023

Strange because all pages of my catalog work, and also the search function works. I just cannot load it separately and I cannot see the list of collections in the search field. Maybe it is a problem of conformance classes in the json answer?

This is the complete json answer from the / landing page:

{
  "type": "Catalog",
  "id": "BDAP.catalog",
  "title": "JRC Big Data Analytics Platform Catalog",
  "description": "The JRC Big Data Analytics Platform (BDAP) links data, data services, data scientists and thematic experts for generating policy relevant insights and foresight. It will play an instrumental role in advancing JRC to better mobilize and synthesize its collective knowledge and expertise in support to the EC priorities.\nThis Catalog shows the list of all rasters and vectors available in the [JRC Big Data Analytics Platform (BDAP)](https://jeodpp.jrc.ec.europa.eu/bdap/).",
  "stac_version": "1.0.0",
  "conformsTo": [
    "https://api.stacspec.org/v1.0.0-rc.1/core",
    "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30",
    "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson",
    "https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features",
    "https://api.stacspec.org/v1.0.0-rc.1/item-search",
    "https://api.stacspec.org/v1.0.0-rc.1/collections",
    "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core"
  ],
  "links": [
    {
      "rel": "self",
      "type": "application/json",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/"
    },
    {
      "rel": "root",
      "type": "application/json",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/"
    },
    {
      "rel": "conformance",
      "type": "application/json",
      "title": "STAC/WFS3 conformance classes implemented by this server",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/conformance"
    },
    {
      "rel": "search",
      "type": "application/geo+json",
      "title": "STAC search",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/search",
      "method": "GET"
    },
    {
      "rel": "search",
      "type": "application/geo+json",
      "title": "STAC search",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/search",
      "method": "POST"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Administrative Units Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/AdministrativeUnits.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Buildings Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Buildings.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Copernicus Data Access Portfolio Document (DAP) Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Copernicus.DAP.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Copernicus Sentinel Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Copernicus.Sentinel.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Copernicus Services Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Copernicus.Services.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "EUMETSAT Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/EUMETSAT.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Elevation Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Elevation.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Energy Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Energy.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Geographical Grid Systems Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/GeographicalGridSystems.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Geographical Names Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/GeographicalNames.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Hydrography Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Hydrography.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Land cover Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Landcover.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Landuse Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Landuse.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Meteo Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Meteo.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "NASA Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/NASA.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Natural Risk Zones Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/NaturalRiskZones.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Orthoimagery Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Orthoimagery.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Population Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Population.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Protected Sites Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/ProtectedSites.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Social Aspects Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/SocialAspects.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Soil Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Soil.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Statistical Units Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/StatisticalUnits.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "Transport Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/Transport.catalog"
    },
    {
      "rel": "child",
      "type": "application/json",
      "title": "USGS Data",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/collections/USGS.catalog"
    },
    {
      "rel": "service-desc",
      "type": "application/vnd.oai.openapi+json;version=3.0",
      "title": "OpenAPI service description",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/api"
    },
    {
      "rel": "service-doc",
      "type": "text/html",
      "title": "OpenAPI service documentation",
      "href": "http://s-jrciprjeop150p.cidsn.jrc.it:20008/api.html"
    }
  ],
  "stac_extensions": [
    "https://raw.githubusercontent.com/radiantearth/stac-api-spec/v1.0.0-rc.1/fragments/context/json-schema/schema.json"
  ]
}

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

You don't have a link with rel type data to the collections endpoint.

@chiarch84
Copy link

Couldn't it a problem from the conformsTo list? Because even in the Microsoft Planetary Computer STAC example I don't see a link to the collections endpoint.

The following one is the answer from the Microsoft Planetary Computer example. It seems the difference is only in the conformance class. Could it be?

{
    "type": "Catalog",
    "id": "microsoft-pc",
    "title": "Microsoft Planetary Computer STAC API",
    "description": "Searchable spatiotemporal metadata describing Earth science datasets hosted by the Microsoft Planetary Computer",
    "stac_version": "1.0.0",
    "conformsTo": [
        "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core",
        "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson",
        "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30",
        "http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter",
        "https://api.stacspec.org/v1.0.0-rc.1/collections",
        "https://api.stacspec.org/v1.0.0-rc.1/core",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#fields",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:basic-cql",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:cql-json",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:cql-text",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#query",
        "https://api.stacspec.org/v1.0.0-rc.1/item-search#sort",
        "https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features"
    ],
    "links": [
        {
            "rel": "self",
            "type": "application/json",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/"
        },
        {
            "rel": "root",
            "type": "application/json",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/"
        },
        {
            "rel": "data",
            "type": "application/json",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections"
        },
        {
            "rel": "conformance",
            "type": "application/json",
            "title": "STAC/WFS3 conformance classes implemented by this server",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/conformance"
        },
        {
            "rel": "search",
            "type": "application/geo+json",
            "title": "STAC search",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/search",
            "method": "GET"
        },
        {
            "rel": "search",
            "type": "application/geo+json",
            "title": "STAC search",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/search",
            "method": "POST"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Annual Puerto Rico",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-annual-pr"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Daily Hawaii",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-daily-hi"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Seamless DEMs",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-seamless"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Digital Surface Model",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-dsm"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Forest Inventory and Analysis",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/fia"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ESA WorldCover 2020",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/esa-worldcover"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Sentinel 1 Radiometrically Terrain Corrected (RTC)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-1-rtc"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "gridMET",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/gridmet"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Annual North America",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-annual-na"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Monthly North America",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-monthly-na"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Annual Hawaii",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-annual-hi"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Monthly Hawaii",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-monthly-hi"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Monthly Puerto Rico",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-monthly-pr"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "gNATSGO Soil Database - Tables",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/gnatsgo-tables"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "HGB: Harmonized Global Biomass for 2010",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/hgb"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Copernicus DEM GLO-30",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/cop-dem-glo-30"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Copernicus DEM GLO-90",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/cop-dem-glo-90"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "GOES-R Cloud & Moisture Imagery",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/goes-cmi"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "TerraClimate",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/terraclimate"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Earth Exchange Global Daily Downscaled Projections (NEX-GDDP-CMIP6)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/nasa-nex-gddp-cmip6"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "GPM IMERG",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/gpm-imerg-hhr"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "10m Annual Land Use Land Cover (9-class)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/io-lulc-9-class"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "gNATSGO Soil Database - Rasters",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/gnatsgo-rasters"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Height above Ground",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Intensity",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-intensity"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Point Source",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-pointsourceid"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MTBS: Monitoring Trends in Burn Severity",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/mtbs"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Landsat 8 Collection 2 Level-2",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-8-c2-l2"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "C-CAP Regional Land Cover and Change",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-c-cap"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Point Cloud",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-copc"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Burned Area Monthly",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-64A1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ALOS Forest/Non-Forest Annual Mosaic",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/alos-fnf-mosaic"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Returns",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-returns"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MoBI: Map of Biodiversity Importance",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/mobi"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Landsat Collection 2 Level-2",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ERA5 - PDS",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/era5-pds"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NAIP: National Agriculture Imagery Program",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/naip"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Chloris Biomass",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/chloris-biomass"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "HydroForecast - Kwando & Upper Zambezi Rivers",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/kaza-hydroforecast"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Planet-NICFI Basemaps (Analytic)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/planet-nicfi-analytic"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Gross Primary Productivity 8-Day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-17A2H-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Land Surface Temperature/Emissivity 8-Day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-11A2-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Daily Puerto Rico",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-daily-pr"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Digital Terrain Model (Native)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-dtm-native"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Classification",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-classification"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS 3DEP Lidar Digital Terrain Model",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-dtm"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS Gap Land Cover",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/gap"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Gross Primary Productivity 8-Day Gap-Filled",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-17A2HGF-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Planet-NICFI Basemaps (Visual)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/planet-nicfi-visual"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Global Biodiversity Information Facility (GBIF)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/gbif"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Net Primary Production Yearly Gap-Filled",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-17A3HGF-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Surface Reflectance 8-Day (500m)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-09A1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ALOS World 3D-30m",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/alos-dem"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ALOS PALSAR Annual Mosaic",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/alos-palsar-mosaic"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Microsoft Building Footprints",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/ms-buildings"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Deltares Global Water Availability",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/deltares-water-availability"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Net Evapotranspiration Yearly Gap-Filled",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-16A3GF-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Land Surface Temperature/3-Band Emissivity 8-Day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-21A2-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "US Census",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/us-census"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "JRC Global Surface Water",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/jrc-gsw"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Deltares Global Flood Maps",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/deltares-floods"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Nadir BRDF-Adjusted Reflectance (NBAR) Daily",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-43A4-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Surface Reflectance 8-Day (250m)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-09Q1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Thermal Anomalies/Fire Daily",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-14A1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "HREA: High Resolution Electricity Access",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/hrea"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Vegetation Indices 16-Day (250m)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-13Q1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Thermal Anomalies/Fire 8-Day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-14A2-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Sentinel-2 Level-2A",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Leaf Area Index/FPAR 8-Day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-15A2H-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Land Surface Temperature/Emissivity Daily",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-11A1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Leaf Area Index/FPAR 4-Day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-15A3H-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Snow Cover 8-day",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-10A2-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Snow Cover Daily",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-10A1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "MODIS Vegetation Indices 16-Day (500m)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-13A1-061"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Daymet Daily North America",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/daymet-daily-na"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Land Cover of Canada",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/nrcan-landcover"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ECMWF Open Data (real-time)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/ecmwf-forecast"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NOAA MRMS QPE 24-Hour Pass 2",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-mrms-qpe-24h-pass2"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Sentinel 1 Level-1 Ground Range Detected (GRD)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-1-grd"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NASADEM HGT v001",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/nasadem"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Esri 10-Meter Land Cover (10-class)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/io-lulc"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Landsat Collection 2 Level-1",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l1"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Denver Regional Council of Governments Land Use Land Cover",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/drcog-lulc"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Chesapeake Land Cover (7-class)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/chesapeake-lc-7"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Chesapeake Land Cover (13-class)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/chesapeake-lc-13"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Chesapeake Land Use",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/chesapeake-lu"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NOAA MRMS QPE 1-Hour Pass 1",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-mrms-qpe-1h-pass1"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NOAA MRMS QPE 1-Hour Pass 2",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-mrms-qpe-1h-pass2"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Monthly NOAA U.S. Climate Gridded Dataset (NClimGrid)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-nclimgrid-monthly"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "GOES-R Lightning Detection",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/goes-glm"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USDA Cropland Data Layers (CDLs)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/usda-cdl"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "Urban Innovation Eclipse Sensor Data",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/eclipse"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ESA Climate Change Initiative Land Cover Maps (Cloud Optimized GeoTIFF)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/esa-cci-lc"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ESA Climate Change Initiative Land Cover Maps (NetCDF)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/esa-cci-lc-netcdf"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "FWS National Wetlands Inventory",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/fws-nwi"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS LCMAP CONUS Collection 1.3",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/usgs-lcmap-conus-v13"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "USGS LCMAP Hawaii Collection 1.0",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/usgs-lcmap-hawaii-v10"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NOAA US Tabular Climate Normals",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-climate-normals-tabular"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NOAA US Gridded Climate Normals (NetCDF)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-climate-normals-netcdf"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "NOAA US Gridded Climate Normals (Cloud-Optimized GeoTIFF)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/noaa-climate-normals-gridded"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "ASTER L1T",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/aster-l1t"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "CIL Global Downscaled Projections for Climate Impacts Research (CC-BY-SA-4.0)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/cil-gdpcir-cc-by-sa"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "CIL Global Downscaled Projections for Climate Impacts Research (CC-BY-4.0)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/cil-gdpcir-cc-by"
        },
        {
            "rel": "child",
            "type": "application/json",
            "title": "CIL Global Downscaled Projections for Climate Impacts Research (CC0-1.0)",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/cil-gdpcir-cc0"
        },
        {
            "rel": "service-desc",
            "type": "application/vnd.oai.openapi+json;version=3.0",
            "title": "OpenAPI service description",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/openapi.json"
        },
        {
            "rel": "service-doc",
            "type": "text/html",
            "title": "OpenAPI service documentation",
            "href": "https://planetarycomputer.microsoft.com/api/stac/v1/docs"
        }
    ]
}

@chiarch84
Copy link

Sorry my mistake I just saw it!

@chiarch84
Copy link

But would it still work in my case where I have a catalog of catalogs? The children are all catalogs and not collections, so I want to see the chlidren in my home page not the list of collections.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

The collection list in the search page simply lists what /collections returns (once a data link is present and only if the collection list is not paginated).

@chiarch84
Copy link

ok perfect, let me try to do this change and see if it works! Thanks for your patiance.

@chiarch84
Copy link

I just tried to add the data link to the landing page and in fact I can see the list of collections in the combobox! Thanks!

image

I though still have the problem of the search page that is not loaded by itself and keeps turning, so probably this is another issue.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

Yes, please open a new issue for the other issue. It should include the new content of the API landing page response, your catalogUrl from the config and how your STAC Browser search link in the browser looks like (e.g. is it https://example.com/#/search or something else). @chiarch84

@chiarch84
Copy link

chiarch84 commented Jan 31, 2023

I though just noticed the possible side effect of adding this data link to my landing page.

Now in my home page instead than having my root catalog with just the list of child objects defined in the response (where each one is a subcatalog), I end up having the full list of collections, which was not what I wanted,.

Before adding the data link (24 catalogs in home):
image

After adding the data link (401 collections in home which is what is returned by /collections):
image

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

Yes. that's the intended way right now. We can surely discuss the implementation of the browsable extension and/or other config options to customize in a separate issue.

@chiarch84
Copy link

chiarch84 commented Jan 31, 2023

Hmm ok, so I think in case I have to delete the link from the landing page.

But couldn't you call the /collections method anyway when landing in the /search page independently if it is declared in the data link of the landing page? What do you think? If it is available in the conformances classes then you should be free to call it.
And this would also solve the browse problem.

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 31, 2023

No, this won't be implemented as such as without the link I don't know whether the endpoint is available. Basically, STAC Browser always just tries to react RESTful and follows links whenever possible. If I don't follow the link but instead fully rely on conformance classes, the collections would also shop up on the frontpage again. As said, we can surely discuss the implementation of other options in a separate issue. You are looking for custom behavior here.

@chiarch84
Copy link

Putting here the link to the tests done to the new functionality together with the children vs collections config option.

@chiarch84
Copy link

chiarch84 commented Feb 17, 2023

I'm reposting here since I think there is a small bug concerning this feature.

Since at the moment there is no specific api endpoint for catalogs and subcatalogs, these ones are returned under /collections
This means that the method /collections would return a list of collections mixed with a list of catalogs/subcatalogs.
The result is that the combobox in the search page shows also the catalogs/subcatalogs as selectable but of course this doesn't give any result in the search.

The suggestion would be to check weather the STAC type is "Catalog" or "Collection" and show in the list only the ones of type "Collection".

Here a simple example of json returned by /collections:

{"collections":[
    {
    "id":"1",
    "title": "Subcatalog 1",
    "type": "Catalog"
    },
    {
    "id":"1.1",
    "title": "Coll 1",
    "type": "Collection"
    },
    {
    "id":"1.2",
    "title": "Coll 2",
    "type": "Collection"
    }
]}

In this example I would want to see only Coll 1 and 2 in the combobox and not Subcatalog 1.

@m-mohr
Copy link
Collaborator

m-mohr commented Feb 17, 2023

You are not allowed to return Catalogs in /collections. That's violating the spec (although it seems right now that's only implicitly required through the required fields, not through the type field).

@chiarch84
Copy link

the problem arises always due to the fact that there is no specific API endpoint for catalogs.
In past issues where I tried to understand how to render subcatalogs it was suggested to return them from the API endpoint /collections
And this is in fact how I'm doing it.
I can have /collections/coll_id returning a collection and /collections/catalog_id returning a catalog

This means of course that collections and catalogs are mixes

@m-mohr
Copy link
Collaborator

m-mohr commented Feb 17, 2023

That's also not allowed. The API spec requires Collection fields, which are not present in Catalogs (I assume).

Why do you want to return sub-catalogs? Can you use the Children conformance class? Anyway, it doesn't belong in here as STAC Browser here just follows the spec. Let's better keep discussions in a single place, which it seems is here: radiantearth/stac-api-spec#388

@radiantearth radiantearth locked as off-topic and limited conversation to collaborators Feb 17, 2023
@m-mohr m-mohr modified the milestones: 3.1.0, 3.0.0-rc.1 Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants