STAC API#

Overview#

This notebook explains the use of the STAC API interface with GeoJSON response format. It uses the pystac [RD17] and pystac_client [RD18] libraries to access the interface. The visualisation of search results is borrowed from the ODC notebook available at [RD19]. Examples using curl on the command-line are provided as well.

URL_LANDING_PAGE =  'https://fedeo.ceos.org/' 

Access landing page#

The landing page provides access to collections (rel=”data”), child catalogs (rel=”child”) and the STAC item search endpoint (rel=”search”). Get the catalogue landing page with links to other resources and available collections.

curl -X GET -G https://fedeo.ceos.org/
from pystac_client import Client 

api = Client.open(URL_LANDING_PAGE) 
# show as a dictionary
api.to_dict()
{'type': 'Catalog',
 'id': 'fedeo',
 'stac_version': '1.1.0',
 'description': 'FedEO Clearinghouse provides interoperable access, following ISO/OGC interface guidelines, to Earth Observation metadata',
 'links': [{'rel': 'self',
   'href': 'https://fedeo.ceos.org/',
   'type': 'application/json'},
  {'rel': 'search',
   'href': 'https://fedeo.ceos.org/api?httpAccept=application/opensearchdescription%2Bxml',
   'type': 'application/opensearchdescription+xml',
   'title': 'OpenSearch Description Document'},
  {'rel': 'service-desc',
   'href': 'https://fedeo.ceos.org/api?httpAccept=application/vnd.oai.openapi%2Bjson;version=3.0',
   'type': 'application/vnd.oai.openapi+json;version=3.0',
   'title': 'OpenAPI definition in JSON format'},
  {'rel': 'data',
   'href': 'https://fedeo.ceos.org/collections',
   'type': 'application/json',
   'title': 'Metadata about the feature collections'},
  {'rel': 'data',
   'href': 'https://fedeo.ceos.org/collections',
   'type': 'application/ld+json',
   'title': 'Metadata about the feature collections'},
  {'rel': 'data',
   'href': 'https://fedeo.ceos.org/collections',
   'type': 'application/rdf+xml',
   'title': 'Metadata about the feature collections'},
  {'rel': 'data',
   'href': 'https://fedeo.ceos.org/collections',
   'type': 'text/turtle',
   'title': 'Metadata about the feature collections'},
  {'rel': 'conformance',
   'href': 'https://fedeo.ceos.org/conformance',
   'type': 'application/json',
   'title': 'OGC conformance classes implemented by this API'},
  {'rel': 'service-doc',
   'href': 'https://fedeo.ceos.org/readme.html',
   'type': 'text/html',
   'title': 'API Documentation'},
  {'rel': 'service-doc',
   'href': 'https://fedeo.ceos.org/index.html',
   'type': 'text/html',
   'title': 'API Documentation (Jupyter)'},
  {'rel': 'service-doc',
   'href': 'http://petstore.swagger.io/?url=https://fedeo.ceos.org/api',
   'type': 'text/html',
   'title': 'API documentation in Swagger.io format'},
  {'rel': 'alternate',
   'href': 'https://fedeo.ceos.org?httpAccept=text/html',
   'type': 'text/html',
   'title': 'Landing Page in HTML media type.'},
  {'rel': 'alternate',
   'href': 'https://fedeo.ceos.org?httpAccept=application/ld%2Bjson',
   'type': 'application/ld+json',
   'title': 'Landing Page in JSON-LD media type.'},
  {'rel': 'search',
   'href': 'https://fedeo.ceos.org/search',
   'type': 'application/geo+json',
   'title': 'STAC Search',
   'method': 'GET'},
  {'rel': 'search',
   'href': 'https://fedeo.ceos.org/search',
   'type': 'application/geo+json',
   'title': 'STAC Search',
   'method': 'POST'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/series/eo:platform',
   'type': 'application/json',
   'title': 'Collections by platform'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics',
   'type': 'application/json',
   'title': 'ESA Earth Topics'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/mim',
   'type': 'application/json',
   'title': 'MIM Measurement Keywords'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/instruments',
   'type': 'application/json',
   'title': 'ESA Instruments'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/platforms',
   'type': 'application/json',
   'title': 'ESA Platforms'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/sciencekeyword',
   'type': 'application/json',
   'title': 'GCMD Science Keywords'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/series/eo:organisationName',
   'type': 'application/json',
   'title': 'Collections by organisation'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/services/eo:platform',
   'type': 'application/json',
   'title': 'Services by platform'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/services/eo:organisationName',
   'type': 'application/json',
   'title': 'Services by organisation'},
  {'rel': 'root',
   'href': 'https://fedeo.ceos.org',
   'type': 'application/json',
   'title': 'FedEO Clearinghouse'}],
 'extent': {'spatial': {'bbox': [[-180, -90, 180, 90]]},
  'temporal': {'interval': [[None, None]]}},
 'license': 'other',
 'conformsTo': ['http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/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',
  'http://www.opengis.net/spec/ogcapi_common-2/1.0/conf/collections',
  'http://www.opengis.net/spec/ogcapi-common-2/1.0/conf/simple-query',
  'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/cql-filter',
  'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson',
  'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter',
  'https://api.stacspec.org/v1.0.0-rc.2/core',
  'https://api.stacspec.org/v1.0.0-rc.2/stac-search',
  'https://api.stacspec.org/v1.0.0-rc.2/stac-response',
  'https://api.stacspec.org/v1.0.0-rc.2/collection-search',
  'https://api.stacspec.org/v1.0.0-rc.2/collection-search#filter',
  'https://api.stacspec.org/v1.0.0-rc.1/collection-search#free-text',
  'https://api.stacspec.org/v1.0.0-rc.2/item-search',
  'https://api.stacspec.org/v1.0.0-rc.2/item-search#filter',
  'http://www.opengis.net/spec/cql2/1.0/conf/cql2-text',
  'http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2'],
 'title': 'FedEO Clearinghouse'}
# Get catalog title and description
print("Title\t\t:", api.title)
print("Description\t:", api.description)
print("Search link\t:", api.get_search_link())

# List child catalogs
print("Child catalogs:")
# for child in api.get_children():
#    print("\t", child.id)
    
children = [c for c in api.get_children()]
children
Title		: FedEO Clearinghouse
Description	: FedEO Clearinghouse provides interoperable access, following ISO/OGC interface guidelines, to Earth Observation metadata
Search link	: <Link rel=search target=https://fedeo.ceos.org/search>
Child catalogs:
[<CollectionClient id=series_eo:platform>,
 <CollectionClient id=5c476560-e0a3-554a-9187-187a90da1309>,
 <CollectionClient id=0>,
 <CollectionClient id=c98c8eae-7561-55de-bf01-2fb866693c14>,
 <CollectionClient id=738c519f-48db-5344-bebc-030c16781c22>,
 <CollectionClient id=1eb0ea0a-312c-4d74-8d42-6f1ad758f999>,
 <CollectionClient id=series_eo:organisationName>,
 <CollectionClient id=services_eo:platform>,
 <CollectionClient id=services_eo:organisationName>]
# Show title and id for each of the children.
for count, child in enumerate(children):
    print(f'\t{count} - {child.title}, id="{child.id}"')
	0 - EO platforms, id="series_eo:platform"
	1 - Earth Topic, id="5c476560-e0a3-554a-9187-187a90da1309"
	2 - Measurement, id="0"
	3 - Instrument, id="c98c8eae-7561-55de-bf01-2fb866693c14"
	4 - Platform, id="738c519f-48db-5344-bebc-030c16781c22"
	5 - Science Keywords, id="1eb0ea0a-312c-4d74-8d42-6f1ad758f999"
	6 - EO organisations, id="series_eo:organisationName"
	7 - Services by platform, id="services_eo:platform"
	8 - Services by organisation, id="services_eo:organisationName"

The collections are organised as a tree structure which can be traversed until arriving to a collection with items (granules). Get the details of one of the children of the root catalog as an example.

child = children[1]
child.to_dict()
{'type': 'Collection',
 'id': '5c476560-e0a3-554a-9187-187a90da1309',
 'stac_version': '1.1.0',
 'description': 'Earth Topic',
 'links': [{'rel': 'root',
   'href': 'https://fedeo.ceos.org',
   'type': 'application/json',
   'title': 'FedEO Clearinghouse'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/bbe13d71-bea9-55c2-9b65-a24043c35937',
   'type': 'application/json',
   'title': 'Agriculture [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/0d2133c5-b0bb-5ce2-b000-243ade6a65b8',
   'type': 'application/json',
   'title': 'Atmosphere [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/5ff2bf3e-a8da-5aa5-81d2-f801ae6454af',
   'type': 'application/json',
   'title': 'Biosphere [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/4ca68be3-d205-5dea-a292-6f0a7ab35595',
   'type': 'application/json',
   'title': 'Climate [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/e6a9631e-b7cf-5b3e-b414-1600379a72b3',
   'type': 'application/json',
   'title': 'Cryosphere [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/2a1c3522-f4a0-5d63-9d47-7af06a220302',
   'type': 'application/json',
   'title': 'Human Dimensions [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/e4d01e03-0ef5-5b4c-b40f-2b5f49667f53',
   'type': 'application/json',
   'title': 'Land Surface [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/8dc47b68-6cad-59ce-836f-7328372de417',
   'type': 'application/json',
   'title': 'Oceans [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/1589db19-32b2-5945-ad4b-6c3b13713176',
   'type': 'application/json',
   'title': 'Solid Earth [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/a59746f5-d93d-5637-b7fa-6e6220196104',
   'type': 'application/json',
   'title': 'Space Weather [ESA Earth Topics]'},
  {'rel': 'child',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics/8111e456-a0ff-588f-9ab6-9ef66d8df94a',
   'type': 'application/json',
   'title': 'Terrestrial Hydrosphere [ESA Earth Topics]'},
  {'rel': 'self',
   'href': 'https://fedeo.ceos.org/concepts/earthtopics',
   'type': 'application/json'},
  {'rel': 'parent',
   'href': 'https://fedeo.ceos.org/',
   'type': 'application/json',
   'title': 'FedEO Clearinghouse'}],
 'title': 'Earth Topic',
 'extent': {'spatial': {'bbox': [[-180, -90, 180, 90]]},
  'temporal': {'interval': [[None, None]]}},
 'license': 'other',
 'providers': [{'name': 'FedEO',
   'roles': ['host'],
   'url': 'https://fedeo.ceos.org/readme.html'}]}
# May have again children, get the list
children = [c for c in child.get_children()]
children
[<CollectionClient id=bbe13d71-bea9-55c2-9b65-a24043c35937>,
 <CollectionClient id=0d2133c5-b0bb-5ce2-b000-243ade6a65b8>,
 <CollectionClient id=5ff2bf3e-a8da-5aa5-81d2-f801ae6454af>,
 <CollectionClient id=4ca68be3-d205-5dea-a292-6f0a7ab35595>,
 <CollectionClient id=e6a9631e-b7cf-5b3e-b414-1600379a72b3>,
 <CollectionClient id=2a1c3522-f4a0-5d63-9d47-7af06a220302>,
 <CollectionClient id=e4d01e03-0ef5-5b4c-b40f-2b5f49667f53>,
 <CollectionClient id=8dc47b68-6cad-59ce-836f-7328372de417>,
 <CollectionClient id=1589db19-32b2-5945-ad4b-6c3b13713176>,
 <CollectionClient id=a59746f5-d93d-5637-b7fa-6e6220196104>,
 <CollectionClient id=8111e456-a0ff-588f-9ab6-9ef66d8df94a>]

Collection properties#

Collection identification#

URL = URL_LANDING_PAGE + 'collections/' + 'TropForest'
# URL = URL_LANDING_PAGE + 'collections/' + COLLECTION_ID1
curl -X GET -G https://fedeo.ceos.org/collections/TropForest
response = requests.get(URL)
data = json.loads(response.text)
jstr = json.dumps(data, indent=3)
md("```json\n" + jstr + "\n```\n")
{
   "extent": {
      "spatial": {
         "bbox": [
            [
               -100,
               -50,
               160,
               40
            ]
         ]
      },
      "temporal": {
         "interval": [
            [
               "2009-01-27T00:00:00.000Z",
               "2011-08-09T23:59:59.999Z"
            ]
         ]
      }
   },
   "stac_version": "1.0.0",
   "sci:doi": "10.5270/esa-qoe849q",
   "keywords": [
      "DIF10",
      "EARTH SCIENCE>AGRICULTURE",
      "EARTH SCIENCE>BIOSPHERE>ECOSYSTEMS>TERRESTRIAL ECOSYSTEMS>FORESTS",
      "EARTH SCIENCE>LAND SURFACE",
      "EARTH SCIENCE>BIOSPHERE>VEGETATION",
      "ALOS",
      "Deimos-1",
      "KOMPSAT-2",
      "AVNIR-2",
      "SLIM-6",
      "MSC",
      "Agriculture",
      "Forestry",
      "Land Surface",
      "Vegetation",
      "VIS (0.40 - 0.75 \u00b5m)",
      "NIR (0.75 - 1.30 \u00b5m)",
      "Sun-synchronous",
      "Very High Resolution - VHR (0 - 5m)",
      "High Resolution - HR (5 - 20 m)",
      "AL1_AV2_2F",
      "DE1_SL6_2F",
      "KO2_MSC_2F",
      "DE1 663 km; KO2 685 km; AL1 692 km",
      "DE1 625 km; KO2 15 km; AL1 70 km",
      "Imaging Spectrometers/Radiometers",
      "Cameras",
      "ALOS-1",
      "GEOSAT-1",
      "SLIM6"
   ],
   "created": "2019-05-23T00:00:00.00Z",
   "description": "The objective of the ESA TropForest project was to create a harmonised geo-database of ready-to-use satellite imagery to support 2010 global forest assessment performed by the Joint Research Centre (JRC) of the European Commission and by the Food and Agriculture Organization (FAO). Assessments for year 2010 were essential for building realistic deforestation benchmark rates at global to regional levels. To reach this objective, the project aimed to create a harmonised ortho-rectified/pre-processed imagery geo-database based on satellite data acquisitions (ALOS AVNIR-2, GEOSAT-1 SLIM6, KOMPSAT-2 MSC) performed during year 2009 and 2010, for the Tropical Latin America (excluding Mexico) and for the Tropical South and Southeast Asia (excluding China), resulting in 1971 sites located at 1 deg x 1 deg geographical lat/long intersections. The project finally delivered 1866 sites (94.7% of target) due to cloud coverages too high for missing sites",
   "sci:citation": "European Space Agency, 2016, ESA TropForest Archive. Version 1.0.",
   "type": "Collection",
   "title": "TropForest- ALOS, GEOSAT-1 &amp; KOMPSAT-2 optical coverages over tropical forests",
   "license": "various",
   "assets": {
      "search": {
         "roles": [
            "search"
         ],
         "href": "https://fedeo-client.ceos.org?url=https://fedeo.ceos.org/api?httpAccept=application/opensearchdescription%252Bxml&uid=TropForest",
         "type": "text/html",
         "title": "Search client"
      },
      "enclosure": {
         "roles": [
            "data"
         ],
         "href": "https://tpm-ds.eo.esa.int/oads/meta/Tropforest/index",
         "type": "text/html",
         "title": "OADS repository - OADS repository"
      },
      "metadata_ogc_17_069r3": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest",
         "title": "OGC 17-069r3 metadata",
         "type": "application/geo+json;profile=\"http://www.opengis.net/spec/ogcapi-features-1/1.0\""
      },
      "metadata_iso_19139": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/vnd.iso.19139%2Bxml",
         "title": "ISO 19139 metadata",
         "type": "application/vnd.iso.19139+xml"
      },
      "metadata_iso_19139_2": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/vnd.iso.19139-2%2Bxml",
         "title": "ISO 19139-2 metadata",
         "type": "application/vnd.iso.19139-2+xml"
      },
      "metadata_dif_10": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/dif10%2Bxml",
         "title": "DIF-10 metadata",
         "type": "application/dif10+xml"
      },
      "metadata_ogc_17_084r1": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest?mode=owc",
         "title": "OGC 17-084r1 metadata",
         "type": "application/geo+json;profile=\"http://www.opengis.net/spec/eoc-geojson/1.0\""
      },
      "metadata_html": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=text/html",
         "title": "HTML",
         "type": "text/html"
      },
      "metadata_iso_191115_3": {
         "roles": [
            "metadata"
         ],
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/vnd.iso.19115-3%2Bxml",
         "title": "ISO 19115-3 metadata",
         "type": "application/vnd.iso.19115-3+xml"
      }
   },
   "links": [
      {
         "rel": "cite-as",
         "href": "https://doi.org/10.5270/esa-qoe849q",
         "type": "text/html",
         "title": "Landing page"
      },
      {
         "rel": "related",
         "href": "https://fedeo.ceos.org/series/eo:platform/ALOS-1",
         "title": "More collections for ALOS-1 platform"
      },
      {
         "rel": "related",
         "href": "https://fedeo.ceos.org/series/eo:platform/GEOSAT-1",
         "title": "More collections for GEOSAT-1 platform"
      },
      {
         "rel": "related",
         "href": "https://fedeo.ceos.org/series/eo:platform/KOMPSAT-2",
         "title": "More collections for KOMPSAT-2 platform"
      },
      {
         "rel": "related",
         "href": "https://fedeo.ceos.org/concepts/instruments/f6ad42b7-1dba-57a0-a8cc-e7bc92b2a6b7",
         "title": "More collections for MSC instrument"
      },
      {
         "rel": "related",
         "href": "https://fedeo.ceos.org/concepts/instruments/a361a690-aa56-5851-824d-3d34c8fe00ea",
         "title": "More collections for AVNIR-2 instrument"
      },
      {
         "rel": "related",
         "href": "https://fedeo.ceos.org/concepts/instruments/5cc6eaab-0ddc-572f-a1b7-afa52ea5333d",
         "title": "More collections for SLIM6 instrument"
      },
      {
         "rel": "self",
         "href": "https://fedeo.ceos.org/collections/TropForest",
         "type": "application/json"
      },
      {
         "rel": "root",
         "href": "https://fedeo.ceos.org",
         "type": "application/json",
         "title": "FedEO Clearinghouse"
      },
      {
         "rel": "parent",
         "href": "https://fedeo.ceos.org",
         "title": "collections",
         "type": "application/json"
      },
      {
         "rel": "items",
         "href": "https://fedeo.ceos.org/collections/TropForest/items?httpAccept=application/geo%2Bjson;profile=https://stacspec.org",
         "type": "application/geo+json",
         "title": "Datasets search for the series TropForest"
      },
      {
         "rel": "http://www.opengis.net/def/rel/ogc/1.0/queryables",
         "href": "https://fedeo.ceos.org/collections/TropForest/queryables",
         "type": "application/schema+json",
         "title": "Queryables for TropForest"
      },
      {
         "rel": "search",
         "href": "https://fedeo.ceos.org/collections/series/items/TropForest/api",
         "type": "application/opensearchdescription+xml",
         "title": "OpenSearch Description Document"
      },
      {
         "rel": "describedby",
         "href": "http://due.esrin.esa.int/page_project134.php",
         "type": "text/html",
         "title": "More about TropForest - Other"
      },
      {
         "rel": "describedby",
         "href": "https://earth.esa.int/eogateway/documents/20142/1488753/ALOS_Deimos_Kompsat_TropForest_joined_2.jpg",
         "title": "Available products in TropForest dataset map - Available products in TropForest dataset (dark green, light green and blue circles)"
      },
      {
         "rel": "describedby",
         "href": "https://esatellus.service-now.com/csp?id=esa_simple_request&sys_id=f27b38f9dbdffe40e3cedb11ce961958",
         "type": "text/html",
         "title": "Get Help? - ESA Earth Observation User Services Portal"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/atom%2Bxml",
         "type": "application/atom+xml",
         "title": "Atom format"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/xml",
         "type": "application/xml",
         "title": "Dublin Core metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/ld%2Bjson",
         "type": "application/ld+json",
         "title": "JSON-LD metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/ld%2Bjson;profile=https://schema.org",
         "type": "application/ld+json;profile=\"https://schema.org\"",
         "title": "JSON-LD (schema.org) metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/ld%2Bjson;profile=http://data.europa.eu/930/",
         "type": "application/ld+json;profile=\"http://data.europa.eu/930/\"",
         "title": "JSON-LD (GeoDCAT-AP) metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/rdf%2Bxml",
         "type": "application/rdf+xml",
         "title": "RDF/XML metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/rdf%2Bxml;profile=https://schema.org",
         "type": "application/rdf+xml;profile=\"https://schema.org\"",
         "title": "RDF/XML (schema.org) metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=application/rdf%2Bxml;profile=http://data.europa.eu/930/",
         "type": "application/rdf+xml;profile=\"http://data.europa.eu/930/\"",
         "title": "RDF/XML (GeoDCAT-AP) metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=text/turtle",
         "type": "text/turtle",
         "title": "Turtle metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=text/turtle;profile=https://schema.org",
         "type": "text/turtle;profile=\"https://schema.org\"",
         "title": "Turtle (schema.org) metadata"
      },
      {
         "rel": "alternate",
         "href": "https://fedeo.ceos.org/collections/TropForest?httpAccept=text/turtle;profile=http://data.europa.eu/930/",
         "type": "text/turtle;profile=\"http://data.europa.eu/930/\"",
         "title": "Turtle (GeoDCAT-AP) metadata"
      }
   ],
   "id": "TropForest",
   "updated": "2025-02-04T13:52:05Z",
   "stac_extensions": [
      "https://stac-extensions.github.io/scientific/v1.0.0/schema.json"
   ],
   "providers": [
      {
         "roles": [
            "producer"
         ],
         "name": "ESA/ESRIN",
         "url": "http://www.esa.int"
      },
      {
         "roles": [
            "host"
         ],
         "name": "FedEO",
         "url": "https://fedeo.ceos.org/readme.html"
      }
   ],
   "summaries": {
      "instruments": [
         "AVNIR-2",
         "SLIM6",
         "MSC"
      ],
      "platform": [
         "ALOS-1",
         "GEOSAT-1",
         "KOMPSAT-2"
      ]
   }
}
# use stac_client class for STAC collection
c = Collection.from_dict(data)
print("id\t\t:", c.id)
print("title\t\t:", c.title)
print("description\t:", c.description)
print("keywords\t:", c.keywords)
print("spatial extent\t:", c.extent.spatial)
print("temporal extent\t:", c.extent.temporal)
# print("providers\t:", c.providers)
# c
id		: TropForest
title		: TropForest- ALOS, GEOSAT-1 &amp; KOMPSAT-2 optical coverages over tropical forests
description	: The objective of the ESA TropForest project was to create a harmonised geo-database of ready-to-use satellite imagery to support 2010 global forest assessment performed by the Joint Research Centre (JRC) of the European Commission and by the Food and Agriculture Organization (FAO). Assessments for year 2010 were essential for building realistic deforestation benchmark rates at global to regional levels. To reach this objective, the project aimed to create a harmonised ortho-rectified/pre-processed imagery geo-database based on satellite data acquisitions (ALOS AVNIR-2, GEOSAT-1 SLIM6, KOMPSAT-2 MSC) performed during year 2009 and 2010, for the Tropical Latin America (excluding Mexico) and for the Tropical South and Southeast Asia (excluding China), resulting in 1971 sites located at 1 deg x 1 deg geographical lat/long intersections. The project finally delivered 1866 sites (94.7% of target) due to cloud coverages too high for missing sites
keywords	: ['DIF10', 'EARTH SCIENCE>AGRICULTURE', 'EARTH SCIENCE>BIOSPHERE>ECOSYSTEMS>TERRESTRIAL ECOSYSTEMS>FORESTS', 'EARTH SCIENCE>LAND SURFACE', 'EARTH SCIENCE>BIOSPHERE>VEGETATION', 'ALOS', 'Deimos-1', 'KOMPSAT-2', 'AVNIR-2', 'SLIM-6', 'MSC', 'Agriculture', 'Forestry', 'Land Surface', 'Vegetation', 'VIS (0.40 - 0.75 µm)', 'NIR (0.75 - 1.30 µm)', 'Sun-synchronous', 'Very High Resolution - VHR (0 - 5m)', 'High Resolution - HR (5 - 20 m)', 'AL1_AV2_2F', 'DE1_SL6_2F', 'KO2_MSC_2F', 'DE1 663 km; KO2 685 km; AL1 692 km', 'DE1 625 km; KO2 15 km; AL1 70 km', 'Imaging Spectrometers/Radiometers', 'Cameras', 'ALOS-1', 'GEOSAT-1', 'SLIM6']
spatial extent	: <pystac.collection.SpatialExtent object at 0x0000017D81DCF560>
temporal extent	: <pystac.collection.TemporalExtent object at 0x0000017D81F44980>

The collection id (id) is to be used as collections parameter for a corresponding STAC item (granule) search. It can also be used in the ids parameter when searching collections by identifier.

Collection DOI#

Not all collections have a digital object identifier assigned. if they do, then it is available as sci:doi property. This value can be used for searching collections by DOI. Collections with DOI, typically also contain a link with rel=”cite-as” referring to their landing page.

try: 
    print(data['sci:doi'])
except:
    print("Not available")
10.5270/esa-qoe849q

Collection geometry#

Geometry information for a collection is included in the JSON response at the path $.extent.spatial.

data['extent']['spatial']
{'bbox': [[-100, -50, 160, 40]]}

Collection temporal extent#

The JSON response element provides temporal information for a collection, i.e. the start time and end time at the path $.extent.temporal. The end time may be absent indicating that the collection is not completed.

try: 
    print(data['extent']['temporal'])
except:
    print("Not available")
{'interval': [['2009-01-27T00:00:00.000Z', '2011-08-09T23:59:59.999Z']]}

Collection assets#

Collections provide access to a dictionary with assets. The roles attribute indicates the purpose of the asset. The href attribute provides the URL to access the asset. Collection assets may include thumbnail (when available), search interfaces, and various metadata formats.

The table below list some frequently used metadata formats and their corresponding media type (type).

Format

type

ISO19139

application/vnd.iso.19139+xml

ISO19139-2

application/vnd.iso.19139-2+xml

ISO19115-3

application/vnd.iso.19115-3+xml

ISO19157-2

application/vnd.iso.19157-2+xml

URL = URL_LANDING_PAGE + 'collections/' + COLLECTION_ID1
response = requests.get(URL)
data = json.loads(response.text)

# Show assets of the collection (GeoJSON)
jstr = json.dumps(data['assets'], indent=3)
md("```json\n" + jstr + "\n```\n")
{
   "search": {
      "roles": [
         "search"
      ],
      "href": "https://fedeo-client.ceos.org?url=https://fedeo.ceos.org/api?httpAccept=application/opensearchdescription%252Bxml&uid=PROBA.CHRIS.1A",
      "type": "text/html",
      "title": "Search client"
   },
   "enclosure": {
      "roles": [
         "data"
      ],
      "href": "https://tpm-ds.eo.esa.int/oads/meta/PROBA1-CHRIS/index/",
      "type": "text/html",
      "title": "OADS repository - OADS repository"
   },
   "metadata_ogc_17_069r3": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A",
      "title": "OGC 17-069r3 metadata",
      "type": "application/geo+json;profile=\"http://www.opengis.net/spec/ogcapi-features-1/1.0\""
   },
   "metadata_iso_19139": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A?httpAccept=application/vnd.iso.19139%2Bxml",
      "title": "ISO 19139 metadata",
      "type": "application/vnd.iso.19139+xml"
   },
   "metadata_iso_19139_2": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A?httpAccept=application/vnd.iso.19139-2%2Bxml",
      "title": "ISO 19139-2 metadata",
      "type": "application/vnd.iso.19139-2+xml"
   },
   "metadata_dif_10": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A?httpAccept=application/dif10%2Bxml",
      "title": "DIF-10 metadata",
      "type": "application/dif10+xml"
   },
   "metadata_ogc_17_084r1": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A?mode=owc",
      "title": "OGC 17-084r1 metadata",
      "type": "application/geo+json;profile=\"http://www.opengis.net/spec/eoc-geojson/1.0\""
   },
   "metadata_html": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A?httpAccept=text/html",
      "title": "HTML",
      "type": "text/html"
   },
   "metadata_iso_191115_3": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A?httpAccept=application/vnd.iso.19115-3%2Bxml",
      "title": "ISO 19115-3 metadata",
      "type": "application/vnd.iso.19115-3+xml"
   }
}
# Display assets belonging to the collection
c = Collection.from_dict(data)
assets = c.assets
df = pd.DataFrame(columns=['roles', 'title', 'type'])
for key in assets:
    ndf = pd.DataFrame({ 
            'roles': assets[key].roles, 
            'type': assets[key].media_type, 
            'title': assets[key].title, 
            # 'href': assets[key].href  
        }, index = [0])
    df = pd.concat([df, ndf], ignore_index=True)
df
roles title type
0 search Search client text/html
1 data OADS repository - OADS repository text/html
2 metadata OGC 17-069r3 metadata application/geo+json;profile="http://www.openg...
3 metadata ISO 19139 metadata application/vnd.iso.19139+xml
4 metadata ISO 19139-2 metadata application/vnd.iso.19139-2+xml
5 metadata DIF-10 metadata application/dif10+xml
6 metadata OGC 17-084r1 metadata application/geo+json;profile="http://www.openg...
7 metadata HTML text/html
8 metadata ISO 19115-3 metadata application/vnd.iso.19115-3+xml

Granule properties#

Granules are returned via item links in the Catalog or Collection objects, or via the STAC API (Feature). An item is a GeoJSON Feature and the encoding is derived from the original OGC 17-003r2 encoding according to a documented mapping.

The properties available include attributes from STAC extensions as well:

Assets#

Granules provide access to a dictionary with assets. The roles attribute indicates the purpose of the asset. The href attribute provides the URL to access the asset. Granule assets include thumbnail (when available), a data download link (equivalent to the rel=enclosure), and various metadata formats.

The table below list some frequently used metadata formats and their corresponding media type (type).

Format

type

ISO19139

application/vnd.iso.19139+xml

ISO19139-2

application/vnd.iso.19139-2+xml

ISO19115-3

application/vnd.iso.19115-3+xml

OGC 10-157r4

application/gml+xml;profile=http://www.opengis.net/spec/EOMPOM/1.1

OGC 17-003r2

application/geo+json;profile=http://www.opengis.net/spec/eo-geojson/1.0

# Show assets of first search result (GeoJSON)
data = results.item_collection_as_dict()
jstr = json.dumps(data['features'][1]['assets'], indent=3)
md("```json\n" + jstr + "\n```\n")
{
   "thumbnail": {
      "roles": [
         "thumbnail"
      ],
      "href": "http://landsat-diss.eo.esa.int/oads/meta/LandsatETM/thumbnail/L07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799_v0100.SIP.ZIP_TIMG.jpg",
      "type": "image/jpeg",
      "title": "THUMBNAIL"
   },
   "enclosure": {
      "roles": [
         "data"
      ],
      "href": "https://landsat-diss.eo.esa.int/oads/data/LandsatETM/L07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799_v0100.SIP.ZIP",
      "type": "application/zip",
      "title": "Download",
      "file:size": 270093903
   },
   "metadata_ogc_10_157r4": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/LANDSAT.ETM.GTC/items/LS07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799?httpAccept=application/gml%2Bxml&recordSchema=om",
      "title": "OGC 10-157r4 metadata",
      "type": "application/gml+xml;profile=\"http://www.opengis.net/spec/EOMPOM/1.1\""
   },
   "metadata_ogc_17_069r3": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/LANDSAT.ETM.GTC/items/LS07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799",
      "title": "OGC 17-069r3 metadata",
      "type": "application/geo+json;profile=\"http://www.opengis.net/spec/ogcapi-features-1/1.0\""
   },
   "metadata_ogc_17_003r2": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/LANDSAT.ETM.GTC/items/LS07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799?mode=owc",
      "title": "OGC 17-003r2 metadata",
      "type": "application/geo+json;profile=\"http://www.opengis.net/spec/eo-geojson/1.0\""
   },
   "metadata_iso_19139": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/LANDSAT.ETM.GTC/items/LS07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799?httpAccept=application/vnd.iso.19139%2Bxml",
      "title": "ISO 19139 metadata",
      "type": "application/vnd.iso.19139+xml"
   },
   "metadata_html": {
      "roles": [
         "metadata"
      ],
      "href": "https://fedeo.ceos.org/collections/LANDSAT.ETM.GTC/items/LS07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799?httpAccept=text/html",
      "title": "HTML",
      "type": "text/html"
   },
   "quicklook": {
      "roles": [
         "overview"
      ],
      "href": "http://landsat-diss.eo.esa.int/oads/meta/LandsatETM/browse/L07_RNSG_ETM_GTC_1P_19991129T092834_19991129T092902_003317_0188_0034_4799_v0100.SIP.ZIP_BID.PNG",
      "type": "image/png",
      "title": "QUICKLOOK"
   }
}
df = pd.DataFrame(columns=['roles', 'title', 'type'])
    
# Display assets belonging to first item in results
for item in results.items():
    assets = item.assets
    for key in assets:     
        ndf = pd.DataFrame({ 
            'roles': assets[key].roles, 
            'type': assets[key].media_type, 
            'title': assets[key].title, 
            # 'href': assets[key].href  
        }, index = [0])
        df = pd.concat([df, ndf], ignore_index=True)
    
    break
df
roles title type
0 thumbnail THUMBNAIL image/jpeg
1 data Download application/zip
2 metadata OGC 10-157r4 metadata application/gml+xml;profile="http://www.opengi...
3 metadata OGC 17-069r3 metadata application/geo+json;profile="http://www.openg...
4 metadata OGC 17-003r2 metadata application/geo+json;profile="http://www.openg...
5 metadata ISO 19139 metadata application/vnd.iso.19139+xml
6 metadata HTML text/html
7 overview QUICKLOOK image/png

Advanced topics#

Conformance classes#

The conformance classes supported by the STAC interface are advertised in the conformsTo property of the landing page.

[
   "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/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",
   "http://www.opengis.net/spec/ogcapi_common-2/1.0/conf/collections",
   "http://www.opengis.net/spec/ogcapi-common-2/1.0/conf/simple-query",
   "http://www.opengis.net/spec/ogcapi-records-1/1.0/req/cql-filter",
   "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson",
   "http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter",
   "https://api.stacspec.org/v1.0.0-rc.2/core",
   "https://api.stacspec.org/v1.0.0-rc.2/stac-search",
   "https://api.stacspec.org/v1.0.0-rc.2/stac-response",
   "https://api.stacspec.org/v1.0.0-rc.2/collection-search",
   "https://api.stacspec.org/v1.0.0-rc.2/collection-search#filter",
   "https://api.stacspec.org/v1.0.0-rc.1/collection-search#free-text",
   "https://api.stacspec.org/v1.0.0-rc.2/item-search",
   "https://api.stacspec.org/v1.0.0-rc.2/item-search#filter",
   "http://www.opengis.net/spec/cql2/1.0/conf/cql2-text",
   "http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2"
]

Additional search parameters#

Additional search parameters beyond the STAC search parameters can be used to filter collection search results. The available parameters for collection search are advertised at https://fedeo.ceos.org/collections/queryables and represented as a JSON Schema.

URL_QUERYABLES = URL_LANDING_PAGE + 'collections/queryables'
curl -X GET -G https://fedeo.ceos.org/collections/queryables
response = requests.get(URL_QUERYABLES)   
data = json.loads(response.text)    
df = pd.DataFrame(data['properties'].items(),columns=['key','value'])
df['type'] = df.apply(lambda row : row['value']['type'], axis = 1)
df['format'] = df.apply(lambda row : row['value']['format'] if 'format' in row['value'] else '-' , axis = 1)
df.drop('value',axis=1).sort_values(by=['key'])
key type format
14 classifiedAs string uri
13 doi string -
3 instrument string -
8 modificationDate string date-time
11 offering string -
7 organisationName string -
5 otherConstraint string -
2 parentIdentifier string -
6 platform string -
9 processingLevel string -
12 publisher string -
1 query string -
0 subject string -
4 title string -
10 useLimitation string -
{
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "description": "Queryable names for the STAC API Collection Search filter.",
   "type": "object",
   "title": "Queryables for the STAC API",
   "properties": {
      "subject": {
         "description": "{dc:subject}",
         "title": "Subject",
         "type": "string"
      },
      "query": {
         "description": "{os:searchTerms}",
         "title": "Query",
         "type": "string"
      },
      "parentIdentifier": {
         "description": "{eo:parentIdentifier}",
         "title": "Parent identifier",
         "type": "string",
         "enum": [
            "EOP:DLR:GEOSERVICE",
            "EOP:ESA:EARTH-ONLINE",
            "EOP:ESA:ECV",
            "EOP:EU:CMEMS",
            "EOP:EU:DATASPACE",
            "EOP:EUMETSAT",
            "EOP:INPE:DATA",
            "EOP:JAXA:G-PORTAL",
            "EOP:STFC:CEDA-CCI",
            "EOP:VITO:GLOBALLAND",
            "EOP:VITO:TERRASCOPE",
            "EOP:NASA:CMR"
         ]
      },
      "instrument": {
         "description": "{eo:instrument}",
         "title": "Instrument",
         "type": "string",
         "enum": [
            "GEOTON-L1",
            "GSA",
            "MSS",
            "PSS",
            "SHMSA_SR",
            "SHMSA_VR",
            "AATSR",
            "ABI",
            "ACC",
            "ACE-FTS",
            "ACGS",
            "AIRSAFE",
            "ALADIN",
            "ALTIKA",
            "AMI/SAR",
            "AMI/Scatterometer",
            "AMR-C",
            "AMSR",
            "AMSR-E",
            "AMSR2",
            "AMSU-B",
            "ASAR",
            "ASCAT",
            "ASM",
            "ASTER",
            "ATLID",
            "ATSR-1",
            "ATSR-2",
            "AVHRR",
            "AVHRR-2",
            "AVHRR-3",
            "AVNIR",
            "AVNIR-2",
            "AwiFS",
            "BBR",
            "BGI",
            "BLACKJACK",
            "BUV",
            "C-SAR",
            "CALIOP",
            "CAMERA",
            "CAPI",
            "CHRIS",
            "CIRC",
            "CPR",
            "CSG-SAR",
            "DESIS",
            "DORIS",
            "DPR",
            "EFI",
            "EGG",
            "EOC",
            "ETM",
            "GEOTON-L1",
            "GERB",
            "GIS",
            "GLI",
            "GMI",
            "GOES I-M IMAGER",
            "GOES N-P IMAGER",
            "GOES-13 IMAGER",
            "GOME",
            "GOME-2",
            "GOMOS",
            "GPSR",
            "GRACE ACC",
            "GRACE INTERFEROMETER",
            "GRACE LRR",
            "GRACE SCA",
            "GRAS",
            "GSA",
            "HALOE",
            "HIRS/2",
            "HIRS/3",
            "HIRS/4",
            "HRC",
            "HRG",
            "HRS",
            "HRV",
            "HRVIR",
            "HSI",
            "HiRAIS",
            "HiRI",
            "HyperScout-2",
            "IASI",
            "IIR",
            "JAMI",
            "KBR",
            "LIMS",
            "LISS-3",
            "LISS-4",
            "LRR",
            "MAESTRO",
            "MERIS",
            "MESSR",
            "MGM",
            "MHS",
            "MIPAS",
            "MIRAS",
            "MODIS",
            "MSC",
            "MSI",
            "MSS",
            "MTSAT 2 IMAGER",
            "MVIRI",
            "MWHS-1",
            "MWR",
            "NAOMI",
            "NRA",
            "OCM-2",
            "OCTS",
            "OLCI",
            "OLI Instrument",
            "OLI",
            "OLI-2",
            "OLS",
            "OMI",
            "OPS",
            "OSA",
            "OSCAT",
            "OSIRIS",
            "P-SAR",
            "PALSAR",
            "PALSAR-2",
            "PAN",
            "PANMUX",
            "PAZ-SAR",
            "PNEO",
            "POAM-II",
            "POAM-III",
            "POLDER",
            "POSEIDON-2",
            "POSEIDON-3",
            "POSEIDON-4",
            "PR",
            "PRARE",
            "PRISM",
            "PSS",
            "PlanetScope Camera",
            "RA",
            "RA-2",
            "RBV",
            "SAGE-I",
            "SAOCOM-SAR",
            "SAPHIR",
            "SAR",
            "SBUV",
            "SBUV/2",
            "SCARAB",
            "SCAT",
            "SCIAMACHY",
            "SENSE",
            "SEVIRI",
            "SGLI",
            "SHMSA_SR",
            "SHMSA_VR",
            "SIM",
            "SIRAL",
            "SLIM6",
            "SLSTR",
            "SMMR",
            "SMR",
            "SOLSTICE",
            "SRAL",
            "SSALT",
            "SSM/I",
            "SSM/T-2",
            "SSMIS",
            "SSTI",
            "SSTL S1-4",
            "STR",
            "STRATOS",
            "SWIM",
            "SeaWiFS",
            "SeaWinds",
            "SkySat Camera",
            "SpaceView-110",
            "TANSO-CAI",
            "TANSO-CAI-2",
            "TANSO-FTS",
            "TANSO-FTS-2",
            "TDX-1",
            "TIM",
            "TIROS-N",
            "TIRS",
            "TIRS-2",
            "TM",
            "TMI",
            "TOMS",
            "TROPOMI",
            "TSX-1",
            "VAS",
            "VFM",
            "VG1",
            "VG2",
            "VGT",
            "VHRR",
            "VISSR",
            "VISSR-GMS",
            "VTIR",
            "WAF-P",
            "WFC",
            "WFI",
            "WIF",
            "WINDSAT",
            "WPM",
            "WV110",
            "WV60",
            "X-SAR"
         ]
      },
      "title": {
         "description": "{dc:title}",
         "title": "Title",
         "type": "string"
      },
      "otherConstraint": {
         "description": "{eo:otherConstraint}",
         "title": "Other constraint",
         "type": "string"
      },
      "platform": {
         "description": "{eo:platform}",
         "title": "Platform",
         "type": "string",
         "enum": [
            "ADEOS-I",
            "ADEOS-II",
            "AEM-2",
            "ALOS",
            "ALOS-1",
            "ALOS-2",
            "AQUA",
            "Aeolus",
            "Amazonia-1",
            "Aura",
            "BIROS",
            "Beijing-1",
            "BelKA",
            "Biomass",
            "CALIPSO",
            "CBERS",
            "CBERS-4",
            "CBERS-4A",
            "CFOSAT",
            "CHAMP",
            "COSMO-SkyMed Second Generation",
            "COSMO-SkyMed",
            "CloudSat",
            "CryoSat-2",
            "DMSP 5D-1/F2",
            "DMSP 5D-1/F3",
            "DMSP 5D-1/F4",
            "DMSP 5D-2/F10",
            "DMSP 5D-2/F11",
            "DMSP 5D-2/F12",
            "DMSP 5D-2/F13",
            "DMSP 5D-2/F14",
            "DMSP 5D-2/F8",
            "DMSP 5D-3/F15",
            "DMSP 5D-3/F16",
            "DMSP 5D-3/F17",
            "DMSP 5D-3/F18",
            "DMSP 5D-3/F19",
            "DMSP",
            "ERS-1",
            "ERS-2",
            "EarthCARE",
            "Elektro-L-N1",
            "EnMAP",
            "Envisat",
            "FORMOSAT-2",
            "FSSCAT",
            "FY-3A",
            "FY-3B",
            "FY-3C",
            "FireBIRD",
            "GCOM-C1",
            "GCOM-W1",
            "GEOSAT-1",
            "GEOSAT-2",
            "GHGSat-C1",
            "GHGSat-C2",
            "GMS-1",
            "GMS-2",
            "GMS-3",
            "GMS-4",
            "GMS-5",
            "GOCE",
            "GOES",
            "GOES-1",
            "GOES-10",
            "GOES-11",
            "GOES-12",
            "GOES-13",
            "GOES-14",
            "GOES-15",
            "GOES-16",
            "GOES-2",
            "GOES-3",
            "GOES-4",
            "GOES-5",
            "GOES-6",
            "GOES-7",
            "GOES-8",
            "GOES-9",
            "GOSAT-1",
            "GOSAT-2",
            "GPM",
            "GRACE",
            "GeoEye-1",
            "ICEYE",
            "IKONOS",
            "IKONOS-2",
            "IRS-1C",
            "IRS-1D",
            "IRS-P5",
            "IRS-P6",
            "IRS-R2",
            "ISS",
            "JASON-3",
            "JERS-1",
            "JPSS-1",
            "Jason-1",
            "Jason-2",
            "KANOPUS_V1",
            "KOMPSAT-1",
            "KOMPSAT-2",
            "Landsat",
            "Landsat-1",
            "Landsat-2",
            "Landsat-3",
            "Landsat-4",
            "Landsat-5",
            "Landsat-7",
            "Landsat-8",
            "Landsat-9",
            "METEOR-3M",
            "MFG",
            "MONITOR-E",
            "MOS-1A",
            "MOS-1B",
            "MSG",
            "MTSAT-1R",
            "MTSAT-2",
            "Megha-Tropiques",
            "Meteosat-10",
            "Meteosat-11",
            "Meteosat-2",
            "Meteosat-3",
            "Meteosat-4",
            "Meteosat-5",
            "Meteosat-6",
            "Meteosat-7",
            "Meteosat-8",
            "Meteosat-9",
            "Metop-A",
            "Metop-B",
            "Metop-C",
            "NOAA POES",
            "NOAA-10",
            "NOAA-11",
            "NOAA-12",
            "NOAA-14",
            "NOAA-15",
            "NOAA-16",
            "NOAA-17",
            "NOAA-18",
            "NOAA-19",
            "NOAA-2",
            "NOAA-3",
            "NOAA-4",
            "NOAA-5",
            "NOAA-6",
            "NOAA-7",
            "NOAA-8",
            "NOAA-9",
            "NigeriaSat-1",
            "Nimbus-4",
            "Nimbus-7",
            "ODIN",
            "OceanSat-2",
            "OrbView-2",
            "PAZ",
            "PROBA-1",
            "PROBA-V",
            "Parasol-1",
            "PlanetScope",
            "Pleiades Neo",
            "Pleiades",
            "Pleiades-1A",
            "Pleiades-1B",
            "QUICKBIRD",
            "QuickBird-2",
            "QuikSCAT",
            "RADARSAT-1",
            "RADARSAT-2",
            "RESURS-DK1",
            "RESURS-P1",
            "RESURS-P2",
            "RapidEye",
            "SAC-D",
            "SAOCOM-1A",
            "SAOCOM-1B",
            "SARAL",
            "SCISAT-1",
            "SMAP",
            "SMOS",
            "SMS-1",
            "SMS-2",
            "SORCE",
            "SPOT 1",
            "SPOT 2",
            "SPOT 4",
            "SPOT 5",
            "SPOT",
            "SPOT-1",
            "SPOT-2",
            "SPOT-3",
            "SPOT-4",
            "SPOT-5",
            "SPOT-6",
            "SPOT-7",
            "Seasat",
            "Sentinel-1",
            "Sentinel-1A",
            "Sentinel-1B",
            "Sentinel-2",
            "Sentinel-2B",
            "Sentinel-3",
            "Sentinel-3A",
            "Sentinel-3B",
            "Sentinel-5P",
            "Sentinel-6",
            "SkySat",
            "Spire",
            "Swarm",
            "TERRA",
            "TET-1",
            "TIROS-N",
            "TOPEX/POSEIDON",
            "TRMM",
            "TanDEM-X",
            "TanSat",
            "TerraSAR-X",
            "UARS",
            "UAV",
            "UK-DMC-1",
            "Vision-1",
            "WindSat",
            "WorldView-1",
            "WorldView-2",
            "WorldView-3",
            "WorldView-4"
         ]
      },
      "organisationName": {
         "description": "{eo:organisationName}",
         "title": "Organisation name",
         "type": "string",
         "enum": [
            "Airbus Defence and Space Geo",
            "Airbus Defence and Space GmbH",
            "BR/INPE",
            "CEDA",
            "CMEMS",
            "CloudFerro",
            "DE/DLR",
            "DOC/NOAA",
            "DOC/NOAA/NESDIS/NCEI",
            "DOI/USGS",
            "EC",
            "ECMWF",
            "EEA",
            "ESA/ESRIN",
            "EU/C3S",
            "EUMETSAT",
            "EUMETSAT/CMSAF",
            "EUMETSAT/OSISAF",
            "FR/CNES",
            "FR/Meteo-France",
            "JP/JAXA/SAOC",
            "JP/JMA",
            "Japan Aerospace Exploration Agency (JAXA)",
            "NASA",
            "NL/KNMI",
            "NO/MET",
            "ROSCOSMOS",
            "SatOC",
            "Sinergise",
            "UC-LONDON/CPOM",
            "UK/CCLRC/RAL",
            "VITO"
         ]
      },
      "modificationDate": {
         "format": "date-time",
         "description": "{eo:modificationDate}",
         "title": "Modification date",
         "type": "string"
      },
      "processingLevel": {
         "description": "{eo:processingLevel}",
         "title": "Processing level",
         "type": "string",
         "enum": [
            "level 0",
            "level 1",
            "level 1.5",
            "level 1a",
            "level 1b",
            "level 1b+",
            "level 1c",
            "level 1d",
            "level 1g",
            "level 1gt",
            "level 1r",
            "level 1t",
            "level 2",
            "level 2a",
            "level 2b",
            "level 2c",
            "level 3",
            "level 3a",
            "level 3b",
            "level 4",
            "level-a",
            "level-a+",
            "multiple"
         ]
      },
      "useLimitation": {
         "description": "{eo:useLimitation}",
         "title": "Use limitation",
         "type": "string"
      },
      "offering": {
         "description": "{eo:offering}",
         "title": "Offering",
         "type": "string",
         "enum": [
            "download-1.0-ftp--download",
            "http",
            "https",
            "link-1.0-http--link",
            "link-1.0-http--partners",
            "link-1.0-http--related",
            "wcs",
            "wms"
         ]
      },
      "publisher": {
         "description": "{dc:publisher}",
         "title": "Publisher",
         "type": "string"
      },
      "doi": {
         "description": "{eo:doi}",
         "title": "Doi",
         "type": "string"
      },
      "classifiedAs": {
         "format": "uri",
         "description": "{semantic:classifiedAs}",
         "title": "Classified as",
         "type": "string"
      }
   },
   "$id": "https://fedeo.ceos.org/collections/queryables"
}

Additional search parameters beyond the STAC search parameters can be used to filter granule search results. The available parameters for granule search are advertised for each individual collection and represented as a JSON Schema.

For example, the collection PROBA.CHRIS.1A, advertises its search parameters at https://fedeo.ceos.org/collections/PROBA.CHRIS.1A/queryables in JSON Schema format. Therefore, the following parameters can be used within a filter expression.

Get filter parameters for granule search

curl -X GET -G https://fedeo.ceos.org/collections/PROBA.CHRIS.1A/queryables
key type format
0 acquisitionType string -
11 classifiedAs string uri
12 frame string -
1 illuminationAzimuthAngle number -
9 illuminationElevationAngle number -
2 instrument string -
4 orbitNumber integer -
3 platform string -
5 platformSerialIdentifier string -
10 productType string -
6 productionStatus string -
8 sensorMode string -
7 track string -
{
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "description": "Queryable names for the STAC API Item Search filter.",
   "type": "object",
   "title": "Queryables for PROBA.CHRIS.1A collection",
   "properties": {
      "acquisitionType": {
         "description": "{eo:acquisitionType}",
         "title": "Acquisition type",
         "type": "string",
         "enum": [
            "NOMINAL"
         ]
      },
      "illuminationAzimuthAngle": {
         "description": "{eo:illuminationAzimuthAngle}",
         "maximum": 360,
         "title": "Illumination azimuth angle",
         "type": "number",
         "minimum": 0
      },
      "instrument": {
         "description": "{eo:instrument}",
         "title": "Instrument",
         "type": "string",
         "enum": [
            "CHRIS"
         ]
      },
      "platform": {
         "description": "{eo:platform}",
         "title": "Platform",
         "type": "string",
         "enum": [
            "PROBA"
         ]
      },
      "orbitNumber": {
         "description": "{eo:orbitNumber}",
         "title": "Orbit number",
         "type": "integer"
      },
      "platformSerialIdentifier": {
         "description": "{eo:platformSerialIdentifier}",
         "title": "Platform serial identifier",
         "type": "string",
         "enum": [
            "1"
         ]
      },
      "productionStatus": {
         "description": "{eo:productionStatus}",
         "title": "Production status",
         "type": "string",
         "enum": [
            "ARCHIVED"
         ]
      },
      "track": {
         "description": "{eo:track}",
         "title": "Track",
         "type": "string",
         "enum": [
            "e000",
            "e001",
            "e002",
            "e003",
            "e004",
            "e005",
            "e006",
            "e007",
            "e008",
            "e009",
            "e010",
            "e011",
            "e012",
            "e013",
            "e014",
            "e015",
            "e016",
            "e017",
            "e018",
            "e019",
            "e020",
            "e021",
            "e022",
            "e023",
            "e024",
            "e025",
            "e026",
            "e027",
            "e028",
            "e029",
            "e030",
            "e031",
            "e032",
            "e033",
            "e034",
            "e035",
            "e036",
            "e037",
            "e038",
            "e039",
            "e040",
            "e041",
            "e042",
            "e043",
            "e044",
            "e045",
            "e046",
            "e047",
            "e048",
            "e049",
            "e050",
            "e051",
            "e052",
            "e053",
            "e054",
            "e055",
            "e056",
            "e057",
            "e058",
            "e059",
            "e060",
            "e062",
            "e063",
            "e068",
            "e069",
            "e070",
            "e071",
            "e072",
            "e073",
            "e074",
            "e076",
            "e077",
            "e078",
            "e080",
            "e082",
            "e083",
            "e085",
            "e086",
            "e087",
            "e089",
            "e090",
            "e091",
            "e092",
            "e094",
            "e096",
            "e098",
            "e100",
            "e101",
            "e102",
            "e103",
            "e104",
            "e105",
            "e106",
            "e107",
            "e108",
            "e109",
            "e110",
            "e111",
            "e112",
            "e113",
            "e114",
            "e115",
            "e116",
            "e117",
            "e118",
            "e119",
            "e120",
            "e121",
            "e122",
            "e123",
            "e124",
            "e125",
            "e126",
            "e127",
            "e128",
            "e129",
            "e130",
            "e131",
            "e132",
            "e133",
            "e135",
            "e138",
            "e139",
            "e141",
            "e142",
            "e143",
            "e144",
            "e145",
            "e146",
            "e147",
            "e148",
            "e149",
            "e150",
            "e151",
            "e152",
            "e153",
            "e155",
            "e156",
            "e159",
            "e166",
            "e167",
            "e171",
            "e175",
            "e176",
            "e178",
            "w000",
            "w001",
            "w002",
            "w003",
            "w004",
            "w005",
            "w006",
            "w007",
            "w008",
            "w009",
            "w010",
            "w015",
            "w016",
            "w017",
            "w019",
            "w021",
            "w022",
            "w023",
            "w024",
            "w025",
            "w027",
            "w028",
            "w029",
            "w031",
            "w033",
            "w034",
            "w036",
            "w037",
            "w039",
            "w040",
            "w041",
            "w043",
            "w044",
            "w045",
            "w046",
            "w047",
            "w048",
            "w049",
            "w051",
            "w052",
            "w053",
            "w054",
            "w055",
            "w056",
            "w057",
            "w058",
            "w059",
            "w060",
            "w061",
            "w062",
            "w063",
            "w064",
            "w065",
            "w066",
            "w067",
            "w068",
            "w069",
            "w070",
            "w071",
            "w072",
            "w073",
            "w074",
            "w075",
            "w076",
            "w077",
            "w078",
            "w079",
            "w080",
            "w081",
            "w082",
            "w083",
            "w084",
            "w085",
            "w086",
            "w087",
            "w088",
            "w089",
            "w090",
            "w091",
            "w092",
            "w093",
            "w094",
            "w095",
            "w096",
            "w097",
            "w098",
            "w099",
            "w100",
            "w101",
            "w102",
            "w103",
            "w104",
            "w105",
            "w106",
            "w107",
            "w109",
            "w110",
            "w111",
            "w112",
            "w113",
            "w114",
            "w115",
            "w116",
            "w117",
            "w118",
            "w119",
            "w120",
            "w121",
            "w122",
            "w123",
            "w124",
            "w125",
            "w126",
            "w128",
            "w130",
            "w132",
            "w134",
            "w136",
            "w138",
            "w139",
            "w140",
            "w141",
            "w143",
            "w144",
            "w145",
            "w146",
            "w147",
            "w148",
            "w149",
            "w150",
            "w151",
            "w152",
            "w153",
            "w154",
            "w155",
            "w156",
            "w157",
            "w158",
            "w159",
            "w160",
            "w161",
            "w165",
            "w166",
            "w168",
            "w169",
            "w170",
            "w171",
            "w173",
            "w174",
            "w175",
            "w176",
            "w177"
         ]
      },
      "sensorMode": {
         "description": "{eo:sensorMode}",
         "title": "Sensor mode",
         "type": "string",
         "enum": [
            "MODE-1",
            "MODE-2",
            "MODE-3",
            "MODE-4",
            "MODE-5"
         ]
      },
      "illuminationElevationAngle": {
         "description": "{eo:illuminationElevationAngle}",
         "maximum": 180,
         "title": "Illumination elevation angle",
         "type": "number",
         "minimum": 0
      },
      "productType": {
         "description": "{eo:productType}",
         "title": "Product type",
         "type": "string",
         "enum": [
            "CHR_MO1_1P",
            "CHR_MO2_1P",
            "CHR_MO3_1P",
            "CHR_MO4_1P",
            "CHR_MO5_1P"
         ]
      },
      "classifiedAs": {
         "format": "uri",
         "description": "{semantic:classifiedAs}",
         "title": "Classified as",
         "type": "string"
      },
      "frame": {
         "description": "{eo:frame}",
         "title": "Frame",
         "type": "string"
      }
   },
   "$id": "https://fedeo.ceos.org/collections/PROBA.CHRIS.1A/queryables"
}

CQL filter expressions#

The STAC interface supports the filter parameter and filter expressions in cql-text filter format at the following endpoints:

  • /collections

  • /collections/{collection-id}/items

  • /search

At the /search endpoint, it is required that a single collection can be determined from the collections or ids parameter. The queryables allowed in the filter expression are then identical to the ones at the corresponding /collections/{collection-id}/items/queryables endpoint. filter cannot be used at the /search endpoint when collections contains 0 or more than 1 collection identifiers.

Filter expressions are to be expressed with the Text encoding of the Basic Common Query Language (Basic CQL2-Text) [RD22]. See the OGC API Features “Conformance class Filter” section for CQL2 examples.

Example: 8.1

CQL Filter for collection search with logical operators (and, or).

results = api.collection_search(
    filter = "platform = 'Envisat' and ( instrument = 'MERIS' or instrument = 'MIPAS' ) and organisationName = 'ESA/ESRIN'"
)
curl -X GET -G https://fedeo.ceos.org/collections \
	--data-urlencode "filter=platform = 'Envisat' and ( instrument = 'MERIS' or instrument = 'MIPAS' ) and organisationName = 'ESA/ESRIN'" \
	--data-urlencode "filter-lang=cql2-text"
data = results.collection_list_as_dict()
df = pd.json_normalize(data, record_path=['collections'])
df[['id', 'title']]
id title
0 ENVISAT.MIP.NL__1P Envisat MIPAS L1 - Geo-located and calibrated ...
1 MER_FRS_1P Envisat MERIS Full Resolution - Level 1 [MER_F...
2 MER.RR__2P Envisat MERIS Reduced Resolution Geophysical P...
3 11512 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
4 11511 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
5 11517 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
6 11514 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
7 10481 ESA Land Cover Climate Change Initiative (Land...
8 11508 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
9 11515 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
10 11516 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
11 11519 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
12 10452 ESA Fire Climate Change Initiative (Fire_cci):...
13 MER_FRS_2P Envisat MERIS Full Resolution - Level 2 [MER_F...
14 ENVISAT.MIP.NL__2P Envisat MIPAS L2 - Temperature, pressure and a...
15 MER.RR__1P Envisat MERIS Reduced Resolution - Level 1 [ME...
16 11507 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
17 10644 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
18 11518 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
19 10645 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
20 10443 GlobVapour TCWV. CLIMATE APPLICATIONS: Lindstr...
21 10362 ESA Fire Climate Change Initiative (Fire_cci):...
22 11513 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...
23 11520 CLIMATE APPLICATIONS: Climate and carbon model...
24 11509 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
25 11510 CLIMATE APPLICATIONS: Marine ecosystem dynamic...
26 11506 ESA Ocean Colour CCI version 3.0. CLIMATE APPL...

Example: 8.2

CQL filter for granule search with comparison operators. Search granules with cloudCover between 10 and 15%.

from pystac_client import Client 
api = Client.open(URL_LANDING_PAGE)  

results = api.search(
    method = 'GET',   
    max_items = 30,
    collections = [COLLECTION_ID3_CLOUDS],
    filter = "cloudCover >= 10 and cloudCover < 15"   
)
curl -X GET -G https://fedeo.ceos.org/search \
	--data-urlencode "collections=IKONOS.ESA.archive" \
	--data-urlencode "filter=cloudCover >= 10 and cloudCover < 15" \
	--data-urlencode "filter-lang=cql2-text"
print(f"{results.matched()} items found.")
26 items found.
# Display cloud-cover values as histogram to show that range is taken into account
stac_json = results.item_collection_as_dict()
gdf = gpd.GeoDataFrame.from_features(stac_json)
try:
  _ = gdf[['title','eo:cloud_cover']].hist()
except:
  print("eo:cloud_cover information is not available.")
_images/6bf20967f35f17bd43acf61d8189b95c6362bd5ec6822f719f580f5f99a40cdd.png

Further Reading#