From 0885c8102a4c4e6321fb1d8754a30bd9531d5cc6 Mon Sep 17 00:00:00 2001 From: abuiquoc <78238832+abuiquoc@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:28:25 +0100 Subject: [PATCH 1/3] Delete old migration_of_opensearch_to_stac_guide.ipynb --- ...igration_of_opensearch_to_stac_guide.ipynb | 8113 ----------------- 1 file changed, 8113 deletions(-) delete mode 100644 geo/migration_of_opensearch_to_stac_guide.ipynb diff --git a/geo/migration_of_opensearch_to_stac_guide.ipynb b/geo/migration_of_opensearch_to_stac_guide.ipynb deleted file mode 100644 index 22ea68a..0000000 --- a/geo/migration_of_opensearch_to_stac_guide.ipynb +++ /dev/null @@ -1,8113 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "39d4bfb3-2594-48b5-8b4e-cd879500c7c6", - "metadata": {}, - "source": [ - "# **Switch to STAC Catalogue API - OpenSearch Catalogue API Decommissioning**" - ] - }, - { - "cell_type": "markdown", - "id": "e354bcb1-9a35-42d6-b8ed-a767f698ff76", - "metadata": {}, - "source": [ - "## **Introduction**" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "7ade6582-c6a6-43e1-ac26-d17159d50ecf", - "metadata": {}, - "source": [ - "Due to the planned **[decommissioning of the OpenSearch Catalogue API](https://dataspace.copernicus.eu/news/2025-10-16-opensearch-catalogue-api-decommissioning-notice)** (hereafter referred to as Resto) scheduled for **2 February 2026**, users are encouraged to prepare their services and integrations for a transition to the STAC Catalogue API. This Jupyter notebook has been created as a practical migration guide to support that process and to facilitate a smooth and informed transition." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "8e259776-6382-48e7-9558-c602c7b6de0f", - "metadata": {}, - "source": [ - "The primary goal of this notebook is to help users understand how existing Resto-based workflows can be translated into equivalent STAC API queries. It provides conceptual guidance as well as concrete examples, enabling users to gradually adapt their applications while preserving existing functionality.\n", - "\n", - "Beyond serving as a replacement for Resto interface, STAC introduces a richer and more expressive data model, along with extended capabilities. By providing a standardized schema to describe spatiotemporal assets, STAC improves data interoperability across platforms and tools. This standardization lowers the entry barrier to efficiently discover, access, and exploit satellite and remote sensing data." - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "47b0d475-3d1f-482b-91e2-1e4683ff12a8", - "metadata": {}, - "source": [ - "This notebook is structured into three main sections, focusing respectively on:\n", - "\n", - "* Collections & Items,\n", - "* Specific Items,\n", - "* Filters & Extensions.\n", - " \n", - "Each section focuses on practical usage patterns and highlights the correspondence between Resto query parameters and their STAC equivalents, allowing users to incrementally migrate their discovery workflows with confidence." - ] - }, - { - "cell_type": "markdown", - "id": "b673f64a-3bbd-413b-aa18-6c0827ac00e0", - "metadata": {}, - "source": [ - "## **Libraries**\n", - "\n", - "Before we begin, we need to make sure that all the required libraries are installed and imported.\n", - "\n", - "* `pandas`: Python library used for data manipulation and analysis \n", - "* `requests`: Python library used for sending HTTP requests and interacting with APIs \n", - "* `xml.etree.ElementTree`: Python library used for parsing and navigating an XML document" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "2cbc4397-4453-4aa1-b353-e5d27b53d136", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: pandas in /opt/conda/lib/python3.11/site-packages (2.3.3)\n", - "Requirement already satisfied: numpy>=1.23.2 in /opt/conda/lib/python3.11/site-packages (from pandas) (2.4.0)\n", - "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.11/site-packages (from pandas) (2.8.2)\n", - "Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.11/site-packages (from pandas) (2023.3)\n", - "Requirement already satisfied: tzdata>=2022.7 in /opt/conda/lib/python3.11/site-packages (from pandas) (2025.2)\n", - "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)\n" - ] - } - ], - "source": [ - "!pip install pandas\n", - "import pandas as pd\n", - "import requests\n", - "import xml.etree.ElementTree as ET" - ] - }, - { - "cell_type": "markdown", - "id": "7d90fbf7-3016-407d-9254-5a24e101fa16", - "metadata": {}, - "source": [ - "## **Collections & Items**\n", - "\n", - "This section is dedicated to exploring **collections** - discovering which collections are available, examining the products they contain, and accessing metadata and properties associated with them. \n", - "\n", - "It also covers **items** within those collections, including how to search for them, retrieve their attributes, and understand their spatial, temporal, and product-specific information.\n", - "\n", - "We will first cover aspects related to Resto and then transition smoothly to STAC." - ] - }, - { - "cell_type": "markdown", - "id": "72a007a8-041a-411f-bf77-3128c14e0653", - "metadata": {}, - "source": [ - "### **Resto**\n", - "\n", - "Data in Resto are organized into collections, which correspond to different satellites or data sources. Queries can target either all collections or a specific collection. \n", - "\n", - "Accessing the base Resto URL provides information about products available in the catalogue, rather than details about collections themselves - it does not provide collection-level summaries or structure." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "c4bc044f-e18d-4e5c-8576-0306bf5bf746", - "metadata": {}, - "outputs": [], - "source": [ - "resto_url = (\n", - " \"https://catalogue.dataspace.copernicus.eu/resto/api/collections/search.json?\"\n", - ")" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "9c448cb6-fd79-4add-a891-06507570c80d", - "metadata": {}, - "source": [ - "Executing the query below will return metadata about the products in the catalogue. The response includes key fields for each product: type, id, geometry, properties. \n", - "\n", - "> **Hint:** The `.head()` function is used to display the first five rows of a DataFrame. This is useful for quickly inspecting the structure of your data and verifying that it has been loaded correctly." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "138b99a2-c08c-435d-a333-b370e3e54806", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/search.json?\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Feature91822f33-b15c-5b60-aa39-6d9f6f5c773b{'type': 'Polygon', 'coordinates': [[[-176.587...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
1Featurebfd8cd54-52a7-48e2-88d0-58df86167399{'type': 'Polygon', 'coordinates': [[[-145.885...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
2Featureeb59e26f-c472-4f5f-8289-49bce7b13b7e{'type': 'MultiPolygon', 'coordinates': [[[[10...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
3Feature85899f29-0854-30a0-b9a7-5f2d332e6f10{'type': 'Polygon', 'coordinates': [[[140.656,...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
4Feature2b5ae1be-1831-447d-90b0-1e4b4d34d7b2{'type': 'Polygon', 'coordinates': [[[138.511,...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature 91822f33-b15c-5b60-aa39-6d9f6f5c773b \n", - "1 Feature bfd8cd54-52a7-48e2-88d0-58df86167399 \n", - "2 Feature eb59e26f-c472-4f5f-8289-49bce7b13b7e \n", - "3 Feature 85899f29-0854-30a0-b9a7-5f2d332e6f10 \n", - "4 Feature 2b5ae1be-1831-447d-90b0-1e4b4d34d7b2 \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[-176.587... \n", - "1 {'type': 'Polygon', 'coordinates': [[[-145.885... \n", - "2 {'type': 'MultiPolygon', 'coordinates': [[[[10... \n", - "3 {'type': 'Polygon', 'coordinates': [[[140.656,... \n", - "4 {'type': 'Polygon', 'coordinates': [[[138.511,... \n", - "\n", - " properties \n", - "0 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", - "1 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", - "2 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", - "3 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", - "4 {'collection': 'SENTINEL-3', 'status': 'ONLINE... " - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "json = requests.get(resto_url).json()\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "pd.DataFrame(json[\"features\"]).head()" - ] - }, - { - "cell_type": "markdown", - "id": "2783332c-bc01-48e9-a5e5-1381fa2ce4a8", - "metadata": {}, - "source": [ - "The list of available collections must be obtained from the documentation. For the next steps, we will create a Python list containing a few selected collections. This will allow us to perform queries and examples more efficiently." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "fc5f20c5-b0d7-42d7-97a4-8f85b085c6e1", - "metadata": {}, - "outputs": [], - "source": [ - "resto_collections = [\"Sentinel1\", \"Sentinel2\", \"Sentinel3\", \"Sentinel5P\", \"CLMS\"]" - ] - }, - { - "cell_type": "markdown", - "id": "7a92eff6-6694-48c2-b9bf-eded274a67c4", - "metadata": {}, - "source": [ - "For each satellite (collection), the set of queryable parameters can be obtained from the resulting XML via **describe.xml** endpoint.\n", - "\n", - "To simplify it, we will create a Python function that reads the relevant parameters for a given collection from the XML. This approach allows users to know in advance what they can query, making it easier to construct valid requests without manually inspecting the XML for every collection." - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "4fdbdd26-3335-4a4c-adf9-6485827849e0", - "metadata": {}, - "outputs": [], - "source": [ - "def parse_resto_collection(collection):\n", - " \"\"\"\n", - " Fetches and parses the describe.xml metadata for a given Resto collection.\n", - "\n", - " Args:\n", - " collection (str): The name of the collection (e.g., \"Sentinel2\").\n", - "\n", - " Returns:\n", - " dict: A dictionary containing:\n", - " - 'collection': the collection name\n", - " - 'short_name': the short name of the collection\n", - " - 'description': the collection description\n", - " - 'parameters': a list of queryable parameter names available for this collection\n", - "\n", - " \"\"\"\n", - " url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection}/describe.xml\"\n", - " response = requests.get(url)\n", - " root = ET.fromstring(response.content)\n", - "\n", - " ns = {\n", - " \"os\": \"http://a9.com/-/spec/opensearch/1.1/\",\n", - " \"param\": \"http://a9.com/-/spec/opensearch/extensions/parameters/1.0/\",\n", - " }\n", - "\n", - " return {\n", - " \"collection\": collection,\n", - " \"short_name\": root.findtext(\"os:ShortName\", namespaces=ns),\n", - " \"description\": root.findtext(\"os:Description\", namespaces=ns),\n", - " \"parameters\": [\n", - " p.attrib.get(\"name\") for p in root.findall(\".//param:Parameter\", ns)\n", - " ],\n", - " }" - ] - }, - { - "cell_type": "markdown", - "id": "14918dba-59ee-4796-99cc-a89dcf847f9b", - "metadata": {}, - "source": [ - "The code below executes the `parse_resto_collection` function for every collection in the `resto_collections` list." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "ee2bcf43-20f1-42d2-b560-3c0b10dc1ef0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
collectionshort_namedescriptionparameters
0Sentinel1Sentinel-1Sentinel-1 Collection[maxRecords, index, page, identifier, geometry...
1Sentinel2Sentinel-2Sentinel-2 Collection[maxRecords, index, page, identifier, geometry...
2Sentinel3Sentinel-3Sentinel-3 Collection[maxRecords, index, page, identifier, geometry...
3Sentinel5PSentinel-5PSentinel-5P Collection[maxRecords, index, page, identifier, geometry...
4CLMSCLMSCopernicus Land Monitoring Service Collection[maxRecords, index, page, identifier, geometry...
\n", - "
" - ], - "text/plain": [ - " collection short_name description \\\n", - "0 Sentinel1 Sentinel-1 Sentinel-1 Collection \n", - "1 Sentinel2 Sentinel-2 Sentinel-2 Collection \n", - "2 Sentinel3 Sentinel-3 Sentinel-3 Collection \n", - "3 Sentinel5P Sentinel-5P Sentinel-5P Collection \n", - "4 CLMS CLMS Copernicus Land Monitoring Service Collection \n", - "\n", - " parameters \n", - "0 [maxRecords, index, page, identifier, geometry... \n", - "1 [maxRecords, index, page, identifier, geometry... \n", - "2 [maxRecords, index, page, identifier, geometry... \n", - "3 [maxRecords, index, page, identifier, geometry... \n", - "4 [maxRecords, index, page, identifier, geometry... " - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_resto = pd.DataFrame([parse_resto_collection(c) for c in resto_collections])\n", - "df_resto" - ] - }, - { - "cell_type": "markdown", - "id": "54a43689-9107-4b58-b6af-2b398237030c", - "metadata": {}, - "source": [ - "The code below demonstrates how to retrieve only the **queryable parameters for a specific collection**, in this case Sentinel-2:" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "b766d5d5-e9ad-490d-9718-b36ab7301b82", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['maxRecords',\n", - " 'index',\n", - " 'page',\n", - " 'identifier',\n", - " 'geometry',\n", - " 'box',\n", - " 'lon',\n", - " 'lat',\n", - " 'radius',\n", - " 'startDate',\n", - " 'completionDate',\n", - " 'productIdentifier',\n", - " 'productType',\n", - " 'tileId',\n", - " 'processingLevel',\n", - " 'platform',\n", - " 'instrument',\n", - " 'orbitNumber',\n", - " 'sensorMode',\n", - " 'cloudCover',\n", - " 'updated',\n", - " 'publishedAfter',\n", - " 'publishedBefore',\n", - " 'sortParam',\n", - " 'sortOrder',\n", - " 'status',\n", - " 'exactCount',\n", - " 'orbitDirection',\n", - " 'relativeOrbitNumber',\n", - " 'processingBaseline',\n", - " 'missionTakeId']" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "s2_info = parse_resto_collection(\"Sentinel2\")\n", - "s2_parameters = s2_info[\"parameters\"]\n", - "s2_parameters" - ] - }, - { - "cell_type": "markdown", - "id": "ab2f1df1-3d4f-4c79-bbb9-e0e467b0d539", - "metadata": {}, - "source": [ - "The base Resto URL allows querying items from all collections. However, if we want to **retrieve products from a specific collection**, we need to include the collection name in the request URL." - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "a7c9245d-b520-49d9-97af-e022c4c9a2de", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/CLMS/search.json\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Feature000bcf77-ddcf-4fba-b559-d4caaa972e96{'type': 'Point', 'coordinates': [67.04, 40.87]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
1Feature0018595d-a646-44ed-9b44-b32b0acf2cc1{'type': 'Point', 'coordinates': [-87.0, 44.0]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
2Feature0029ff2f-67ed-4d14-bc45-7486c03af258{'type': 'Point', 'coordinates': [13.29, 58.81]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
3Feature003beb57-788a-4ed1-b4f2-440fba282b07{'type': 'Point', 'coordinates': [-62.8, 7.41]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
4Feature00684216-d9a5-4cc1-9944-e0bba63a09d5{'type': 'Point', 'coordinates': [28.0, -16.93]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature 000bcf77-ddcf-4fba-b559-d4caaa972e96 \n", - "1 Feature 0018595d-a646-44ed-9b44-b32b0acf2cc1 \n", - "2 Feature 0029ff2f-67ed-4d14-bc45-7486c03af258 \n", - "3 Feature 003beb57-788a-4ed1-b4f2-440fba282b07 \n", - "4 Feature 00684216-d9a5-4cc1-9944-e0bba63a09d5 \n", - "\n", - " geometry \\\n", - "0 {'type': 'Point', 'coordinates': [67.04, 40.87]} \n", - "1 {'type': 'Point', 'coordinates': [-87.0, 44.0]} \n", - "2 {'type': 'Point', 'coordinates': [13.29, 58.81]} \n", - "3 {'type': 'Point', 'coordinates': [-62.8, 7.41]} \n", - "4 {'type': 'Point', 'coordinates': [28.0, -16.93]} \n", - "\n", - " properties \n", - "0 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "1 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "2 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "3 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "4 {'collection': 'CLMS', 'status': 'ONLINE', 'li... " - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collection_name = \"CLMS\"\n", - "resto_url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection_name}/search.json\"\n", - "\n", - "json = requests.get(resto_url).json()\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features.head()" - ] - }, - { - "cell_type": "markdown", - "id": "a32609b1-605a-4a3c-8431-da4f7fa387fd", - "metadata": {}, - "source": [ - "In Resto, each feature contains a nested properties dictionary with detailed metadata." - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "ed313b6a-24eb-41d4-a386-9bce8290fd6b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
collectionstatusparentIdentifiertitledescriptionorganisationNamestartDatecompletionDateproductTypeprocessingLevel...license.grantedOrganizationCountrieslicense.grantedFlagslicense.viewServicelicense.signatureQuotalicense.description.shortNamecentroid.typecentroid.coordinatesservices.download.urlservices.download.mimeTypeservices.download.size
0CLMSONLINENonec_gls_WL_202509220600_1300000000138_ALTI_V2.2....Copernicus program priorities are to gain from...None1995-06-02T15:31:00.000000Z2025-09-22T06:00:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[67.04, 40.87]https://catalogue.dataspace.copernicus.eu/down...application/geo+json281916
1CLMSONLINENonec_gls_WL_202510170900_1300000000006_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-27T02:35:00.000000Z2025-10-17T09:00:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[-87.0, 44.0]https://catalogue.dataspace.copernicus.eu/down...application/geo+json688083
2CLMSONLINENonec_gls_WL_202509260506_1300000000105_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-28T22:30:00.000000Z2025-09-26T05:06:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[13.29, 58.81]https://catalogue.dataspace.copernicus.eu/down...application/geo+json373184
3CLMSONLINENonec_gls_WL_202505171602_1300000000073_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-30T00:51:00.000000Z2025-05-17T16:02:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[-62.8, 7.41]https://catalogue.dataspace.copernicus.eu/down...application/geo+json182737
4CLMSONLINENonec_gls_WL_202507122311_1300000000172_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-26T00:14:00.000000Z2025-07-12T23:11:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[28.0, -16.93]https://catalogue.dataspace.copernicus.eu/down...application/geo+json355715
\n", - "

5 rows × 37 columns

\n", - "
" - ], - "text/plain": [ - " collection status parentIdentifier \\\n", - "0 CLMS ONLINE None \n", - "1 CLMS ONLINE None \n", - "2 CLMS ONLINE None \n", - "3 CLMS ONLINE None \n", - "4 CLMS ONLINE None \n", - "\n", - " title \\\n", - "0 c_gls_WL_202509220600_1300000000138_ALTI_V2.2.... \n", - "1 c_gls_WL_202510170900_1300000000006_ALTI_V2.2.... \n", - "2 c_gls_WL_202509260506_1300000000105_ALTI_V2.2.... \n", - "3 c_gls_WL_202505171602_1300000000073_ALTI_V2.2.... \n", - "4 c_gls_WL_202507122311_1300000000172_ALTI_V2.2.... \n", - "\n", - " description organisationName \\\n", - "0 Copernicus program priorities are to gain from... None \n", - "1 Copernicus program priorities are to gain from... None \n", - "2 Copernicus program priorities are to gain from... None \n", - "3 Copernicus program priorities are to gain from... None \n", - "4 Copernicus program priorities are to gain from... None \n", - "\n", - " startDate completionDate \\\n", - "0 1995-06-02T15:31:00.000000Z 2025-09-22T06:00:00.000000Z \n", - "1 1992-09-27T02:35:00.000000Z 2025-10-17T09:00:00.000000Z \n", - "2 1992-09-28T22:30:00.000000Z 2025-09-26T05:06:00.000000Z \n", - "3 1992-09-30T00:51:00.000000Z 2025-05-17T16:02:00.000000Z \n", - "4 1992-09-26T00:14:00.000000Z 2025-07-12T23:11:00.000000Z \n", - "\n", - " productType processingLevel ... \\\n", - "0 river_and_lake_water_level None ... \n", - "1 river_and_lake_water_level None ... \n", - "2 river_and_lake_water_level None ... \n", - "3 river_and_lake_water_level None ... \n", - "4 river_and_lake_water_level None ... \n", - "\n", - " license.grantedOrganizationCountries license.grantedFlags \\\n", - "0 None None \n", - "1 None None \n", - "2 None None \n", - "3 None None \n", - "4 None None \n", - "\n", - " license.viewService license.signatureQuota license.description.shortName \\\n", - "0 public -1 No license \n", - "1 public -1 No license \n", - "2 public -1 No license \n", - "3 public -1 No license \n", - "4 public -1 No license \n", - "\n", - " centroid.type centroid.coordinates \\\n", - "0 Point [67.04, 40.87] \n", - "1 Point [-87.0, 44.0] \n", - "2 Point [13.29, 58.81] \n", - "3 Point [-62.8, 7.41] \n", - "4 Point [28.0, -16.93] \n", - "\n", - " services.download.url \\\n", - "0 https://catalogue.dataspace.copernicus.eu/down... \n", - "1 https://catalogue.dataspace.copernicus.eu/down... \n", - "2 https://catalogue.dataspace.copernicus.eu/down... \n", - "3 https://catalogue.dataspace.copernicus.eu/down... \n", - "4 https://catalogue.dataspace.copernicus.eu/down... \n", - "\n", - " services.download.mimeType services.download.size \n", - "0 application/geo+json 281916 \n", - "1 application/geo+json 688083 \n", - "2 application/geo+json 373184 \n", - "3 application/geo+json 182737 \n", - "4 application/geo+json 355715 \n", - "\n", - "[5 rows x 37 columns]" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_props = pd.json_normalize(df_features[\"properties\"])\n", - "df_props.head()" - ] - }, - { - "cell_type": "markdown", - "id": "ac8bbf2c-203b-4496-85d7-1d4aba72cde7", - "metadata": {}, - "source": [ - "### **STAC**\n", - "\n", - "STAC is built around a set of interconnected JSON objects. STAC catalogue consists of four core resource types: **Catalog**, **Collection**, **Item** and **Asset**. \n", - "\n", - "Catalogs and Collections are used to define shared metadata for groups of Items, while Items represent individual products, specifying the metadata values and attributes that distinguish one product from another within the same collection. It also enables users to access detailed Asset-level metadata, including spatial information, temporal coverage, and data specifications." - ] - }, - { - "cell_type": "markdown", - "id": "3325b8f1-b25d-462a-803e-e88e7fa355c7", - "metadata": {}, - "source": [ - "#### **Collections Endpoint**\n", - "\n", - "STAC provides a dedicated endpoint that allows users to retrieve **information about all collections available within the catalogue**. This endpoint returns metadata for each collection." - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "d1770429-044c-4008-99aa-417e55c737ea", - "metadata": {}, - "outputs": [], - "source": [ - "stac_url = \"https://stac.dataspace.copernicus.eu/v1/collections\"" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "b6944db9-ffe9-4bb3-bbcb-891c8fd843d0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtypelinkstitleassetsextentlicensekeywordsproviderssummaries...auth:schemessci:citationstac_versionstac_extensionsstorage:schemesbandssci:doiceosard:typeceosard:specificationceosard:specification_version
0sentinel-3-sl-2-aod-nrtCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-3 SLSTR Aerosol Optical Depth (NRT){'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, Satellite, Global,...[{'url': 'https://sentinels.copernicus.eu/web/...{'gsd': [9500], 'platform': ['sentinel-3a', 's......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/alternate-a...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
1sentinel-1-global-mosaicsCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-1 Global Mosaics{'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, GRD, SAR, C-Band, ...[{'url': 'https://sentinels.copernicus.eu/web/...{'gsd': [20, 40], 'instruments': ['sar'], 'pro......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/authenticat...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
2sentinel-3-olci-2-wfr-nrtCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-3 OLCI Water Full Resolution (NRT){'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, Satellite, Global,...[{'url': 'https://sentinels.copernicus.eu/web/...{'gsd': [300], 'platform': ['sentinel-3a', 'se......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/eo/v2.0.0/s...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...[{'name': 'Oa01', 'description': 'Aerosol corr...NaNNaNNaNNaN
3sentinel-5p-l2-ch4-nrtiCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-5P Level 2 Methane (NRTI){'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[7000m, Atmosphere, CH4, Copernicus, EC, ESA, ...[{'url': 'https://sentinel.esa.int/web/sentine...{'gsd': [7000], 'platform': ['sentinel-5p'], '......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/alternate-a...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
4sentinel-1-slc-wvCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-1 Single Look Complex: WV{'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, SLC, SAR, C-Band, ...[{'url': 'https://sentinel.esa.int/web/sentine...{'platform': ['sentinel-1a', 'sentinel-1b', 's......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/authenticat...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
\n", - "

5 rows × 22 columns

\n", - "
" - ], - "text/plain": [ - " id type \\\n", - "0 sentinel-3-sl-2-aod-nrt Collection \n", - "1 sentinel-1-global-mosaics Collection \n", - "2 sentinel-3-olci-2-wfr-nrt Collection \n", - "3 sentinel-5p-l2-ch4-nrti Collection \n", - "4 sentinel-1-slc-wv Collection \n", - "\n", - " links \\\n", - "0 [{'rel': 'items', 'type': 'application/geo+jso... \n", - "1 [{'rel': 'items', 'type': 'application/geo+jso... \n", - "2 [{'rel': 'items', 'type': 'application/geo+jso... \n", - "3 [{'rel': 'items', 'type': 'application/geo+jso... \n", - "4 [{'rel': 'items', 'type': 'application/geo+jso... \n", - "\n", - " title \\\n", - "0 Sentinel-3 SLSTR Aerosol Optical Depth (NRT) \n", - "1 Sentinel-1 Global Mosaics \n", - "2 Sentinel-3 OLCI Water Full Resolution (NRT) \n", - "3 Sentinel-5P Level 2 Methane (NRTI) \n", - "4 Sentinel-1 Single Look Complex: WV \n", - "\n", - " assets \\\n", - "0 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", - "1 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", - "2 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", - "3 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", - "4 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", - "\n", - " extent license \\\n", - "0 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", - "1 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", - "2 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", - "3 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", - "4 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", - "\n", - " keywords \\\n", - "0 [Sentinel, Copernicus, ESA, Satellite, Global,... \n", - "1 [Sentinel, Copernicus, ESA, GRD, SAR, C-Band, ... \n", - "2 [Sentinel, Copernicus, ESA, Satellite, Global,... \n", - "3 [7000m, Atmosphere, CH4, Copernicus, EC, ESA, ... \n", - "4 [Sentinel, Copernicus, ESA, SLC, SAR, C-Band, ... \n", - "\n", - " providers \\\n", - "0 [{'url': 'https://sentinels.copernicus.eu/web/... \n", - "1 [{'url': 'https://sentinels.copernicus.eu/web/... \n", - "2 [{'url': 'https://sentinels.copernicus.eu/web/... \n", - "3 [{'url': 'https://sentinel.esa.int/web/sentine... \n", - "4 [{'url': 'https://sentinel.esa.int/web/sentine... \n", - "\n", - " summaries ... \\\n", - "0 {'gsd': [9500], 'platform': ['sentinel-3a', 's... ... \n", - "1 {'gsd': [20, 40], 'instruments': ['sar'], 'pro... ... \n", - "2 {'gsd': [300], 'platform': ['sentinel-3a', 'se... ... \n", - "3 {'gsd': [7000], 'platform': ['sentinel-5p'], '... ... \n", - "4 {'platform': ['sentinel-1a', 'sentinel-1b', 's... ... \n", - "\n", - " auth:schemes \\\n", - "0 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", - "1 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", - "2 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", - "3 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", - "4 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", - "\n", - " sci:citation stac_version \\\n", - "0 Copernicus Sentinel data [Year] 1.1.0 \n", - "1 Copernicus Sentinel data [Year] 1.1.0 \n", - "2 Copernicus Sentinel data [Year] 1.1.0 \n", - "3 Copernicus Sentinel data [Year] 1.1.0 \n", - "4 Copernicus Sentinel data [Year] 1.1.0 \n", - "\n", - " stac_extensions \\\n", - "0 [https://stac-extensions.github.io/alternate-a... \n", - "1 [https://stac-extensions.github.io/authenticat... \n", - "2 [https://stac-extensions.github.io/eo/v2.0.0/s... \n", - "3 [https://stac-extensions.github.io/alternate-a... \n", - "4 [https://stac-extensions.github.io/authenticat... \n", - "\n", - " storage:schemes \\\n", - "0 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", - "1 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", - "2 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", - "3 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", - "4 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", - "\n", - " bands sci:doi ceosard:type \\\n", - "0 NaN NaN NaN \n", - "1 NaN NaN NaN \n", - "2 [{'name': 'Oa01', 'description': 'Aerosol corr... NaN NaN \n", - "3 NaN NaN NaN \n", - "4 NaN NaN NaN \n", - "\n", - " ceosard:specification ceosard:specification_version \n", - "0 NaN NaN \n", - "1 NaN NaN \n", - "2 NaN NaN \n", - "3 NaN NaN \n", - "4 NaN NaN \n", - "\n", - "[5 rows x 22 columns]" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "pd.DataFrame(json[\"collections\"]).head()" - ] - }, - { - "cell_type": "markdown", - "id": "67fc4bcf-4649-4fa3-9e25-499fbaad9ef0", - "metadata": {}, - "source": [ - "Querying the STAC collections endpoint allows users to obtain any available information related to the properties of each collection.\n", - "\n", - "In this example, we store the following details: id, title and summaries. This approach provides a structured overview of all collections in the catalogue, making it easier to explore their attributes before performing item-level queries." - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "adcfdef4-6d82-447d-b8ff-ede3b393624d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtitlesummaries
0sentinel-3-sl-2-aod-nrtSentinel-3 SLSTR Aerosol Optical Depth (NRT){'gsd': [9500], 'platform': ['sentinel-3a', 's...
1sentinel-1-global-mosaicsSentinel-1 Global Mosaics{'gsd': [20, 40], 'instruments': ['sar'], 'pro...
2sentinel-3-olci-2-wfr-nrtSentinel-3 OLCI Water Full Resolution (NRT){'gsd': [300], 'platform': ['sentinel-3a', 'se...
3sentinel-5p-l2-ch4-nrtiSentinel-5P Level 2 Methane (NRTI){'gsd': [7000], 'platform': ['sentinel-5p'], '...
4sentinel-1-slc-wvSentinel-1 Single Look Complex: WV{'platform': ['sentinel-1a', 'sentinel-1b', 's...
\n", - "
" - ], - "text/plain": [ - " id title \\\n", - "0 sentinel-3-sl-2-aod-nrt Sentinel-3 SLSTR Aerosol Optical Depth (NRT) \n", - "1 sentinel-1-global-mosaics Sentinel-1 Global Mosaics \n", - "2 sentinel-3-olci-2-wfr-nrt Sentinel-3 OLCI Water Full Resolution (NRT) \n", - "3 sentinel-5p-l2-ch4-nrti Sentinel-5P Level 2 Methane (NRTI) \n", - "4 sentinel-1-slc-wv Sentinel-1 Single Look Complex: WV \n", - "\n", - " summaries \n", - "0 {'gsd': [9500], 'platform': ['sentinel-3a', 's... \n", - "1 {'gsd': [20, 40], 'instruments': ['sar'], 'pro... \n", - "2 {'gsd': [300], 'platform': ['sentinel-3a', 'se... \n", - "3 {'gsd': [7000], 'platform': ['sentinel-5p'], '... \n", - "4 {'platform': ['sentinel-1a', 'sentinel-1b', 's... " - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "pd.DataFrame(json[\"collections\"])[[\"id\", \"title\", \"summaries\"]].head()" - ] - }, - { - "cell_type": "markdown", - "id": "39f771ea-52c9-4ed1-bb5d-980529aeb9b6", - "metadata": {}, - "source": [ - "The code below allows us to obtain the **`id`s of all collections available in the catalogue**:" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "fc7c3d2c-0a3b-4063-a2b5-5a784fd64926", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
id
0sentinel-3-sl-2-aod-nrt
1sentinel-1-global-mosaics
2sentinel-3-olci-2-wfr-nrt
3sentinel-5p-l2-ch4-nrti
4sentinel-1-slc-wv
......
135sentinel-5p-l2-o3-nrti
136sentinel-5p-l2-o3-offl
137sentinel-5p-l2-so2-offl
138sentinel-5p-l2-so2-nrti
139sentinel-5p-l2-so2-rpro
\n", - "

140 rows × 1 columns

\n", - "
" - ], - "text/plain": [ - " id\n", - "0 sentinel-3-sl-2-aod-nrt\n", - "1 sentinel-1-global-mosaics\n", - "2 sentinel-3-olci-2-wfr-nrt\n", - "3 sentinel-5p-l2-ch4-nrti\n", - "4 sentinel-1-slc-wv\n", - ".. ...\n", - "135 sentinel-5p-l2-o3-nrti\n", - "136 sentinel-5p-l2-o3-offl\n", - "137 sentinel-5p-l2-so2-offl\n", - "138 sentinel-5p-l2-so2-nrti\n", - "139 sentinel-5p-l2-so2-rpro\n", - "\n", - "[140 rows x 1 columns]" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "stac_collections = pd.DataFrame(json[\"collections\"])[[\"id\"]]\n", - "stac_collections" - ] - }, - { - "cell_type": "markdown", - "id": "5a55c5f9-2430-465f-a23e-0bf10c936c0f", - "metadata": {}, - "source": [ - "The code below retrieves **information for a specific collection**:" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "28f44451-0b49-4792-82ec-50f58fe06328", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idtypebandslinkstitleassetsextentlicensesci:doikeywords...descriptionitem_assetsauth:schemesceosard:typesci:citationstac_versionstac_extensionsstorage:schemesceosard:specificationceosard:specification_version
0sentinel-2-l2aCollection[{'gsd': 60, 'name': 'B01', 'description': 'Co...[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-2 Level-2A{'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other10.5270/S2_-znk9xsj[Copernicus, Sentinel, EU, ESA, Satellite, Glo......The Sentinel-2 Level-2A Collection 1 product p...{'AOT_10m': {'gsd': 10, 'type': 'image/jp2', '...{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...opticalCopernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/eo/v2.0.0/s...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...SR5.0.1
\n", - "

1 rows × 22 columns

\n", - "
" - ], - "text/plain": [ - " id type \\\n", - "0 sentinel-2-l2a Collection \n", - "\n", - " bands \\\n", - "0 [{'gsd': 60, 'name': 'B01', 'description': 'Co... \n", - "\n", - " links title \\\n", - "0 [{'rel': 'items', 'type': 'application/geo+jso... Sentinel-2 Level-2A \n", - "\n", - " assets \\\n", - "0 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", - "\n", - " extent license \\\n", - "0 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", - "\n", - " sci:doi keywords \\\n", - "0 10.5270/S2_-znk9xsj [Copernicus, Sentinel, EU, ESA, Satellite, Glo... \n", - "\n", - " ... description \\\n", - "0 ... The Sentinel-2 Level-2A Collection 1 product p... \n", - "\n", - " item_assets \\\n", - "0 {'AOT_10m': {'gsd': 10, 'type': 'image/jp2', '... \n", - "\n", - " auth:schemes ceosard:type \\\n", - "0 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... optical \n", - "\n", - " sci:citation stac_version \\\n", - "0 Copernicus Sentinel data [Year] 1.1.0 \n", - "\n", - " stac_extensions \\\n", - "0 [https://stac-extensions.github.io/eo/v2.0.0/s... \n", - "\n", - " storage:schemes ceosard:specification \\\n", - "0 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... SR \n", - "\n", - " ceosard:specification_version \n", - "0 5.0.1 \n", - "\n", - "[1 rows x 22 columns]" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collection_id = \"sentinel-2-l2a\"\n", - "\n", - "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}\"\n", - "\n", - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "df = pd.DataFrame([json])\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "f72df62c-dd32-42c3-92a9-07a209d132b7", - "metadata": {}, - "source": [ - "#### **Items Endpoint**\n", - "\n", - "STAC provides a dedicated endpoint that allows users to retrieve **information about items available within the collection**." - ] - }, - { - "cell_type": "markdown", - "id": "615e6156-bd20-48fa-b2f5-a53d67c73f19", - "metadata": {}, - "source": [ - "The code below retrieves items (individual products) from a specific STAC collection:" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "5b56097c-73c6-4467-9096-4c1dc45a9347", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251231T051319_N0511_R133_T31CEJ_2...[2.998598727270369, -82.62787974508461, 3.5898...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[2.998682...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:05.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2...[-2.277998803053058, -80.22883981478951, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-2.18323...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:23.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251231T051319_N0511_R133_T31CDL_2...[-2.803841979337122, -81.13320280779526, 1.437...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[0.108578...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:30:58.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251231T051319_N0511_R133_T31CDK_2...[-3.447304707739892, -82.03781529080683, 2.739...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[1.369168...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:31:31.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251231T051319_N0511_R133_T30CWS_2...[-3.001058129404774, -80.25242038514605, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-3.00103...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:46.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20251231T051319_N0511_R133_T31CEJ_2... \n", - "1 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2... \n", - "2 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDL_2... \n", - "3 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDK_2... \n", - "4 S2B_MSIL2A_20251231T051319_N0511_R133_T30CWS_2... \n", - "\n", - " bbox type \\\n", - "0 [2.998598727270369, -82.62787974508461, 3.5898... Feature \n", - "1 [-2.277998803053058, -80.22883981478951, 0.184... Feature \n", - "2 [-2.803841979337122, -81.13320280779526, 1.437... Feature \n", - "3 [-3.447304707739892, -82.03781529080683, 2.739... Feature \n", - "4 [-3.001058129404774, -80.25242038514605, 0.184... Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[2.998682... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[-2.18323... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[0.108578... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[1.369168... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[-3.00103... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-12-31T07:23:05.00... \n", - "1 {'gsd': 10, 'created': '2025-12-31T07:23:23.00... \n", - "2 {'gsd': 10, 'created': '2025-12-31T07:30:58.00... \n", - "3 {'gsd': 10, 'created': '2025-12-31T07:31:31.00... \n", - "4 {'gsd': 10, 'created': '2025-12-31T07:24:46.00... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collection_id = \"sentinel-2-l2a\"\n", - "\n", - "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}/items\"\n", - "\n", - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features.head()" - ] - }, - { - "cell_type": "markdown", - "id": "04f0ab44-df51-4020-b75b-bd4efd7c63fc", - "metadata": {}, - "source": [ - "In STAC, each item contains a nested properties dictionary with detailed metadata." - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "e554340f-2f51-47c8-986e-1f2bc43e965d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
gsdcreatedexpiresupdateddatetimeplatformgrid:codepublishedinstrumentsend_datetime...storage:schemes.cdse-s3.titlestorage:schemes.cdse-s3.platformstorage:schemes.cdse-s3.descriptionstorage:schemes.cdse-s3.requester_paysstorage:schemes.creodias-s3.typestorage:schemes.creodias-s3.titlestorage:schemes.creodias-s3.platformstorage:schemes.creodias-s3.descriptionstorage:schemes.creodias-s3.requester_paysprocessing:software.eometadatatool
0102025-12-31T07:23:05.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:25:38.002693Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CEJ2025-12-31T07:25:38.002693Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
1102025-12-31T07:23:23.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:26:10.381080Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CDM2025-12-31T07:26:10.381080Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
2102025-12-31T07:30:58.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:33:41.761622Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CDL2025-12-31T07:33:41.761622Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
3102025-12-31T07:31:31.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:34:43.634267Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CDK2025-12-31T07:34:43.634267Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
4102025-12-31T07:24:46.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:27:44.406225Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-30CWS2025-12-31T07:27:44.406225Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
\n", - "

5 rows × 58 columns

\n", - "
" - ], - "text/plain": [ - " gsd created expires \\\n", - "0 10 2025-12-31T07:23:05.000000Z 9999-01-01T00:00:00.000000Z \n", - "1 10 2025-12-31T07:23:23.000000Z 9999-01-01T00:00:00.000000Z \n", - "2 10 2025-12-31T07:30:58.000000Z 9999-01-01T00:00:00.000000Z \n", - "3 10 2025-12-31T07:31:31.000000Z 9999-01-01T00:00:00.000000Z \n", - "4 10 2025-12-31T07:24:46.000000Z 9999-01-01T00:00:00.000000Z \n", - "\n", - " updated datetime platform \\\n", - "0 2025-12-31T07:25:38.002693Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", - "1 2025-12-31T07:26:10.381080Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", - "2 2025-12-31T07:33:41.761622Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", - "3 2025-12-31T07:34:43.634267Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", - "4 2025-12-31T07:27:44.406225Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", - "\n", - " grid:code published instruments \\\n", - "0 MGRS-31CEJ 2025-12-31T07:25:38.002693Z [msi] \n", - "1 MGRS-31CDM 2025-12-31T07:26:10.381080Z [msi] \n", - "2 MGRS-31CDL 2025-12-31T07:33:41.761622Z [msi] \n", - "3 MGRS-31CDK 2025-12-31T07:34:43.634267Z [msi] \n", - "4 MGRS-30CWS 2025-12-31T07:27:44.406225Z [msi] \n", - "\n", - " end_datetime ... storage:schemes.cdse-s3.title \\\n", - "0 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", - "1 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", - "2 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", - "3 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", - "4 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", - "\n", - " storage:schemes.cdse-s3.platform \\\n", - "0 https://eodata.dataspace.copernicus.eu \n", - "1 https://eodata.dataspace.copernicus.eu \n", - "2 https://eodata.dataspace.copernicus.eu \n", - "3 https://eodata.dataspace.copernicus.eu \n", - "4 https://eodata.dataspace.copernicus.eu \n", - "\n", - " storage:schemes.cdse-s3.description \\\n", - "0 This endpoint provides access to EO data which... \n", - "1 This endpoint provides access to EO data which... \n", - "2 This endpoint provides access to EO data which... \n", - "3 This endpoint provides access to EO data which... \n", - "4 This endpoint provides access to EO data which... \n", - "\n", - " storage:schemes.cdse-s3.requester_pays storage:schemes.creodias-s3.type \\\n", - "0 False custom-s3 \n", - "1 False custom-s3 \n", - "2 False custom-s3 \n", - "3 False custom-s3 \n", - "4 False custom-s3 \n", - "\n", - " storage:schemes.creodias-s3.title storage:schemes.creodias-s3.platform \\\n", - "0 CREODIAS S3 https://eodata.cloudferro.com \n", - "1 CREODIAS S3 https://eodata.cloudferro.com \n", - "2 CREODIAS S3 https://eodata.cloudferro.com \n", - "3 CREODIAS S3 https://eodata.cloudferro.com \n", - "4 CREODIAS S3 https://eodata.cloudferro.com \n", - "\n", - " storage:schemes.creodias-s3.description \\\n", - "0 Comprehensive Earth Observation Data (EODATA) ... \n", - "1 Comprehensive Earth Observation Data (EODATA) ... \n", - "2 Comprehensive Earth Observation Data (EODATA) ... \n", - "3 Comprehensive Earth Observation Data (EODATA) ... \n", - "4 Comprehensive Earth Observation Data (EODATA) ... \n", - "\n", - " storage:schemes.creodias-s3.requester_pays \\\n", - "0 True \n", - "1 True \n", - "2 True \n", - "3 True \n", - "4 True \n", - "\n", - " processing:software.eometadatatool \n", - "0 251021130925+dirty \n", - "1 251021130925+dirty \n", - "2 251021130925+dirty \n", - "3 251021130925+dirty \n", - "4 251021130925+dirty \n", - "\n", - "[5 rows x 58 columns]" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_props = pd.json_normalize(df_features[\"properties\"])\n", - "df_props.head(5)" - ] - }, - { - "cell_type": "markdown", - "id": "4c43af2e-41d9-41a4-9044-8004370dfed7", - "metadata": {}, - "source": [ - "#### **Queryables Endpoint**\n", - "\n", - "STAC provides a special queryables endpoint that allows users to explore the catalogue or a specific collection in terms of the **metadata fields available for querying**.\n", - "\n", - "This endpoint returns information about each queryable property, including its data type, description, and constraints, which helps users construct valid and efficient queries without manually inspecting individual items.\n", - "\n", - "By using the queryables endpoint, you can quickly understand which fields can be used in filters and searches across the catalog or within a specific collection." - ] - }, - { - "cell_type": "markdown", - "id": "f9261c96-7a38-401d-8f88-10358898cdca", - "metadata": {}, - "source": [ - "To access **queryable attributes across the entire catalogue**:" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "648d1984-4270-477a-98f2-1d7ef8b6f638", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/queryables\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
$idtypetitle$schemapropertiesadditionalProperties
0https://stac.dataspace.copernicus.eu/v1/querya...objectSTAC Queryables.http://json-schema.org/draft-07/schema#{'id': {'type': 'string', 'title': 'Item ID', ...True
\n", - "
" - ], - "text/plain": [ - " $id type \\\n", - "0 https://stac.dataspace.copernicus.eu/v1/querya... object \n", - "\n", - " title $schema \\\n", - "0 STAC Queryables. http://json-schema.org/draft-07/schema# \n", - "\n", - " properties additionalProperties \n", - "0 {'id': {'type': 'string', 'title': 'Item ID', ... True " - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "stac_url = \"https://stac.dataspace.copernicus.eu/v1/queryables\"\n", - "\n", - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "df = pd.DataFrame([json])\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "4048c399-9454-4ba8-a0d0-324a770b6e2b", - "metadata": {}, - "source": [ - "To access its properties:" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "421232f7-24fe-44b7-a697-f8600cb2c72a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
0
id.typestring
id.titleItem ID
id.minLength1
id.descriptionItem identifier
datetime.typestring
datetime.titleAcquired
datetime.formatdate-time
datetime.pattern(\\+00:00|Z)$
datetime.descriptionDatetime
geometry.$refhttps://geojson.org/schema/Feature.json
geometry.titleItem Geometry
geometry.descriptionItem Geometry
platform.enum[sentinel-1a, sentinel-1b, sentinel-1c, sentin...
platform.typestring
platform.titlePlatform
platform.descriptionSatellite platform identifier
grid:code.typestring
grid:code.titleGrid Code
grid:code.pattern^[A-Z0-9]+-[-_.A-Za-z0-9]+$
grid:code.descriptionGrid Code
published.typestring
published.titlePublished
published.formatdate-time
published.pattern(\\+00:00|Z)$
published.descriptionDatetime
product:type.enum[EW_GRDH_1S, EW_GRDM_1S, IW_GRDH_1S, S1_GRDH_1...
product:type.typestring
product:type.titleProduct Type
product:type.descriptionProduct Type
eo:snow_cover.typenumber
eo:snow_cover.titleSnow Cover
eo:snow_cover.maximum100
eo:snow_cover.minimum0
eo:snow_cover.descriptionSnow cover in percent
eo:cloud_cover.typenumber
eo:cloud_cover.titleCloud Cover
eo:cloud_cover.maximum100
eo:cloud_cover.minimum0
eo:cloud_cover.descriptionCloud cover in percent
sat:orbit_state.enum[ascending, descending, geostationary]
sat:orbit_state.typestring
sat:orbit_state.titleOrbit State
sat:orbit_state.descriptionThe state of the orbit: ascending or descendin...
sar:polarizations.enum[HH, HV, VH, VV]
sar:polarizations.typestring
sar:polarizations.titleSAR polarizations
sar:polarizations.descriptionSAR polarizations
processing:version.typestring
processing:version.titleProcessing Version
processing:version.descriptionWhich software/processor version was used to g...
sat:relative_orbit.typeinteger
sat:relative_orbit.titleRelative Orbit
sat:relative_orbit.minimum1
sat:relative_orbit.descriptionSatellite relative orbit number
sar:instrument_mode.enum[EW, IW, SM]
sar:instrument_mode.typestring
sar:instrument_mode.titleInstrument mode
sar:instrument_mode.descriptionSAR instrument mode
\n", - "
" - ], - "text/plain": [ - " 0\n", - "id.type string\n", - "id.title Item ID\n", - "id.minLength 1\n", - "id.description Item identifier\n", - "datetime.type string\n", - "datetime.title Acquired\n", - "datetime.format date-time\n", - "datetime.pattern (\\+00:00|Z)$\n", - "datetime.description Datetime\n", - "geometry.$ref https://geojson.org/schema/Feature.json\n", - "geometry.title Item Geometry\n", - "geometry.description Item Geometry\n", - "platform.enum [sentinel-1a, sentinel-1b, sentinel-1c, sentin...\n", - "platform.type string\n", - "platform.title Platform\n", - "platform.description Satellite platform identifier\n", - "grid:code.type string\n", - "grid:code.title Grid Code\n", - "grid:code.pattern ^[A-Z0-9]+-[-_.A-Za-z0-9]+$\n", - "grid:code.description Grid Code\n", - "published.type string\n", - "published.title Published\n", - "published.format date-time\n", - "published.pattern (\\+00:00|Z)$\n", - "published.description Datetime\n", - "product:type.enum [EW_GRDH_1S, EW_GRDM_1S, IW_GRDH_1S, S1_GRDH_1...\n", - "product:type.type string\n", - "product:type.title Product Type\n", - "product:type.description Product Type\n", - "eo:snow_cover.type number\n", - "eo:snow_cover.title Snow Cover\n", - "eo:snow_cover.maximum 100\n", - "eo:snow_cover.minimum 0\n", - "eo:snow_cover.description Snow cover in percent\n", - "eo:cloud_cover.type number\n", - "eo:cloud_cover.title Cloud Cover\n", - "eo:cloud_cover.maximum 100\n", - "eo:cloud_cover.minimum 0\n", - "eo:cloud_cover.description Cloud cover in percent\n", - "sat:orbit_state.enum [ascending, descending, geostationary]\n", - "sat:orbit_state.type string\n", - "sat:orbit_state.title Orbit State\n", - "sat:orbit_state.description The state of the orbit: ascending or descendin...\n", - "sar:polarizations.enum [HH, HV, VH, VV]\n", - "sar:polarizations.type string\n", - "sar:polarizations.title SAR polarizations\n", - "sar:polarizations.description SAR polarizations\n", - "processing:version.type string\n", - "processing:version.title Processing Version\n", - "processing:version.description Which software/processor version was used to g...\n", - "sat:relative_orbit.type integer\n", - "sat:relative_orbit.title Relative Orbit\n", - "sat:relative_orbit.minimum 1\n", - "sat:relative_orbit.description Satellite relative orbit number\n", - "sar:instrument_mode.enum [EW, IW, SM]\n", - "sar:instrument_mode.type string\n", - "sar:instrument_mode.title Instrument mode\n", - "sar:instrument_mode.description SAR instrument mode" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_props = pd.json_normalize(df[\"properties\"])\n", - "df_props.transpose()" - ] - }, - { - "cell_type": "markdown", - "id": "2c89e8dd-4421-464f-9d17-fe90c56fc21d", - "metadata": {}, - "source": [ - "To access **queryables for a specific collection**:" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "120812a3-12ef-4c03-9746-4ca760dd953a", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/queryables\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
$idtypetitle$schemapropertiesadditionalProperties
0https://stac.dataspace.copernicus.eu/v1/collec...objectSTAC Queryables.http://json-schema.org/draft-07/schema#{'id': {'type': 'string', 'title': 'Item ID', ...True
\n", - "
" - ], - "text/plain": [ - " $id type \\\n", - "0 https://stac.dataspace.copernicus.eu/v1/collec... object \n", - "\n", - " title $schema \\\n", - "0 STAC Queryables. http://json-schema.org/draft-07/schema# \n", - "\n", - " properties additionalProperties \n", - "0 {'id': {'type': 'string', 'title': 'Item ID', ... True " - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collection_id = \"sentinel-2-l2a\"\n", - "\n", - "stac_url = (\n", - " f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}/queryables\"\n", - ")\n", - "\n", - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "df = pd.DataFrame([json])\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "2f6a3b99-fb74-40f2-b845-8a87329782f7", - "metadata": {}, - "source": [ - "To access its properties:" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "95141c91-36a2-4eb2-9d4a-eae041c85623", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
sentinel-2-l2a
id.typestring
id.titleItem ID
id.minLength1
id.descriptionItem identifier
datetime.typestring
datetime.titleAcquired
datetime.formatdate-time
datetime.pattern(\\+00:00|Z)$
datetime.descriptionDatetime
geometry.$refhttps://geojson.org/schema/Feature.json
geometry.titleItem Geometry
geometry.descriptionItem Geometry
platform.enum[sentinel-2a, sentinel-2b, sentinel-2c]
platform.typestring
platform.titlePlatform
platform.descriptionSatellite platform identifier
grid:code.typestring
grid:code.titleGrid Code
grid:code.pattern^[A-Z0-9]+-[-_.A-Za-z0-9]+$
grid:code.descriptionGrid Code
published.typestring
published.titlePublished
published.formatdate-time
published.descriptionPublication date and time of a product in the ...
eo:snow_cover.typenumber
eo:snow_cover.titleSnow Cover
eo:snow_cover.maximum100
eo:snow_cover.minimum0
eo:snow_cover.descriptionSnow cover in percent
eo:cloud_cover.typenumber
eo:cloud_cover.titleCloud Cover
eo:cloud_cover.maximum100
eo:cloud_cover.minimum0
eo:cloud_cover.descriptionCloud cover in percent
sat:orbit_state.enum[ascending, descending, geostationary]
sat:orbit_state.typestring
sat:orbit_state.titleOrbit State
sat:orbit_state.descriptionThe state of the orbit: ascending or descendin...
processing:version.typestring
processing:version.titleProcessing Version
processing:version.descriptionWhich software/processor version was used to g...
sat:relative_orbit.typeinteger
sat:relative_orbit.titleRelative Orbit
sat:relative_orbit.minimum1
sat:relative_orbit.descriptionSatellite relative orbit number
\n", - "
" - ], - "text/plain": [ - " sentinel-2-l2a\n", - "id.type string\n", - "id.title Item ID\n", - "id.minLength 1\n", - "id.description Item identifier\n", - "datetime.type string\n", - "datetime.title Acquired\n", - "datetime.format date-time\n", - "datetime.pattern (\\+00:00|Z)$\n", - "datetime.description Datetime\n", - "geometry.$ref https://geojson.org/schema/Feature.json\n", - "geometry.title Item Geometry\n", - "geometry.description Item Geometry\n", - "platform.enum [sentinel-2a, sentinel-2b, sentinel-2c]\n", - "platform.type string\n", - "platform.title Platform\n", - "platform.description Satellite platform identifier\n", - "grid:code.type string\n", - "grid:code.title Grid Code\n", - "grid:code.pattern ^[A-Z0-9]+-[-_.A-Za-z0-9]+$\n", - "grid:code.description Grid Code\n", - "published.type string\n", - "published.title Published\n", - "published.format date-time\n", - "published.description Publication date and time of a product in the ...\n", - "eo:snow_cover.type number\n", - "eo:snow_cover.title Snow Cover\n", - "eo:snow_cover.maximum 100\n", - "eo:snow_cover.minimum 0\n", - "eo:snow_cover.description Snow cover in percent\n", - "eo:cloud_cover.type number\n", - "eo:cloud_cover.title Cloud Cover\n", - "eo:cloud_cover.maximum 100\n", - "eo:cloud_cover.minimum 0\n", - "eo:cloud_cover.description Cloud cover in percent\n", - "sat:orbit_state.enum [ascending, descending, geostationary]\n", - "sat:orbit_state.type string\n", - "sat:orbit_state.title Orbit State\n", - "sat:orbit_state.description The state of the orbit: ascending or descendin...\n", - "processing:version.type string\n", - "processing:version.title Processing Version\n", - "processing:version.description Which software/processor version was used to g...\n", - "sat:relative_orbit.type integer\n", - "sat:relative_orbit.title Relative Orbit\n", - "sat:relative_orbit.minimum 1\n", - "sat:relative_orbit.description Satellite relative orbit number" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_props = pd.json_normalize(df[\"properties\"])\n", - "df_props = df_props.transpose()\n", - "df_props.columns = [f\"{collection_id}\"]\n", - "df_props" - ] - }, - { - "cell_type": "markdown", - "id": "4ff006fe-333c-4d47-920c-75efa1ded4bc", - "metadata": {}, - "source": [ - "## **Specific Items**\n", - "\n", - "This section is dedicated to retrieving and exploring **individual items** within a collection, including accessing their metadata, properties, spatial and temporal information, and associated assets." - ] - }, - { - "cell_type": "markdown", - "id": "872dafeb-16da-42a4-89e7-b53ad7e2d864", - "metadata": {}, - "source": [ - "### **Resto**\n", - "\n", - "When using the Resto interface, it is not possible to query a specific product directly by its `id`. Resto only allows searches based on collections and queryable parameters (e.g., `productType`, `cloudCover`, `processingLevel`)." - ] - }, - { - "cell_type": "markdown", - "id": "d671e7c5-f0ef-4a4b-be2e-d0403f96f2b6", - "metadata": {}, - "source": [ - "### **STAC**\n", - "\n", - "Unlike Resto, **STAC allows you to search for a specific product using its unique `id`**. You can query the collection and retrieve the full metadata of that item." - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "2a88abd4-fc8b-430c-9c26-e3a2d3e7e54d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items/S2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_20251229T111511\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
0
idS2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_2...
bbox[23.940406316632895, 53.123645037009204, 25.45...
typeFeature
links[{'rel': 'collection', 'type': 'application/js...
assets{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...
geometry{'type': 'Polygon', 'coordinates': [[[25.45795...
collectionsentinel-2-l2a
properties{'gsd': 10, 'created': '2025-12-29T12:00:34.00...
stac_extensions[https://cs-si.github.io/eopf-stac-extension/v...
stac_version1.1.0
\n", - "
" - ], - "text/plain": [ - " 0\n", - "id S2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_2...\n", - "bbox [23.940406316632895, 53.123645037009204, 25.45...\n", - "type Feature\n", - "links [{'rel': 'collection', 'type': 'application/js...\n", - "assets {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...\n", - "geometry {'type': 'Polygon', 'coordinates': [[[25.45795...\n", - "collection sentinel-2-l2a\n", - "properties {'gsd': 10, 'created': '2025-12-29T12:00:34.00...\n", - "stac_extensions [https://cs-si.github.io/eopf-stac-extension/v...\n", - "stac_version 1.1.0" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "item_id = \"S2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_20251229T111511\"\n", - "collection_id = \"sentinel-2-l2a\"\n", - "\n", - "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}/items/{item_id}\"\n", - "\n", - "json = requests.get(stac_url).json()\n", - "\n", - "print(f\"HTTPS Request: {stac_url}\")\n", - "\n", - "df = pd.DataFrame([json])\n", - "df.transpose()" - ] - }, - { - "cell_type": "markdown", - "id": "4ff1ddcd-eb2f-41b2-a13a-2bace824835c", - "metadata": {}, - "source": [ - "To access its properties:" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "8b17fff1-4b19-4ff3-b7d0-56dc71b46b54", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
0
gsd10
created2025-12-29T12:00:34.000000Z
expires9999-01-01T00:00:00.000000Z
updated2025-12-29T12:07:04.465575Z
datetime2025-12-29T09:44:21.025000Z
platformsentinel-2c
grid:codeMGRS-35ULV
published2025-12-29T12:04:27.641533Z
statistics{'water': 0.009615, 'nodata': 28.0182, 'dark_a...
instruments[msi]
auth:schemes{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...
end_datetime2025-12-29T09:44:21.025000Z
product:typeS2MSI2A
view:azimuth289.976841
constellationsentinel-2
eo:snow_cover0.0
eo:cloud_cover99.62
start_datetime2025-12-29T09:44:21.025000Z
sat:orbit_statedescending
storage:schemes{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...
eopf:datatake_idGS2C_20251229T094421_006870_N05.11
processing:levelL2
view:sun_azimuth171.251219
eopf:datastrip_idS2C_OPER_MSI_L2A_DS_2CPS_20251229T111511_S2025...
processing:version05.11
product:timelinessPT24H
sat:absolute_orbit6870
sat:relative_orbit36
view:sun_elevation12.743069
processing:datetime2025-12-29T11:15:11.000000Z
processing:facilityESA
processing:software{'eometadatatool': '251021130925+dirty'}
eopf:instrument_modeINS-NOBS
eopf:origin_datetime2025-12-29T12:00:34.000000Z
view:incidence_angle8.734348
product:timeliness_categoryNRT
sat:platform_international_designator2024-157A
\n", - "
" - ], - "text/plain": [ - " 0\n", - "gsd 10\n", - "created 2025-12-29T12:00:34.000000Z\n", - "expires 9999-01-01T00:00:00.000000Z\n", - "updated 2025-12-29T12:07:04.465575Z\n", - "datetime 2025-12-29T09:44:21.025000Z\n", - "platform sentinel-2c\n", - "grid:code MGRS-35ULV\n", - "published 2025-12-29T12:04:27.641533Z\n", - "statistics {'water': 0.009615, 'nodata': 28.0182, 'dark_a...\n", - "instruments [msi]\n", - "auth:schemes {'s3': {'type': 's3'}, 'oidc': {'type': 'openI...\n", - "end_datetime 2025-12-29T09:44:21.025000Z\n", - "product:type S2MSI2A\n", - "view:azimuth 289.976841\n", - "constellation sentinel-2\n", - "eo:snow_cover 0.0\n", - "eo:cloud_cover 99.62\n", - "start_datetime 2025-12-29T09:44:21.025000Z\n", - "sat:orbit_state descending\n", - "storage:schemes {'cdse-s3': {'type': 'custom-s3', 'title': 'Co...\n", - "eopf:datatake_id GS2C_20251229T094421_006870_N05.11\n", - "processing:level L2\n", - "view:sun_azimuth 171.251219\n", - "eopf:datastrip_id S2C_OPER_MSI_L2A_DS_2CPS_20251229T111511_S2025...\n", - "processing:version 05.11\n", - "product:timeliness PT24H\n", - "sat:absolute_orbit 6870\n", - "sat:relative_orbit 36\n", - "view:sun_elevation 12.743069\n", - "processing:datetime 2025-12-29T11:15:11.000000Z\n", - "processing:facility ESA\n", - "processing:software {'eometadatatool': '251021130925+dirty'}\n", - "eopf:instrument_mode INS-NOBS\n", - "eopf:origin_datetime 2025-12-29T12:00:34.000000Z\n", - "view:incidence_angle 8.734348\n", - "product:timeliness_category NRT\n", - "sat:platform_international_designator 2024-157A" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_features = pd.DataFrame([json[\"properties\"]])\n", - "df_features.transpose()" - ] - }, - { - "cell_type": "markdown", - "id": "cd40d159-68cf-4f6f-ab10-c70b6e10b8fd", - "metadata": {}, - "source": [ - "STAC items may contain nested metadata within the properties field. For example, statistics or other detailed attributes may be stored in sub-dictionaries. The code below demonstrates how to extract such nested information:" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "3034ccc0-3f6d-41f1-84d1-88f433efbda3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
0
water0.009615
nodata28.018200
dark_area0.003554
vegetation0.000000
thin_cirrus0.001378
cloud_shadow0.357159
unclassified0.010159
not_vegetated0.001065
high_proba_clouds91.287762
medium_proba_clouds8.329306
saturated_defective0.000000
\n", - "
" - ], - "text/plain": [ - " 0\n", - "water 0.009615\n", - "nodata 28.018200\n", - "dark_area 0.003554\n", - "vegetation 0.000000\n", - "thin_cirrus 0.001378\n", - "cloud_shadow 0.357159\n", - "unclassified 0.010159\n", - "not_vegetated 0.001065\n", - "high_proba_clouds 91.287762\n", - "medium_proba_clouds 8.329306\n", - "saturated_defective 0.000000" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_stats = pd.json_normalize(json[\"properties\"][\"statistics\"])\n", - "df_stats.transpose()" - ] - }, - { - "cell_type": "markdown", - "id": "809d70d2-e383-434e-a50b-a99eed11c8c9", - "metadata": {}, - "source": [ - "To access geometry:" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "id": "822f601c-f1e8-4b3d-bffd-09a21628fa53", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
lonlat
025.45795354.137210
124.89191553.139700
224.01091153.123645
323.94040654.109206
425.45795354.137210
\n", - "
" - ], - "text/plain": [ - " lon lat\n", - "0 25.457953 54.137210\n", - "1 24.891915 53.139700\n", - "2 24.010911 53.123645\n", - "3 23.940406 54.109206\n", - "4 25.457953 54.137210" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_geometry = pd.DataFrame(json[\"geometry\"][\"coordinates\"][0], columns=[\"lon\", \"lat\"])\n", - "df_geometry" - ] - }, - { - "cell_type": "markdown", - "id": "2c36a40e-7f16-473b-9951-15974f6d6fbd", - "metadata": {}, - "source": [ - "In STAC, each item contains **assets** that describes the actual data files associated with the product. Assets include URLs to the data, file type, roles, and other metadata." - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "21643688-9093-4a32-a222-7de9ed7dd565", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
0
AOT_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
AOT_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
AOT_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B01_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B01_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B02_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B02_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B02_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B03_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B03_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B03_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B04_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B04_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B04_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B05_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B05_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B06_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B06_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B07_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B07_60m{'gsd': 60, 'href': 's3://eodata/Sentinel-2/MS...
B08_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B09_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B11_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B11_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B12_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B12_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B8A_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B8A_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
Product{'href': 'https://download.dataspace.copernicu...
SCL_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
SCL_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
TCI_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
TCI_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
TCI_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
WVP_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
WVP_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
WVP_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
thumbnail{'href': 'https://datahub.creodias.eu/odata/v1...
safe_manifest{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
granule_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
inspire_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
product_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
datastrip_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
\n", - "
" - ], - "text/plain": [ - " 0\n", - "AOT_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "AOT_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "AOT_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B01_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B01_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B02_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B02_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B02_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B03_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B03_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B03_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B04_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B04_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B04_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B05_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B05_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B06_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B06_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B07_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B07_60m {'gsd': 60, 'href': 's3://eodata/Sentinel-2/MS...\n", - "B08_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B09_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B11_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B11_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B12_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B12_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B8A_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "B8A_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "Product {'href': 'https://download.dataspace.copernicu...\n", - "SCL_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "SCL_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "TCI_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "TCI_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "TCI_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "WVP_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "WVP_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "WVP_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "thumbnail {'href': 'https://datahub.creodias.eu/odata/v1...\n", - "safe_manifest {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "granule_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "inspire_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "product_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", - "datastrip_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/..." - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_assets = pd.DataFrame([json[\"assets\"]])\n", - "df_assets.transpose()" - ] - }, - { - "cell_type": "markdown", - "id": "c990722c-57d3-441a-9d26-7e3c0ceb88f5", - "metadata": {}, - "source": [ - "## **Filters & Extensions**" - ] - }, - { - "cell_type": "markdown", - "id": "03c80a48-7c4a-4693-9b3d-66a554ea2466", - "metadata": {}, - "source": [ - "### **Resto**\n", - "\n", - "Resto does not provide an advanced filtering syntax. Queries are constructed by combining URL parameters.\n", - "\n", - "**Filtering** can be done by attributes, spatial extent, or datetime, and you can include **sorting** options or **limits** on the number of items returned (default is 20). Single values use `param=value`, ranges use `param=[minvalue,maxvalue]`, and multiple parameters are joined with `&`.\n", - "\n", - "Because very general queries may return a large number of results, it is recommended to restrict queries geographically or temporally to avoid exceeding the maximum of 200,000 items. For long date ranges, splitting queries by year or smaller intervals helps maintain performance. **Sorting** is controlled using `sortParam` (e.g., `startDate`, `completionDate`, `published`, `updated`) and `sortOrder` (`ascending` or `descending`).\n", - "\n", - "Some parameters are satellite-specific, such as `cloudCover` (for optical satellites) or `polarisation` (for radar satellites), while others like `instrument` or `productType` depend on the satellite or service. Note that certain features, such as `cloudCover`, may be missing or ambiguous in some products, so filtering by them requires caution.\n", - "\n", - "For full details on all parameters and usage, see the [OpenSearch Catalogue API documentation](https://documentation.dataspace.copernicus.eu/APIs/OpenSearch.html)." - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "30511ef4-e2db-487c-a897-235448dc03a5", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/CLMS/search.json?productType=soil_water_index\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Feature1a63419d-3369-4655-89ad-c372852728f1{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
1Featurec1caf30e-8348-43b6-b693-d2a5b4b213a9{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
2Feature23f992f3-f12e-4eda-9634-4d56950aeb14{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
3Featured1bfa68f-1fc9-434a-952e-5e3ff96f6d34{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
4Featurefe327b4a-2af9-4fc0-9645-df42020e6924{'type': 'Polygon', 'coordinates': [[[-49.9790...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature 1a63419d-3369-4655-89ad-c372852728f1 \n", - "1 Feature c1caf30e-8348-43b6-b693-d2a5b4b213a9 \n", - "2 Feature 23f992f3-f12e-4eda-9634-4d56950aeb14 \n", - "3 Feature d1bfa68f-1fc9-434a-952e-5e3ff96f6d34 \n", - "4 Feature fe327b4a-2af9-4fc0-9645-df42020e6924 \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", - "1 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", - "2 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", - "3 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", - "4 {'type': 'Polygon', 'coordinates': [[[-49.9790... \n", - "\n", - " properties \n", - "0 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "1 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "2 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "3 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", - "4 {'collection': 'CLMS', 'status': 'ONLINE', 'li... " - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collection_name = \"CLMS\"\n", - "product_type = \"soil_water_index\"\n", - "\n", - "resto_url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection_name}/search.json?productType={product_type}\"\n", - "\n", - "json = requests.get(resto_url).json()\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df = pd.DataFrame.from_dict(json[\"features\"])\n", - "df.head()" - ] - }, - { - "cell_type": "markdown", - "id": "4da67fd8-adc6-4a3f-a4b7-b05dad222abf", - "metadata": {}, - "source": [ - "#### **Examples**\n", - "\n", - "Knowing this, we can create a simple function that follows this structure and focuses specifically on filtering parameters. This function can help streamline queries by automatically constructing the URL with the desired attributes, spatial or temporal constraints, and sorting options." - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "885a9eb3-f2b5-4f3e-b7aa-93c1cad21de8", - "metadata": {}, - "outputs": [], - "source": [ - "def resto_search(collection, filters=None):\n", - " \"\"\"\n", - " Executes a query to the OpenSearch Catalogue API for a given collection.\n", - "\n", - " Args:\n", - " collection (str): The name of the collection, e.g., \"Sentinel2\".\n", - " filters (dict, optional): A dictionary of filtering parameters, for example:\n", - " {\n", - " \"cloudCover\": \"[0,10]\",\n", - " \"startDate\": \"2021-06-21T00:00:00Z\",\n", - " \"completionDate\": \"2021-09-22T23:59:59Z\",\n", - " \"lon\": 21.01,\n", - " \"lat\": 52.22\n", - " }\n", - " These parameters are translated into URL query parameters.\n", - "\n", - " Returns:\n", - " pd.DataFrame: A DataFrame containing all the fields returned for each feature\n", - " in the collection, including `type`, `id`, `geometry`, and `properties`.\n", - " If no items are found, returns an empty DataFrame.\n", - " \"\"\"\n", - " base_url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection}/search.json\"\n", - "\n", - " filters = filters or {}\n", - "\n", - " response = requests.get(base_url, params=filters)\n", - " json = response.json()\n", - " features = json.get(\"features\", [])\n", - "\n", - " df = pd.DataFrame.from_dict(json[\"features\"])\n", - "\n", - " return df, response.url" - ] - }, - { - "cell_type": "markdown", - "id": "d6c71530-9ded-456c-a859-1a601eb331ea", - "metadata": {}, - "source": [ - "The code below executes a query to retrieve twenty Sentinel-2 products acquired in January 2025, sorted by `startDate`:" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "255e43db-c87a-4540-8b84-6661c2ea12fe", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?startDate=2025-01-01T00%3A00%3A00Z&completionDate=2025-01-31T23%3A59%3A59Z&sortParam=startDate&maxRecords=20\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Feature049162f6-29eb-4ae2-9936-d4f4ea5cd0d4{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Feature05c036dd-d6fb-4cf8-a2a8-75d02aa965c9{'type': 'Polygon', 'coordinates': [[[158.0939...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Feature05c92b08-d07a-4f29-9199-809cf3016791{'type': 'Polygon', 'coordinates': [[[157.2826...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Feature0a319264-4bb4-4157-af83-0839dd1a3d12{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Feature0ad4ff10-1bfb-4f9f-88c5-fcf1406c35d3{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
5Feature0c442108-83f6-4c85-bc60-7e8743ce434e{'type': 'Polygon', 'coordinates': [[[156.2813...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
6Feature12db9bc3-a33d-4f51-ad55-0b0350d75549{'type': 'Polygon', 'coordinates': [[[156.2833...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
7Feature1abd0faf-5dab-4bdf-950b-9589a80e1430{'type': 'Polygon', 'coordinates': [[[157.1880...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
8Feature24e5c8a4-32ce-4011-8665-37aabccd5a11{'type': 'Polygon', 'coordinates': [[[158.0939...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
9Feature313ee18d-74ff-476e-b8cd-0eab9e5930e2{'type': 'Polygon', 'coordinates': [[[157.2826...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
10Feature4865edf9-34a0-4996-92f7-4a8b226cc16e{'type': 'Polygon', 'coordinates': [[[157.1880...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
11Feature59eb60f1-b034-429c-a82d-82a75ce079a5{'type': 'Polygon', 'coordinates': [[[158.3183...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
12Feature73a717b1-8cab-48d7-ad4e-21414068e43b{'type': 'Polygon', 'coordinates': [[[156.0589...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
13Feature7495d076-4343-4dda-9ad4-9f7275e7a800{'type': 'Polygon', 'coordinates': [[[158.2868...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
14Feature81494ebf-37c9-41e8-ba14-11be98078525{'type': 'Polygon', 'coordinates': [[[157.7636...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
15Feature8776d69e-ae4e-4e1c-a063-9f8630d3c284{'type': 'Polygon', 'coordinates': [[[156.2833...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
16Feature8e61f3b7-2f5a-4c2c-9a59-0fd05e35f74f{'type': 'Polygon', 'coordinates': [[[155.8609...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
17Featureaf3af6a9-ef33-4ba0-9276-241c52aa7292{'type': 'Polygon', 'coordinates': [[[156.0589...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
18Featureb340deb0-edf8-4ab0-bb96-829a99f178be{'type': 'Polygon', 'coordinates': [[[155.8609...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
19Featureb7ed98a9-ec31-4f41-97a3-ccca877ed1be{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature 049162f6-29eb-4ae2-9936-d4f4ea5cd0d4 \n", - "1 Feature 05c036dd-d6fb-4cf8-a2a8-75d02aa965c9 \n", - "2 Feature 05c92b08-d07a-4f29-9199-809cf3016791 \n", - "3 Feature 0a319264-4bb4-4157-af83-0839dd1a3d12 \n", - "4 Feature 0ad4ff10-1bfb-4f9f-88c5-fcf1406c35d3 \n", - "5 Feature 0c442108-83f6-4c85-bc60-7e8743ce434e \n", - "6 Feature 12db9bc3-a33d-4f51-ad55-0b0350d75549 \n", - "7 Feature 1abd0faf-5dab-4bdf-950b-9589a80e1430 \n", - "8 Feature 24e5c8a4-32ce-4011-8665-37aabccd5a11 \n", - "9 Feature 313ee18d-74ff-476e-b8cd-0eab9e5930e2 \n", - "10 Feature 4865edf9-34a0-4996-92f7-4a8b226cc16e \n", - "11 Feature 59eb60f1-b034-429c-a82d-82a75ce079a5 \n", - "12 Feature 73a717b1-8cab-48d7-ad4e-21414068e43b \n", - "13 Feature 7495d076-4343-4dda-9ad4-9f7275e7a800 \n", - "14 Feature 81494ebf-37c9-41e8-ba14-11be98078525 \n", - "15 Feature 8776d69e-ae4e-4e1c-a063-9f8630d3c284 \n", - "16 Feature 8e61f3b7-2f5a-4c2c-9a59-0fd05e35f74f \n", - "17 Feature af3af6a9-ef33-4ba0-9276-241c52aa7292 \n", - "18 Feature b340deb0-edf8-4ab0-bb96-829a99f178be \n", - "19 Feature b7ed98a9-ec31-4f41-97a3-ccca877ed1be \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", - "1 {'type': 'Polygon', 'coordinates': [[[158.0939... \n", - "2 {'type': 'Polygon', 'coordinates': [[[157.2826... \n", - "3 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", - "4 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", - "5 {'type': 'Polygon', 'coordinates': [[[156.2813... \n", - "6 {'type': 'Polygon', 'coordinates': [[[156.2833... \n", - "7 {'type': 'Polygon', 'coordinates': [[[157.1880... \n", - "8 {'type': 'Polygon', 'coordinates': [[[158.0939... \n", - "9 {'type': 'Polygon', 'coordinates': [[[157.2826... \n", - "10 {'type': 'Polygon', 'coordinates': [[[157.1880... \n", - "11 {'type': 'Polygon', 'coordinates': [[[158.3183... \n", - "12 {'type': 'Polygon', 'coordinates': [[[156.0589... \n", - "13 {'type': 'Polygon', 'coordinates': [[[158.2868... \n", - "14 {'type': 'Polygon', 'coordinates': [[[157.7636... \n", - "15 {'type': 'Polygon', 'coordinates': [[[156.2833... \n", - "16 {'type': 'Polygon', 'coordinates': [[[155.8609... \n", - "17 {'type': 'Polygon', 'coordinates': [[[156.0589... \n", - "18 {'type': 'Polygon', 'coordinates': [[[155.8609... \n", - "19 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", - "\n", - " properties \n", - "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "5 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "6 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "7 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "8 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "9 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "10 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "11 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "12 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "13 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "14 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "15 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "16 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "17 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "18 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "19 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " - ] - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "filters = {\n", - " \"startDate\": \"2025-01-01T00:00:00Z\",\n", - " \"completionDate\": \"2025-01-31T23:59:59Z\",\n", - " \"sortParam\": \"startDate\",\n", - " \"maxRecords\": \"20\",\n", - "}\n", - "\n", - "df, resto_url = resto_search(\"Sentinel2\", filters)\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "f3dcdad1-caca-428e-b67e-07a3c04814bc", - "metadata": {}, - "source": [ - "To get the next twenty items from the same query, you can add the `page=2` parameter:" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "f7421d44-f367-4925-8237-a382188276b2", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?startDate=2025-01-01T00%3A00%3A00Z&completionDate=2025-01-31T23%3A59%3A59Z&sortParam=startDate&maxRecords=20&page=2\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Featurecbff9b4a-f98d-4c6d-ae0d-bba181b35573{'type': 'Polygon', 'coordinates': [[[156.6984...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Featured0f31bf8-0e19-4b78-b7b5-dfcb0367b535{'type': 'Polygon', 'coordinates': [[[156.6984...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Featured198f91e-3e48-4ddf-bd63-725d87400af1{'type': 'Polygon', 'coordinates': [[[156.2813...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Featuree5800cc5-755f-4b71-ab39-75ba2139caa5{'type': 'Polygon', 'coordinates': [[[158.2868...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Featuref9c80d04-202f-40a0-8e8f-bb9093bfd8a7{'type': 'Polygon', 'coordinates': [[[157.7636...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
5Featurefc1324de-6cee-410e-86a1-90de1350a924{'type': 'Polygon', 'coordinates': [[[158.3183...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
6Feature03853cbf-bee1-4738-9169-7074e927c97f{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
7Feature0d99a056-d390-4297-8049-f243c9fcb555{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
8Feature1e6a45d3-fc4a-43d1-b59f-70acccc1bac7{'type': 'Polygon', 'coordinates': [[[154.6712...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
9Feature2467d219-a97c-4533-b616-cb27ad6945ef{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
10Feature28d4c142-40d1-495f-a856-76f706b112ea{'type': 'Polygon', 'coordinates': [[[154.7972...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
11Feature3e7473f3-af16-4829-949f-209bf2adbe15{'type': 'Polygon', 'coordinates': [[[154.6712...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
12Feature3f688831-bb03-41e9-af7a-dcdbae7f64e9{'type': 'Polygon', 'coordinates': [[[157.2027...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
13Feature42f20c25-0fac-42bf-9fba-5b2db370783f{'type': 'Polygon', 'coordinates': [[[154.8852...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
14Feature4af84efd-7b6f-4fee-9ca8-5d64148d1d38{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
15Feature525f03b7-7d86-487f-b3ca-b7fd838a82b3{'type': 'Polygon', 'coordinates': [[[155.6954...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
16Feature724ace31-18c3-4e52-b240-241173143c20{'type': 'Polygon', 'coordinates': [[[157.2027...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
17Feature8549fff5-18c3-4e77-83cf-2f1ba97eef3f{'type': 'Polygon', 'coordinates': [[[154.8852...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
18Featurebe61cfd9-8269-4208-ad6f-5eca64972b72{'type': 'Polygon', 'coordinates': [[[156.6802...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
19Featured86b077f-1a81-4a44-a9d4-f1d4b20be41e{'type': 'Polygon', 'coordinates': [[[156.6802...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature cbff9b4a-f98d-4c6d-ae0d-bba181b35573 \n", - "1 Feature d0f31bf8-0e19-4b78-b7b5-dfcb0367b535 \n", - "2 Feature d198f91e-3e48-4ddf-bd63-725d87400af1 \n", - "3 Feature e5800cc5-755f-4b71-ab39-75ba2139caa5 \n", - "4 Feature f9c80d04-202f-40a0-8e8f-bb9093bfd8a7 \n", - "5 Feature fc1324de-6cee-410e-86a1-90de1350a924 \n", - "6 Feature 03853cbf-bee1-4738-9169-7074e927c97f \n", - "7 Feature 0d99a056-d390-4297-8049-f243c9fcb555 \n", - "8 Feature 1e6a45d3-fc4a-43d1-b59f-70acccc1bac7 \n", - "9 Feature 2467d219-a97c-4533-b616-cb27ad6945ef \n", - "10 Feature 28d4c142-40d1-495f-a856-76f706b112ea \n", - "11 Feature 3e7473f3-af16-4829-949f-209bf2adbe15 \n", - "12 Feature 3f688831-bb03-41e9-af7a-dcdbae7f64e9 \n", - "13 Feature 42f20c25-0fac-42bf-9fba-5b2db370783f \n", - "14 Feature 4af84efd-7b6f-4fee-9ca8-5d64148d1d38 \n", - "15 Feature 525f03b7-7d86-487f-b3ca-b7fd838a82b3 \n", - "16 Feature 724ace31-18c3-4e52-b240-241173143c20 \n", - "17 Feature 8549fff5-18c3-4e77-83cf-2f1ba97eef3f \n", - "18 Feature be61cfd9-8269-4208-ad6f-5eca64972b72 \n", - "19 Feature d86b077f-1a81-4a44-a9d4-f1d4b20be41e \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[156.6984... \n", - "1 {'type': 'Polygon', 'coordinates': [[[156.6984... \n", - "2 {'type': 'Polygon', 'coordinates': [[[156.2813... \n", - "3 {'type': 'Polygon', 'coordinates': [[[158.2868... \n", - "4 {'type': 'Polygon', 'coordinates': [[[157.7636... \n", - "5 {'type': 'Polygon', 'coordinates': [[[158.3183... \n", - "6 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", - "7 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", - "8 {'type': 'Polygon', 'coordinates': [[[154.6712... \n", - "9 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", - "10 {'type': 'Polygon', 'coordinates': [[[154.7972... \n", - "11 {'type': 'Polygon', 'coordinates': [[[154.6712... \n", - "12 {'type': 'Polygon', 'coordinates': [[[157.2027... \n", - "13 {'type': 'Polygon', 'coordinates': [[[154.8852... \n", - "14 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", - "15 {'type': 'Polygon', 'coordinates': [[[155.6954... \n", - "16 {'type': 'Polygon', 'coordinates': [[[157.2027... \n", - "17 {'type': 'Polygon', 'coordinates': [[[154.8852... \n", - "18 {'type': 'Polygon', 'coordinates': [[[156.6802... \n", - "19 {'type': 'Polygon', 'coordinates': [[[156.6802... \n", - "\n", - " properties \n", - "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "5 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "6 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "7 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "8 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "9 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "10 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "11 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "12 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "13 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "14 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "15 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "16 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "17 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "18 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "19 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "filters = {\n", - " \"startDate\": \"2025-01-01T00:00:00Z\",\n", - " \"completionDate\": \"2025-01-31T23:59:59Z\",\n", - " \"sortParam\": \"startDate\",\n", - " \"maxRecords\": \"20\",\n", - " \"page\": \"2\",\n", - "}\n", - "\n", - "df, resto_url = resto_search(\"Sentinel2\", filters)\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "67d3a54f-4cc8-4909-a11a-68a4af245dd8", - "metadata": {}, - "source": [ - "The code below retrieves Sentinel-2 products with cloud cover between 0% and 10%, acquired between June 21, 2021 and September 22, 2021, and located near a specific geographic point:" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "03ab9ca2-4156-4c12-9b3c-7c6a2b0b683f", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?cloudCover=%5B0%2C10%5D&startDate=2021-06-21T00%3A00%3A00Z&completionDate=2021-09-22T23%3A59%3A59Z&lon=21.01&lat=52.22\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Feature04008903-8704-437b-a8b8-d0942d7fa19c{'type': 'Polygon', 'coordinates': [[[22.45053...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Feature545a3805-d55b-4ce0-b088-3e259072f934{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Featuref5d8f083-77f3-432a-bd8d-cc816ddd1300{'type': 'Polygon', 'coordinates': [[[22.45053...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Feature8eeb4008-c8e9-4ddc-998c-b22f259d5de6{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Feature97e26e1a-361d-4e37-b30c-5eba50506187{'type': 'Polygon', 'coordinates': [[[21.96038...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
5Featurecc1dbd1e-9b1b-4ea0-9b72-08be8bc7ab47{'type': 'Polygon', 'coordinates': [[[19.50094...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
6Featureae2a69fd-1ad2-4b20-b9e9-d36b2ec05806{'type': 'Polygon', 'coordinates': [[[21.96038...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
7Feature83d9e0ae-61f2-4a27-beca-2c428715cf12{'type': 'Polygon', 'coordinates': [[[21.96424...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
8Featuref09bd83c-7d3a-4823-8e63-b5899fa090b3{'type': 'Polygon', 'coordinates': [[[21.96360...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
9Featurea3f8f7e9-2276-54e5-b202-dcda07c35839{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
10Feature9823f638-51d5-4eb3-ac55-4f62532a2dc4{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
11Featurec9e836ee-8b7c-403b-bca2-d59074783d98{'type': 'Polygon', 'coordinates': [[[21.96014...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
12Featureed68db23-4c0f-4585-8693-6f022b5980c8{'type': 'Polygon', 'coordinates': [[[22.45478...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
13Featurea1009dac-c58d-4b9a-b0ec-1db868c2e3bd{'type': 'Polygon', 'coordinates': [[[21.96014...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
14Feature80eef4fb-9f20-4728-848c-8d678aba60c7{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
15Featurecf68685c-e9e3-439c-97fc-90025a6e4513{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
16Feature84ae8070-005b-4ffc-9af1-ad9aca5ae26b{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
17Featurefbb4d27b-d3ff-40aa-8424-06ceaee8f375{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
18Featuref130d80d-dd19-59cf-a7ff-f85495d7dd21{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
19Featureea169cc8-83bd-48b0-8247-f5769ec1ebef{'type': 'Polygon', 'coordinates': [[[22.44973...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature 04008903-8704-437b-a8b8-d0942d7fa19c \n", - "1 Feature 545a3805-d55b-4ce0-b088-3e259072f934 \n", - "2 Feature f5d8f083-77f3-432a-bd8d-cc816ddd1300 \n", - "3 Feature 8eeb4008-c8e9-4ddc-998c-b22f259d5de6 \n", - "4 Feature 97e26e1a-361d-4e37-b30c-5eba50506187 \n", - "5 Feature cc1dbd1e-9b1b-4ea0-9b72-08be8bc7ab47 \n", - "6 Feature ae2a69fd-1ad2-4b20-b9e9-d36b2ec05806 \n", - "7 Feature 83d9e0ae-61f2-4a27-beca-2c428715cf12 \n", - "8 Feature f09bd83c-7d3a-4823-8e63-b5899fa090b3 \n", - "9 Feature a3f8f7e9-2276-54e5-b202-dcda07c35839 \n", - "10 Feature 9823f638-51d5-4eb3-ac55-4f62532a2dc4 \n", - "11 Feature c9e836ee-8b7c-403b-bca2-d59074783d98 \n", - "12 Feature ed68db23-4c0f-4585-8693-6f022b5980c8 \n", - "13 Feature a1009dac-c58d-4b9a-b0ec-1db868c2e3bd \n", - "14 Feature 80eef4fb-9f20-4728-848c-8d678aba60c7 \n", - "15 Feature cf68685c-e9e3-439c-97fc-90025a6e4513 \n", - "16 Feature 84ae8070-005b-4ffc-9af1-ad9aca5ae26b \n", - "17 Feature fbb4d27b-d3ff-40aa-8424-06ceaee8f375 \n", - "18 Feature f130d80d-dd19-59cf-a7ff-f85495d7dd21 \n", - "19 Feature ea169cc8-83bd-48b0-8247-f5769ec1ebef \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[22.45053... \n", - "1 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", - "2 {'type': 'Polygon', 'coordinates': [[[22.45053... \n", - "3 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", - "4 {'type': 'Polygon', 'coordinates': [[[21.96038... \n", - "5 {'type': 'Polygon', 'coordinates': [[[19.50094... \n", - "6 {'type': 'Polygon', 'coordinates': [[[21.96038... \n", - "7 {'type': 'Polygon', 'coordinates': [[[21.96424... \n", - "8 {'type': 'Polygon', 'coordinates': [[[21.96360... \n", - "9 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", - "10 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", - "11 {'type': 'Polygon', 'coordinates': [[[21.96014... \n", - "12 {'type': 'Polygon', 'coordinates': [[[22.45478... \n", - "13 {'type': 'Polygon', 'coordinates': [[[21.96014... \n", - "14 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", - "15 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", - "16 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", - "17 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", - "18 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", - "19 {'type': 'Polygon', 'coordinates': [[[22.44973... \n", - "\n", - " properties \n", - "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "5 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "6 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "7 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "8 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "9 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "10 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "11 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "12 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "13 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "14 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "15 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "16 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "17 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "18 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "19 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "filters = {\n", - " \"cloudCover\": \"[0,10]\",\n", - " \"startDate\": \"2021-06-21T00:00:00Z\",\n", - " \"completionDate\": \"2021-09-22T23:59:59Z\",\n", - " \"lon\": 21.01,\n", - " \"lat\": 52.22,\n", - "}\n", - "\n", - "df, resto_url = resto_search(\"Sentinel2\", filters)\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "1417a59d-4d91-4694-b302-d907a5cc4ac7", - "metadata": {}, - "source": [ - "The code below retrieves up to ten Sentinel-2 products of `S2MSI2A` product type with cloud cover between 0% and 10%, acquired between June 11 and June 22, 2022, and within a geographic bounding box." - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "1d092fff-d944-4462-bd49-291f6326437a", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?productType=S2MSI2A&cloudCover=%5B0%2C10%5D&startDate=2022-06-11T00%3A00%3A00Z&completionDate=2022-06-22T23%3A59%3A59Z&maxRecords=10&box=4%2C51%2C4.5%2C52\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Feature5ecd6532-0200-497d-a7c1-776ff2738d1a{'type': 'Polygon', 'coordinates': [[[4.436812...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Feature5831e264-e17e-4af9-a1f7-d6de71a8a038{'type': 'Polygon', 'coordinates': [[[4.436848...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Featureef6df284-3d63-4821-8dc2-f86825dfde0f{'type': 'Polygon', 'coordinates': [[[4.064087...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Feature1b32f7ad-ec32-45a1-807b-9adbd510e688{'type': 'Polygon', 'coordinates': [[[5.968085...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Feature530aeeb3-b889-4596-9c09-3d2e917e9aa4{'type': 'Polygon', 'coordinates': [[[4.325619...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature 5ecd6532-0200-497d-a7c1-776ff2738d1a \n", - "1 Feature 5831e264-e17e-4af9-a1f7-d6de71a8a038 \n", - "2 Feature ef6df284-3d63-4821-8dc2-f86825dfde0f \n", - "3 Feature 1b32f7ad-ec32-45a1-807b-9adbd510e688 \n", - "4 Feature 530aeeb3-b889-4596-9c09-3d2e917e9aa4 \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[4.436812... \n", - "1 {'type': 'Polygon', 'coordinates': [[[4.436848... \n", - "2 {'type': 'Polygon', 'coordinates': [[[4.064087... \n", - "3 {'type': 'Polygon', 'coordinates': [[[5.968085... \n", - "4 {'type': 'Polygon', 'coordinates': [[[4.325619... \n", - "\n", - " properties \n", - "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", - "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "filters = {\n", - " \"productType\": \"S2MSI2A\",\n", - " \"cloudCover\": \"[0,10]\",\n", - " \"startDate\": \"2022-06-11T00:00:00Z\",\n", - " \"completionDate\": \"2022-06-22T23:59:59Z\",\n", - " \"maxRecords\": 10,\n", - " \"box\": \"4,51,4.5,52\",\n", - "}\n", - "\n", - "df, resto_url = resto_search(\"Sentinel2\", filters)\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "01b6dc8a-b50e-4cda-8e2e-8a5f3aeb6e4c", - "metadata": {}, - "source": [ - "The code below retrieves Sentinel-1 products of type `IW_GRDH_1S` with `VV&VH` polarisation:" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "9b030df2-918a-488b-9bb9-e9071b471f51", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel1/search.json?polarisationChannels=VV%26VH&productType=IW_GRDH_1S\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
typeidgeometryproperties
0Featureda70cfa7-8b3b-514a-a807-efd43a2d9652{'type': 'Polygon', 'coordinates': [[[17.75591...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
1Feature02036627-0bbd-5533-b92f-5229818a9b57{'type': 'Polygon', 'coordinates': [[[19.06133...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
2Feature9aab3f54-50d9-59f7-8194-e5f0e7539841{'type': 'Polygon', 'coordinates': [[[20.65879...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
3Featurec7bad712-83bd-5b02-bdfa-be0665ed820a{'type': 'Polygon', 'coordinates': [[[2.281085...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
4Feature84a3d05a-119e-5d2b-8297-4e23b801361b{'type': 'Polygon', 'coordinates': [[[-0.01425...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
5Featurebfd85b2c-1d8d-5768-bed5-b5581faed35c{'type': 'Polygon', 'coordinates': [[[11.97771...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
6Feature69b6f0a6-f5bc-5be0-8899-c0ecab4bccd9{'type': 'Polygon', 'coordinates': [[[-9.38965...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
7Feature6064f952-7b8f-59c1-919f-18173a6394ad{'type': 'Polygon', 'coordinates': [[[84.86653...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
8Featured40fa39b-a849-53e4-99c8-2e1839370628{'type': 'Polygon', 'coordinates': [[[46.27384...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
9Feature165d3b85-e65d-5bbe-9cab-f7bad6fee8e7{'type': 'Polygon', 'coordinates': [[[42.11571...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
10Feature409e8402-7997-556f-8784-71e657ad3604{'type': 'Polygon', 'coordinates': [[[-8.27511...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
11Feature486c8fbf-dbe4-51af-bb36-d50c1e19e6f2{'type': 'Polygon', 'coordinates': [[[20.00865...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
12Feature63b87052-4ee1-5dd7-a917-f58ac80089db{'type': 'Polygon', 'coordinates': [[[-7.18738...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
13Featuref9208ee1-1dab-5b13-a5a0-5fb6f29b4f3b{'type': 'Polygon', 'coordinates': [[[-4.20402...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
14Feature69865c3a-87ae-5392-a7cd-e3cd43690b0e{'type': 'Polygon', 'coordinates': [[[6.677761...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
15Feature0ade07fb-010a-5572-b121-0549cea086e6{'type': 'Polygon', 'coordinates': [[[22.64895...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
16Feature546770e8-aa49-523c-ade6-05cbc57b44de{'type': 'Polygon', 'coordinates': [[[20.51301...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
17Featureb6783847-c4f6-51db-bf71-4fadf26b4d43{'type': 'Polygon', 'coordinates': [[[18.18976...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
18Featuree03a43b5-7b4b-5a83-b5a8-188739344c79{'type': 'Polygon', 'coordinates': [[[-100.043...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
19Featureb0a0c958-fbd7-56a2-a64e-efe5bace332b{'type': 'Polygon', 'coordinates': [[[7.678896...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
\n", - "
" - ], - "text/plain": [ - " type id \\\n", - "0 Feature da70cfa7-8b3b-514a-a807-efd43a2d9652 \n", - "1 Feature 02036627-0bbd-5533-b92f-5229818a9b57 \n", - "2 Feature 9aab3f54-50d9-59f7-8194-e5f0e7539841 \n", - "3 Feature c7bad712-83bd-5b02-bdfa-be0665ed820a \n", - "4 Feature 84a3d05a-119e-5d2b-8297-4e23b801361b \n", - "5 Feature bfd85b2c-1d8d-5768-bed5-b5581faed35c \n", - "6 Feature 69b6f0a6-f5bc-5be0-8899-c0ecab4bccd9 \n", - "7 Feature 6064f952-7b8f-59c1-919f-18173a6394ad \n", - "8 Feature d40fa39b-a849-53e4-99c8-2e1839370628 \n", - "9 Feature 165d3b85-e65d-5bbe-9cab-f7bad6fee8e7 \n", - "10 Feature 409e8402-7997-556f-8784-71e657ad3604 \n", - "11 Feature 486c8fbf-dbe4-51af-bb36-d50c1e19e6f2 \n", - "12 Feature 63b87052-4ee1-5dd7-a917-f58ac80089db \n", - "13 Feature f9208ee1-1dab-5b13-a5a0-5fb6f29b4f3b \n", - "14 Feature 69865c3a-87ae-5392-a7cd-e3cd43690b0e \n", - "15 Feature 0ade07fb-010a-5572-b121-0549cea086e6 \n", - "16 Feature 546770e8-aa49-523c-ade6-05cbc57b44de \n", - "17 Feature b6783847-c4f6-51db-bf71-4fadf26b4d43 \n", - "18 Feature e03a43b5-7b4b-5a83-b5a8-188739344c79 \n", - "19 Feature b0a0c958-fbd7-56a2-a64e-efe5bace332b \n", - "\n", - " geometry \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[17.75591... \n", - "1 {'type': 'Polygon', 'coordinates': [[[19.06133... \n", - "2 {'type': 'Polygon', 'coordinates': [[[20.65879... \n", - "3 {'type': 'Polygon', 'coordinates': [[[2.281085... \n", - "4 {'type': 'Polygon', 'coordinates': [[[-0.01425... \n", - "5 {'type': 'Polygon', 'coordinates': [[[11.97771... \n", - "6 {'type': 'Polygon', 'coordinates': [[[-9.38965... \n", - "7 {'type': 'Polygon', 'coordinates': [[[84.86653... \n", - "8 {'type': 'Polygon', 'coordinates': [[[46.27384... \n", - "9 {'type': 'Polygon', 'coordinates': [[[42.11571... \n", - "10 {'type': 'Polygon', 'coordinates': [[[-8.27511... \n", - "11 {'type': 'Polygon', 'coordinates': [[[20.00865... \n", - "12 {'type': 'Polygon', 'coordinates': [[[-7.18738... \n", - "13 {'type': 'Polygon', 'coordinates': [[[-4.20402... \n", - "14 {'type': 'Polygon', 'coordinates': [[[6.677761... \n", - "15 {'type': 'Polygon', 'coordinates': [[[22.64895... \n", - "16 {'type': 'Polygon', 'coordinates': [[[20.51301... \n", - "17 {'type': 'Polygon', 'coordinates': [[[18.18976... \n", - "18 {'type': 'Polygon', 'coordinates': [[[-100.043... \n", - "19 {'type': 'Polygon', 'coordinates': [[[7.678896... \n", - "\n", - " properties \n", - "0 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "1 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "2 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "3 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "4 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "5 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "6 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "7 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "8 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "9 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "10 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "11 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "12 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "13 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "14 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "15 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "16 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "17 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "18 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", - "19 {'collection': 'SENTINEL-1', 'status': 'ONLINE... " - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "filters = {\"polarisationChannels\": \"VV&VH\", \"productType\": \"IW_GRDH_1S\"}\n", - "\n", - "df, resto_url = resto_search(\"Sentinel1\", filters)\n", - "\n", - "print(f\"HTTPS Request: {resto_url}\")\n", - "\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "7eeffc32-2315-40a6-856c-23d9aee3eb3d", - "metadata": {}, - "source": [ - "### **STAC**\n", - "\n", - "STAC presents a much more standardized metadata model aimed at increasing interoperability and applicability of spatio-temporal datasets. By using a common schema and well-defined object types, STAC makes it easier to discover, understand, and integrate Earth observation data across different providers and missions.\n", - "\n", - "Compared to Resto, STAC offers broader possibilities for data search and filtering. It enables more expressive queries and clearer separation between collections and items, which improves both usability and consistency of the API.\n", - "\n", - "A key concept in STAC is the use of **extensions**, which add additional functionality on top of the core specification. The STAC API specification allows flexible API extensions that enhance core capabilities without changing the base data model.\n", - "\n", - "Currently implemented extensions include:\n", - "\n", - "- `Filter`\n", - "- `Query`\n", - "- `Fields`\n", - "- `Sort`\n", - "\n", - "These extensions significantly extend the search and filtering capabilities of the STAC API while preserving a standardized and interoperable interface." - ] - }, - { - "cell_type": "markdown", - "id": "c31f6650-d796-4c8a-a2b2-b7f25ea8a459", - "metadata": {}, - "source": [ - "#### **Filter Extension**\n", - "\n", - "**Filtering** is built around the standardized CQL2 query language, which enables spatial, temporal, and attribute-based comparisons within a single request.\n", - "\n", - "Filtering can be applied to the Item Search endpoint (`/search`) and supports both simple and more complex conditions. Logical operators such as `AND`, `OR`, and `NOT` can be combined with comparison operators (`=`, `<>`, `<`, `<=`, `>`, `>=`) and null checks. These operators can be used with string, numeric, boolean, date, and datetime values. Basic spatial relationships, such as intersection, are also supported.\n", - "\n", - "Queries can be executed using both GET and POST requests. For GET requests, filters are typically expressed using a text-based CQL2 syntax, while POST requests allow filters to be provided in a structured JSON form. This flexibility makes it possible to construct advanced and readable queries while keeping compatibility with standard HTTP workflows.\n", - "\n", - "Detailed and up-to-date information about supported operators, parameters, and query formats is available in the [STAC Catalogue API documentation](https://documentation.dataspace.copernicus.eu/APIs/STAC.html)." - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "e2a46536-e8a9-4c64-b8b2-2e675fb7aae1", - "metadata": {}, - "outputs": [], - "source": [ - "stac_url = \"https://stac.dataspace.copernicus.eu/v1/search\"" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "7afe5266-21eb-444f-b43e-4ce0c1aa3e4e", - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover <= 10&datetime >= TIMESTAMP('2025-04-08T04:39:23Z')&S_INTERSECTS(geometry, POLYGON((43.5845 -79.5442, 43.6079 -79.4893, 43.5677 -79.4632, 43.6129 -79.3925, 43.6223 -79.3238, 43.6576 -79.3163, 43.7945 -79.1178, 43.8144 -79.1542, 43.8555 -79.1714, 43.7509 -79.6390, 43.5845 -79.5442)))\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251228T233129_N0511_R101_T38CMS_2...[39.72200119694694, -80.25203205661444, 45.516...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[40.19847...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-29T02:20:59.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251228T233129_N0511_R101_T37CEM_2...[38.99894187059522, -80.25242038514605, 44.788...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[38.99903...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-29T02:21:40.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251228T000139_N0511_R087_T38CMT_2...[40.1593625828737, -79.35014408984915, 44.5605...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[40.29181...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-28T01:34:35.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251228T000139_N0511_R087_T38CMS_2...[39.72200119694694, -80.25203205661444, 45.516...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[43.28200...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-28T01:42:28.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251228T000139_N0511_R087_T37CEM_2...[38.99894187059522, -80.25242038514605, 44.788...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[43.04873...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-28T01:41:49.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20251228T233129_N0511_R101_T38CMS_2... \n", - "1 S2B_MSIL2A_20251228T233129_N0511_R101_T37CEM_2... \n", - "2 S2B_MSIL2A_20251228T000139_N0511_R087_T38CMT_2... \n", - "3 S2B_MSIL2A_20251228T000139_N0511_R087_T38CMS_2... \n", - "4 S2B_MSIL2A_20251228T000139_N0511_R087_T37CEM_2... \n", - "\n", - " bbox type \\\n", - "0 [39.72200119694694, -80.25203205661444, 45.516... Feature \n", - "1 [38.99894187059522, -80.25242038514605, 44.788... Feature \n", - "2 [40.1593625828737, -79.35014408984915, 44.5605... Feature \n", - "3 [39.72200119694694, -80.25203205661444, 45.516... Feature \n", - "4 [38.99894187059522, -80.25242038514605, 44.788... Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[40.19847... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[38.99903... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[40.29181... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[43.28200... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[43.04873... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-12-29T02:20:59.00... \n", - "1 {'gsd': 10, 'created': '2025-12-29T02:21:40.00... \n", - "2 {'gsd': 10, 'created': '2025-12-28T01:34:35.00... \n", - "3 {'gsd': 10, 'created': '2025-12-28T01:42:28.00... \n", - "4 {'gsd': 10, 'created': '2025-12-28T01:41:49.00... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"filter\": {\n", - " \"op\": \"and\",\n", - " \"args\": [\n", - " {\"op\": \"=\", \"args\": [{\"property\": \"collection\"}, \"sentinel-2-l2a\"]},\n", - " {\"op\": \"<=\", \"args\": [{\"property\": \"eo:cloud_cover\"}, 10]},\n", - " {\n", - " \"op\": \">=\",\n", - " \"args\": [\n", - " {\"property\": \"datetime\"},\n", - " {\"timestamp\": \"2025-04-08T04:39:23Z\"},\n", - " ],\n", - " },\n", - " {\n", - " \"op\": \"s_intersects\",\n", - " \"args\": [\n", - " {\"property\": \"geometry\"},\n", - " {\n", - " \"type\": \"Polygon\",\n", - " \"coordinates\": [\n", - " [\n", - " [43.5845, -79.5442],\n", - " [43.6079, -79.4893],\n", - " [43.5677, -79.4632],\n", - " [43.6129, -79.3925],\n", - " [43.6223, -79.3238],\n", - " [43.6576, -79.3163],\n", - " [43.7945, -79.1178],\n", - " [43.8144, -79.1542],\n", - " [43.8555, -79.1714],\n", - " [43.7509, -79.6390],\n", - " [43.5845, -79.5442],\n", - " ]\n", - " ],\n", - " },\n", - " ],\n", - " },\n", - " ],\n", - " }\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover <= 10&datetime >= TIMESTAMP('2025-04-08T04:39:23Z')&S_INTERSECTS(geometry, POLYGON((43.5845 -79.5442, 43.6079 -79.4893, 43.5677 -79.4632, 43.6129 -79.3925, 43.6223 -79.3238, 43.6576 -79.3163, 43.7945 -79.1178, 43.8144 -79.1542, 43.8555 -79.1714, 43.7509 -79.6390, 43.5845 -79.5442)))\"\n", - ")\n", - "\n", - "df = pd.DataFrame.from_dict(json[\"features\"])\n", - "df.head()" - ] - }, - { - "cell_type": "markdown", - "id": "9c1c3929-e36f-4158-b17a-13757f26e280", - "metadata": {}, - "source": [ - "#### **Query Extension**\n", - "\n", - "**`Query`** parameter that enables additional filtering based on the properties of Item objects. It allows users to apply simple, property-based conditions when searching for items in the catalog.\n", - "\n", - "The following comparison operators are supported:\n", - "\n", - "- `eq` – equal to \n", - "- `neq` – not equal to \n", - "- `lt` – less than \n", - "- `lte` – less than or equal to \n", - "- `gt` – greater than \n", - "- `gte` – greater than or equal to \n", - "\n", - "These operators can be used to define constraints on numeric and comparable item properties." - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "e1191a3b-935e-4313-8145-c3cbeae8c08f", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&eo:cloud_cover%3C15\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2...[-2.277998803053058, -80.22883981478951, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-2.18323...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:23.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2...[-8.277998803053059, -80.25203205661444, -2.48...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-8.23246...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:25:36.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2...[-9.001058129404774, -80.25242038514605, -3.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-9.00104...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:16.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2...[-13.59074209711865, -80.24048353817358, -9.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-13.5907...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:35.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2...[70.35704429215036, -48.83293960900481, 71.460...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[70.36265...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:18:51.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2... \n", - "1 S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2... \n", - "2 S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2... \n", - "3 S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2... \n", - "4 S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2... \n", - "\n", - " bbox type \\\n", - "0 [-2.277998803053058, -80.22883981478951, 0.184... Feature \n", - "1 [-8.277998803053059, -80.25203205661444, -2.48... Feature \n", - "2 [-9.001058129404774, -80.25242038514605, -3.21... Feature \n", - "3 [-13.59074209711865, -80.24048353817358, -9.21... Feature \n", - "4 [70.35704429215036, -48.83293960900481, 71.460... Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[-2.18323... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[-8.23246... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[-9.00104... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[-13.5907... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[70.36265... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-12-31T07:23:23.00... \n", - "1 {'gsd': 10, 'created': '2025-12-31T07:25:36.00... \n", - "2 {'gsd': 10, 'created': '2025-12-31T07:24:16.00... \n", - "3 {'gsd': 10, 'created': '2025-12-31T07:24:35.00... \n", - "4 {'gsd': 10, 'created': '2025-12-31T07:18:51.00... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\"collections\": [\"sentinel-2-l2a\"], \"query\": {\"eo:cloud_cover\": {\"lt\": 15}}}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&eo:cloud_cover%3C15\"\n", - ")\n", - "\n", - "df = pd.DataFrame.from_dict(json[\"features\"])\n", - "df.head()" - ] - }, - { - "cell_type": "markdown", - "id": "ed128efe-5741-4487-8639-ca53c7b39de4", - "metadata": {}, - "source": [ - "#### **Fields Extension**\n", - "\n", - "This extension allows users to control which attributes are **included** or **excluded** in search responses. This makes it possible to optimize query performance by **limiting the amount of returned data**, which is especially useful when working with large or complex Item objects.\n", - "\n", - "Through the **`fields`** parameter users can explicitly define which fields should be returned or omitted from the response.\n", - "\n", - "For GET requests, fields can be excluded by prefixing their names with a hyphen. For example, using `-geometry` removes the geometry object from the response. This provides a simple way to reduce response size while keeping only the information relevant to a given workflow." - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "bf7b13d5-7f95-406f-a9bb-dddad0ebc8a8", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=-geometry\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetscollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2...[-2.277998803053058, -80.22883981478951, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:23.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2...[-8.277998803053059, -80.25203205661444, -2.48...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:25:36.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2...[-9.001058129404774, -80.25242038514605, -3.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:16.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2...[-13.59074209711865, -80.24048353817358, -9.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:35.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2...[70.35704429215036, -48.83293960900481, 71.460...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:18:51.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2... \n", - "1 S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2... \n", - "2 S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2... \n", - "3 S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2... \n", - "4 S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2... \n", - "\n", - " bbox type \\\n", - "0 [-2.277998803053058, -80.22883981478951, 0.184... Feature \n", - "1 [-8.277998803053059, -80.25203205661444, -2.48... Feature \n", - "2 [-9.001058129404774, -80.25242038514605, -3.21... Feature \n", - "3 [-13.59074209711865, -80.24048353817358, -9.21... Feature \n", - "4 [70.35704429215036, -48.83293960900481, 71.460... Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets collection \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-12-31T07:23:23.00... \n", - "1 {'gsd': 10, 'created': '2025-12-31T07:25:36.00... \n", - "2 {'gsd': 10, 'created': '2025-12-31T07:24:16.00... \n", - "3 {'gsd': 10, 'created': '2025-12-31T07:24:35.00... \n", - "4 {'gsd': 10, 'created': '2025-12-31T07:18:51.00... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-2-l2a\"],\n", - " \"filter\": {\"op\": \"lt\", \"args\": [{\"property\": \"eo:cloud_cover\"}, 15]},\n", - " \"fields\": {\"exclude\": [\"geometry\"]},\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=-geometry\"\n", - ")\n", - "\n", - "df = pd.DataFrame.from_dict(json[\"features\"])\n", - "df.head()" - ] - }, - { - "cell_type": "markdown", - "id": "52cdafb6-5799-4b39-9826-9d58f06bbaa7", - "metadata": {}, - "source": [ - "In the following example, the request is further restricted to return only the `assets` of each item." - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "9dcc3f33-f848-47ac-ba59-eb671db10c82", - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=assets\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
assetslinks
0{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
1{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
2{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
3{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
4{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
5{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
6{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
7{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
8{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
9{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
\n", - "
" - ], - "text/plain": [ - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "8 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "9 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " links \n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "5 [{'rel': 'collection', 'type': 'application/js... \n", - "6 [{'rel': 'collection', 'type': 'application/js... \n", - "7 [{'rel': 'collection', 'type': 'application/js... \n", - "8 [{'rel': 'collection', 'type': 'application/js... \n", - "9 [{'rel': 'collection', 'type': 'application/js... " - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-2-l2a\"],\n", - " \"filter\": {\"op\": \"lt\", \"args\": [{\"property\": \"eo:cloud_cover\"}, 15]},\n", - " \"fields\": {\"include\": [\"assets\"]},\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=assets\"\n", - ")\n", - "\n", - "df = pd.DataFrame.from_dict(json[\"features\"])\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "205be0e0-96af-4e9b-9263-d2898ddb775a", - "metadata": {}, - "source": [ - "#### **Sort Extension**\n", - "\n", - "With this extension users are able to define **sorting** criteria for search results using the **`sortby`** parameter. Sorting can be applied to string, numeric, and datetime fields of an Item or its properties.\n", - "\n", - "Fields can be sorted in either **ascending** or **descending** order. **Multiple fields** may be specified to define a sorting priority.\n", - "\n", - "In GET requests, sorting fields are provided as a comma-separated list. A prefix may be used to indicate the sort order:\n", - "- `+` denotes ascending order (default)\n", - "- `-` denotes descending order\n", - "\n", - "In POST requests, sorting criteria are expressed as an array, which provides a structured way to define the sorting behavior. Each element of the array specifies a field and the desired order \\[`asc` (or `ascending`) and `desc` (or `descending`)].\n", - "\n", - "This extension gives explicit control over result ordering, which is particularly useful when paging through large result sets or comparing items based on specific metadata fields." - ] - }, - { - "cell_type": "markdown", - "id": "1c2d34a9-28e9-4d16-927f-9b3472644cc9", - "metadata": {}, - "source": [ - "In addition to the use of the `sortby` parameter, this query also includes the **`limit`** parameter, which defines the maximum number of Items to be returned in the response. The default value is set to 12." - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "3f8283e0-a4b8-4731-9089-e40a67be8b96", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items?filter=eo:cloud_cover%3C15&datetime=2025-01-01T00:00:00Z/2025-01-15T23:59:59Z&sortby=+properties.eo:cloud_cover&limit=10\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2...[88.664444, 20.851601, 89.027861, 21.692646]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[89.01644...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-15T07:22:11.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
1S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2...[-156.43536, -74.863265, -156.220227, -74.762472]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-156.220...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-14T23:33:48.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
2S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2...[-82.910307, 18.894431, -82.404586, 19.890114]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-82.4045...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-12T21:56:54.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
3S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2...[-173.79563, -15.450678, -173.254328, -14.455833]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-173.254...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-11T23:29:04.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
4S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2...[-123.000374, 60.33627, -120.949436, 61.334442]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-120.983...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-08T23:35:08.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
5S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2...[86.99875, -82.012669, 94.069006, -81.007392]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[90.74373...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T22:39:28.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
6S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2...[156.297745, -4.122706, 156.409008, -3.61448]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.4090...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-06T02:48:01.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
7S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2...[71.754262, 33.309546, 72.956153, 34.324206]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[71.75426...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-04T09:50:28.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
8S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2...[11.086289, 30.62773, 11.392596, 31.618143]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[11.39259...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-14T13:23:07.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
9S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2...[18.227016, -13.641674, 18.47779, -12.649679]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[18.47779...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-13T12:09:51.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2... \n", - "1 S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2... \n", - "2 S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2... \n", - "3 S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2... \n", - "4 S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2... \n", - "5 S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2... \n", - "6 S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2... \n", - "7 S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2... \n", - "8 S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2... \n", - "9 S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2... \n", - "\n", - " bbox type \\\n", - "0 [88.664444, 20.851601, 89.027861, 21.692646] Feature \n", - "1 [-156.43536, -74.863265, -156.220227, -74.762472] Feature \n", - "2 [-82.910307, 18.894431, -82.404586, 19.890114] Feature \n", - "3 [-173.79563, -15.450678, -173.254328, -14.455833] Feature \n", - "4 [-123.000374, 60.33627, -120.949436, 61.334442] Feature \n", - "5 [86.99875, -82.012669, 94.069006, -81.007392] Feature \n", - "6 [156.297745, -4.122706, 156.409008, -3.61448] Feature \n", - "7 [71.754262, 33.309546, 72.956153, 34.324206] Feature \n", - "8 [11.086289, 30.62773, 11.392596, 31.618143] Feature \n", - "9 [18.227016, -13.641674, 18.47779, -12.649679] Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "5 [{'rel': 'collection', 'type': 'application/js... \n", - "6 [{'rel': 'collection', 'type': 'application/js... \n", - "7 [{'rel': 'collection', 'type': 'application/js... \n", - "8 [{'rel': 'collection', 'type': 'application/js... \n", - "9 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "8 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "9 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[89.01644... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[-156.220... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[-82.4045... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[-173.254... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[-120.983... sentinel-2-l2a \n", - "5 {'type': 'Polygon', 'coordinates': [[[90.74373... sentinel-2-l2a \n", - "6 {'type': 'Polygon', 'coordinates': [[[156.4090... sentinel-2-l2a \n", - "7 {'type': 'Polygon', 'coordinates': [[[71.75426... sentinel-2-l2a \n", - "8 {'type': 'Polygon', 'coordinates': [[[11.39259... sentinel-2-l2a \n", - "9 {'type': 'Polygon', 'coordinates': [[[18.47779... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-01-15T07:22:11.00... \n", - "1 {'gsd': 10, 'created': '2025-01-14T23:33:48.00... \n", - "2 {'gsd': 10, 'created': '2025-01-12T21:56:54.00... \n", - "3 {'gsd': 10, 'created': '2025-01-11T23:29:04.00... \n", - "4 {'gsd': 10, 'created': '2025-01-08T23:35:08.00... \n", - "5 {'gsd': 10, 'created': '2025-01-01T22:39:28.00... \n", - "6 {'gsd': 10, 'created': '2025-01-06T02:48:01.00... \n", - "7 {'gsd': 10, 'created': '2025-01-04T09:50:28.00... \n", - "8 {'gsd': 10, 'created': '2025-01-14T13:23:07.00... \n", - "9 {'gsd': 10, 'created': '2025-01-13T12:09:51.00... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "1 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "2 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "3 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "4 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "5 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "6 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "7 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "8 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "9 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 " - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-2-l2a\"],\n", - " \"query\": {\"eo:cloud_cover\": {\"gt\": 10}},\n", - " \"datetime\": \"2025-01-01T00:00:00Z/2025-01-15T23:59:59Z\",\n", - " \"sortby\": [{\"field\": \"eo:cloud_cover\", \"direction\": \"asc\"}],\n", - " \"limit\": 10,\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items?filter=eo:cloud_cover%3C15&datetime=2025-01-01T00:00:00Z/2025-01-15T23:59:59Z&sortby=+properties.eo:cloud_cover&limit=10\"\n", - ")\n", - "\n", - "df = pd.DataFrame.from_dict(json[\"features\"])\n", - "df" - ] - }, - { - "cell_type": "markdown", - "id": "41502181-7a15-41b3-9375-a76cab280a23", - "metadata": {}, - "source": [ - "To verify that the query sorts the results correctly, we can inspect the cloud cover values of the returned products." - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "60fa8c02-9f39-4c9b-b234-8e9c08c01b11", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idproperties.eo:cloud_cover
0S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2...10.01
1S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2...10.01
2S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2...10.01
3S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2...10.01
4S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2...10.01
5S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2...10.01
6S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2...10.01
7S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2...10.01
8S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2...10.02
9S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2...10.02
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2... \n", - "1 S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2... \n", - "2 S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2... \n", - "3 S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2... \n", - "4 S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2... \n", - "5 S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2... \n", - "6 S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2... \n", - "7 S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2... \n", - "8 S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2... \n", - "9 S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2... \n", - "\n", - " properties.eo:cloud_cover \n", - "0 10.01 \n", - "1 10.01 \n", - "2 10.01 \n", - "3 10.01 \n", - "4 10.01 \n", - "5 10.01 \n", - "6 10.01 \n", - "7 10.01 \n", - "8 10.02 \n", - "9 10.02 " - ] - }, - "execution_count": 39, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_cc = pd.json_normalize(json[\"features\"], sep=\".\")\n", - "df_cc[[\"id\", \"properties.eo:cloud_cover\"]]" - ] - }, - { - "cell_type": "markdown", - "id": "3dcb095c-f148-4319-8403-342ea29708dd", - "metadata": {}, - "source": [ - "#### **Resto query equivalents in STAC**\n", - "\n", - "With the concepts introduced above, we can now attempt to translate selected Resto queries into their STAC equivalents. This section demonstrates how typical filtering patterns used in the Resto can be remapped to STAC search requests, highlighting the differences in syntax while preserving the original query intent." - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "8f09219c-70d0-4cce-ba55-331ca9b679bc", - "metadata": {}, - "outputs": [], - "source": [ - "stac_url = \"https://stac.dataspace.copernicus.eu/v1/search\"" - ] - }, - { - "cell_type": "markdown", - "id": "5e2343de-a370-4411-b1ed-1f9856c38d4e", - "metadata": {}, - "source": [ - "This code queries the Sentinel-2 L2A collection for items from January 1 to January 31, 2025, using the collection name, datetime range, a limit of 20 results, and sorting by datetime in ascending order." - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "82854c1c-c0cb-4ac7-aac8-dbbc0941d7fe", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2025-01-01T00:00:00Z/2025-01-31T23:59:59Z&limit=20&sortby=+datetime\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20250101T000439_N0511_R073_T57NVH_2...[158.093982, 6.243793, 158.745574, 7.155754]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.0939...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:44:17.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
1S2B_MSIL2A_20250101T000439_N0511_R073_T57NVG_2...[158.095521, 5.339213, 158.599385, 6.33265]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.2868...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:30:22.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
2S2B_MSIL2A_20250101T000439_N0511_R073_T57NVF_2...[158.096981, 5.31548, 158.396634, 5.427753]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.3183...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:23:15.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
3S2B_MSIL2A_20250101T000439_N0511_R073_T57NUJ_2...[157.188064, 7.145259, 158.12463, 7.360241]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.1880...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:27:52.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
4S2B_MSIL2A_20250101T000439_N0511_R073_T57NUH_2...[157.188619, 6.241466, 158.184617, 7.235884]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.7636...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:47:52.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
5S2B_MSIL2A_20250101T000439_N0511_R073_T57NUG_2...[157.191994, 5.367592, 158.185873, 6.332402]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.1858...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:33:24.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
6S2B_MSIL2A_20250101T000439_N0511_R073_T57NUF_2...[157.949753, 5.367593, 158.185869, 5.427677]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.1858...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:24:35.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
7S2B_MSIL2A_20250101T000439_N0511_R073_T57NTJ_2...[156.281374, 7.140815, 157.277502, 7.532774]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.2813...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:28:04.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
8S2B_MSIL2A_20250101T000439_N0511_R073_T57NTH_2...[156.283325, 6.237589, 157.280668, 7.234569]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.2833...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:36:42.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
9S2B_MSIL2A_20250101T000439_N0511_R073_T57NTG_2...[156.288384, 5.591788, 157.282626, 6.330194]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.2826...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:44:40.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
10S2B_MSIL2A_20250101T000439_N0511_R073_T56NRP_2...[156.058923, 7.133902, 156.711379, 7.556189]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.0589...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:27:53.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
11S2B_MSIL2A_20250101T000439_N0511_R073_T56NRN_2...[155.860957, 6.231558, 156.70932, 7.227175]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[155.8609...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:31:26.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
12S2B_MSIL2A_20250101T000439_N0511_R073_T56NRM_2...[155.784722, 5.718646, 156.702422, 6.32492]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.6984...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:34:52.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
13S2B_MSIL2A_20250101T000619_N0511_R073_T57NUA_2...[157.202748, 0.157188, 157.360626, 0.798383]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.2027...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:22:58.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
14S2B_MSIL2A_20250101T000619_N0511_R073_T57NTB_2...[156.304301, 0.81552, 157.139021, 1.025204]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.1290...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:23:51.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
15S2B_MSIL2A_20250101T000619_N0511_R073_T57NTA_2...[156.304464, 0.157188, 157.290683, 0.904207]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.1290...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:28:27.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
16S2B_MSIL2A_20250101T000619_N0511_R073_T56NRG_2...[155.695115, 0.814734, 156.680581, 1.15563]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[155.6954...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:24:32.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
17S2B_MSIL2A_20250101T000619_N0511_R073_T56NRF_2...[155.695053, 0.303835, 156.680494, 0.903904]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.6802...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:25:56.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
18S2B_MSIL2A_20250101T000619_N0511_R073_T56NQG_2...[154.796875, 0.81546, 155.783269, 1.325109]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[154.7972...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:33:19.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
19S2B_MSIL2A_20250101T000619_N0511_R073_T56NQF_2...[154.796872, 0.515161, 155.782977, 0.904464]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[155.7828...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:30:31.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20250101T000439_N0511_R073_T57NVH_2... \n", - "1 S2B_MSIL2A_20250101T000439_N0511_R073_T57NVG_2... \n", - "2 S2B_MSIL2A_20250101T000439_N0511_R073_T57NVF_2... \n", - "3 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUJ_2... \n", - "4 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUH_2... \n", - "5 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUG_2... \n", - "6 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUF_2... \n", - "7 S2B_MSIL2A_20250101T000439_N0511_R073_T57NTJ_2... \n", - "8 S2B_MSIL2A_20250101T000439_N0511_R073_T57NTH_2... \n", - "9 S2B_MSIL2A_20250101T000439_N0511_R073_T57NTG_2... \n", - "10 S2B_MSIL2A_20250101T000439_N0511_R073_T56NRP_2... \n", - "11 S2B_MSIL2A_20250101T000439_N0511_R073_T56NRN_2... \n", - "12 S2B_MSIL2A_20250101T000439_N0511_R073_T56NRM_2... \n", - "13 S2B_MSIL2A_20250101T000619_N0511_R073_T57NUA_2... \n", - "14 S2B_MSIL2A_20250101T000619_N0511_R073_T57NTB_2... \n", - "15 S2B_MSIL2A_20250101T000619_N0511_R073_T57NTA_2... \n", - "16 S2B_MSIL2A_20250101T000619_N0511_R073_T56NRG_2... \n", - "17 S2B_MSIL2A_20250101T000619_N0511_R073_T56NRF_2... \n", - "18 S2B_MSIL2A_20250101T000619_N0511_R073_T56NQG_2... \n", - "19 S2B_MSIL2A_20250101T000619_N0511_R073_T56NQF_2... \n", - "\n", - " bbox type \\\n", - "0 [158.093982, 6.243793, 158.745574, 7.155754] Feature \n", - "1 [158.095521, 5.339213, 158.599385, 6.33265] Feature \n", - "2 [158.096981, 5.31548, 158.396634, 5.427753] Feature \n", - "3 [157.188064, 7.145259, 158.12463, 7.360241] Feature \n", - "4 [157.188619, 6.241466, 158.184617, 7.235884] Feature \n", - "5 [157.191994, 5.367592, 158.185873, 6.332402] Feature \n", - "6 [157.949753, 5.367593, 158.185869, 5.427677] Feature \n", - "7 [156.281374, 7.140815, 157.277502, 7.532774] Feature \n", - "8 [156.283325, 6.237589, 157.280668, 7.234569] Feature \n", - "9 [156.288384, 5.591788, 157.282626, 6.330194] Feature \n", - "10 [156.058923, 7.133902, 156.711379, 7.556189] Feature \n", - "11 [155.860957, 6.231558, 156.70932, 7.227175] Feature \n", - "12 [155.784722, 5.718646, 156.702422, 6.32492] Feature \n", - "13 [157.202748, 0.157188, 157.360626, 0.798383] Feature \n", - "14 [156.304301, 0.81552, 157.139021, 1.025204] Feature \n", - "15 [156.304464, 0.157188, 157.290683, 0.904207] Feature \n", - "16 [155.695115, 0.814734, 156.680581, 1.15563] Feature \n", - "17 [155.695053, 0.303835, 156.680494, 0.903904] Feature \n", - "18 [154.796875, 0.81546, 155.783269, 1.325109] Feature \n", - "19 [154.796872, 0.515161, 155.782977, 0.904464] Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "5 [{'rel': 'collection', 'type': 'application/js... \n", - "6 [{'rel': 'collection', 'type': 'application/js... \n", - "7 [{'rel': 'collection', 'type': 'application/js... \n", - "8 [{'rel': 'collection', 'type': 'application/js... \n", - "9 [{'rel': 'collection', 'type': 'application/js... \n", - "10 [{'rel': 'collection', 'type': 'application/js... \n", - "11 [{'rel': 'collection', 'type': 'application/js... \n", - "12 [{'rel': 'collection', 'type': 'application/js... \n", - "13 [{'rel': 'collection', 'type': 'application/js... \n", - "14 [{'rel': 'collection', 'type': 'application/js... \n", - "15 [{'rel': 'collection', 'type': 'application/js... \n", - "16 [{'rel': 'collection', 'type': 'application/js... \n", - "17 [{'rel': 'collection', 'type': 'application/js... \n", - "18 [{'rel': 'collection', 'type': 'application/js... \n", - "19 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "8 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "9 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "10 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "11 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "12 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "13 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "14 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "15 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "16 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "17 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "18 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "19 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[158.0939... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[158.2868... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[158.3183... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[157.1880... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[157.7636... sentinel-2-l2a \n", - "5 {'type': 'Polygon', 'coordinates': [[[158.1858... sentinel-2-l2a \n", - "6 {'type': 'Polygon', 'coordinates': [[[158.1858... sentinel-2-l2a \n", - "7 {'type': 'Polygon', 'coordinates': [[[156.2813... sentinel-2-l2a \n", - "8 {'type': 'Polygon', 'coordinates': [[[156.2833... sentinel-2-l2a \n", - "9 {'type': 'Polygon', 'coordinates': [[[157.2826... sentinel-2-l2a \n", - "10 {'type': 'Polygon', 'coordinates': [[[156.0589... sentinel-2-l2a \n", - "11 {'type': 'Polygon', 'coordinates': [[[155.8609... sentinel-2-l2a \n", - "12 {'type': 'Polygon', 'coordinates': [[[156.6984... sentinel-2-l2a \n", - "13 {'type': 'Polygon', 'coordinates': [[[157.2027... sentinel-2-l2a \n", - "14 {'type': 'Polygon', 'coordinates': [[[157.1290... sentinel-2-l2a \n", - "15 {'type': 'Polygon', 'coordinates': [[[157.1290... sentinel-2-l2a \n", - "16 {'type': 'Polygon', 'coordinates': [[[155.6954... sentinel-2-l2a \n", - "17 {'type': 'Polygon', 'coordinates': [[[156.6802... sentinel-2-l2a \n", - "18 {'type': 'Polygon', 'coordinates': [[[154.7972... sentinel-2-l2a \n", - "19 {'type': 'Polygon', 'coordinates': [[[155.7828... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-01-01T01:44:17.00... \n", - "1 {'gsd': 10, 'created': '2025-01-01T01:30:22.00... \n", - "2 {'gsd': 10, 'created': '2025-01-01T01:23:15.00... \n", - "3 {'gsd': 10, 'created': '2025-01-01T01:27:52.00... \n", - "4 {'gsd': 10, 'created': '2025-01-01T01:47:52.00... \n", - "5 {'gsd': 10, 'created': '2025-01-01T01:33:24.00... \n", - "6 {'gsd': 10, 'created': '2025-01-01T01:24:35.00... \n", - "7 {'gsd': 10, 'created': '2025-01-01T01:28:04.00... \n", - "8 {'gsd': 10, 'created': '2025-01-01T01:36:42.00... \n", - "9 {'gsd': 10, 'created': '2025-01-01T01:44:40.00... \n", - "10 {'gsd': 10, 'created': '2025-01-01T01:27:53.00... \n", - "11 {'gsd': 10, 'created': '2025-01-01T01:31:26.00... \n", - "12 {'gsd': 10, 'created': '2025-01-01T01:34:52.00... \n", - "13 {'gsd': 10, 'created': '2025-01-01T01:22:58.00... \n", - "14 {'gsd': 10, 'created': '2025-01-01T01:23:51.00... \n", - "15 {'gsd': 10, 'created': '2025-01-01T01:28:27.00... \n", - "16 {'gsd': 10, 'created': '2025-01-01T01:24:32.00... \n", - "17 {'gsd': 10, 'created': '2025-01-01T01:25:56.00... \n", - "18 {'gsd': 10, 'created': '2025-01-01T01:33:19.00... \n", - "19 {'gsd': 10, 'created': '2025-01-01T01:30:31.00... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "1 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "2 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "3 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "4 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "5 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "6 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "7 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "8 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "9 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "10 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "11 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "12 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "13 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "14 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "15 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "16 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "17 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "18 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "19 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 " - ] - }, - "execution_count": 41, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-2-l2a\"],\n", - " \"datetime\": \"2025-01-01T00:00:00Z/2025-01-31T23:59:59Z\",\n", - " \"limit\": 20,\n", - " \"sortby\": [{\"field\": \"datetime\", \"direction\": \"asc\"}],\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2025-01-01T00:00:00Z/2025-01-31T23:59:59Z&limit=20&sortby=+datetime\"\n", - ")\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features" - ] - }, - { - "cell_type": "markdown", - "id": "c48b03fb-ad4d-4fb7-a721-5e5b8968af31", - "metadata": {}, - "source": [ - "This code queries the Sentinel-2 L2A collection for items between June 21 and September 22, 2021, that intersect the point at coordinates [21.01, 52.22] and have a cloud cover between 0% and 10%." - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "7cb7a76b-f10c-4a26-b1dd-1f24fbffe3f8", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2021-06-21T00%3A00%3A00Z%2F2021-09-22T23%3A59%3A59Z&intersects=%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B21.01%2C52.22%5D%7D&filter=eo%3Acloud_cover%20%3C%3D%2010\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20210909T095029_N0500_R079_T34UEC_2...[20.999706, 51.360232, 21.963602, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.96360...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-13T01:48:59.09...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
1S2B_MSIL2A_20210909T095029_N0500_R079_T34UDC_2...[19.531529, 51.354432, 21.143291, 52.350386]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[19.53152...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-13T01:53:31.43...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
2S2A_MSIL2A_20210904T095031_N0500_R079_T34UEC_2...[20.999706, 51.360262, 21.960142, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.96014...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-12T16:22:37.90...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
3S2B_MSIL2A_20210807T094029_N0500_R036_T34UEC_2...[20.999706, 51.352634, 22.611384, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[20.99970...sentinel-2-l2a{'gsd': 10, 'created': '2023-02-14T13:47:12.87...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
4S2B_MSIL2A_20210711T095029_N0500_R079_T34UEC_2...[20.999706, 51.360286, 21.955875, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.95587...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-15T08:23:16.75...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
5S2B_MSIL2A_20210708T094029_N0500_R036_T34UEC_2...[20.999706, 51.352634, 22.611384, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[20.99970...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-16T17:59:14.58...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
6S2B_MSIL2A_20210621T095029_N0500_R079_T34UEC_2...[20.999706, 51.360262, 21.960388, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.96038...sentinel-2-l2a{'gsd': 10, 'created': '2023-06-10T22:54:38.64...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
7S2B_MSIL2A_20210621T095029_N0500_R079_T34UDC_2...[19.531529, 51.354432, 21.143291, 52.350386]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[19.53152...sentinel-2-l2a{'gsd': 10, 'created': '2023-06-10T22:58:56.96...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2B_MSIL2A_20210909T095029_N0500_R079_T34UEC_2... \n", - "1 S2B_MSIL2A_20210909T095029_N0500_R079_T34UDC_2... \n", - "2 S2A_MSIL2A_20210904T095031_N0500_R079_T34UEC_2... \n", - "3 S2B_MSIL2A_20210807T094029_N0500_R036_T34UEC_2... \n", - "4 S2B_MSIL2A_20210711T095029_N0500_R079_T34UEC_2... \n", - "5 S2B_MSIL2A_20210708T094029_N0500_R036_T34UEC_2... \n", - "6 S2B_MSIL2A_20210621T095029_N0500_R079_T34UEC_2... \n", - "7 S2B_MSIL2A_20210621T095029_N0500_R079_T34UDC_2... \n", - "\n", - " bbox type \\\n", - "0 [20.999706, 51.360232, 21.963602, 52.350473] Feature \n", - "1 [19.531529, 51.354432, 21.143291, 52.350386] Feature \n", - "2 [20.999706, 51.360262, 21.960142, 52.350473] Feature \n", - "3 [20.999706, 51.352634, 22.611384, 52.350473] Feature \n", - "4 [20.999706, 51.360286, 21.955875, 52.350473] Feature \n", - "5 [20.999706, 51.352634, 22.611384, 52.350473] Feature \n", - "6 [20.999706, 51.360262, 21.960388, 52.350473] Feature \n", - "7 [19.531529, 51.354432, 21.143291, 52.350386] Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "5 [{'rel': 'collection', 'type': 'application/js... \n", - "6 [{'rel': 'collection', 'type': 'application/js... \n", - "7 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[21.96360... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[19.53152... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[21.96014... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[20.99970... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[21.95587... sentinel-2-l2a \n", - "5 {'type': 'Polygon', 'coordinates': [[[20.99970... sentinel-2-l2a \n", - "6 {'type': 'Polygon', 'coordinates': [[[21.96038... sentinel-2-l2a \n", - "7 {'type': 'Polygon', 'coordinates': [[[19.53152... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2023-03-13T01:48:59.09... \n", - "1 {'gsd': 10, 'created': '2023-03-13T01:53:31.43... \n", - "2 {'gsd': 10, 'created': '2023-03-12T16:22:37.90... \n", - "3 {'gsd': 10, 'created': '2023-02-14T13:47:12.87... \n", - "4 {'gsd': 10, 'created': '2023-03-15T08:23:16.75... \n", - "5 {'gsd': 10, 'created': '2023-03-16T17:59:14.58... \n", - "6 {'gsd': 10, 'created': '2023-06-10T22:54:38.64... \n", - "7 {'gsd': 10, 'created': '2023-06-10T22:58:56.96... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "1 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "2 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "3 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "4 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "5 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "6 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", - "7 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 " - ] - }, - "execution_count": 42, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-2-l2a\"],\n", - " \"datetime\": \"2021-06-21T00:00:00Z/2021-09-22T23:59:59Z\",\n", - " \"intersects\": {\"type\": \"Point\", \"coordinates\": [21.01, 52.22]},\n", - " \"query\": {\"eo:cloud_cover\": {\"gte\": 0, \"lte\": 10}},\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2021-06-21T00%3A00%3A00Z%2F2021-09-22T23%3A59%3A59Z&intersects=%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B21.01%2C52.22%5D%7D&filter=eo%3Acloud_cover%20%3C%3D%2010\"\n", - ")\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features" - ] - }, - { - "cell_type": "markdown", - "id": "1493c22f-309a-40b0-9a3f-99636c1e1e48", - "metadata": {}, - "source": [ - "This code queries the Sentinel-2 L2A collection for items between June 11 and June 22, 2022, within the bounding box [4, 51, 4.5, 52], with cloud cover between 0% and 10%, limiting the results to 10 items." - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "3fdb653d-a36e-4c2a-9647-9d93efce3d58", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2022-06-11T00%3A00%3A00Z%2F2022-06-22T23%3A59%3A59Z&bbox=4,51,4.5,52&filter=eo%3Acloud_cover%20%3E%3D%200%20AND%20eo%3Acloud_cover%20%3C%3D%2010&limit=10\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2A_MSIL2A_20220622T105631_N0510_R094_T31UET_2...[2.999706370881351, 51.357799703919795, 4.3256...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.325619...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-15T08:31:15.80...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2A_MSIL2A_20220616T103631_N0510_R008_T31UFT_2...[4.436120625123461, 51.32452335478603, 6.07775...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.436848...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T19:06:43.50...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20220614T104629_N0510_R051_T31UFS_2...[4.408715109637645, 50.42809119252208, 6.01702...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[5.968085...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T14:34:10.93...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20220611T103629_N0510_R008_T31UFS_2...[4.408715109637645, 50.42629366061962, 6.01702...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.436812...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T08:11:38.91...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20220611T103629_N0510_R008_T31UES_2...[4.064087128317525, 50.453523278919015, 4.5795...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.064087...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T08:11:38.75...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S2A_MSIL2A_20220622T105631_N0510_R094_T31UET_2... \n", - "1 S2A_MSIL2A_20220616T103631_N0510_R008_T31UFT_2... \n", - "2 S2B_MSIL2A_20220614T104629_N0510_R051_T31UFS_2... \n", - "3 S2B_MSIL2A_20220611T103629_N0510_R008_T31UFS_2... \n", - "4 S2B_MSIL2A_20220611T103629_N0510_R008_T31UES_2... \n", - "\n", - " bbox type \\\n", - "0 [2.999706370881351, 51.357799703919795, 4.3256... Feature \n", - "1 [4.436120625123461, 51.32452335478603, 6.07775... Feature \n", - "2 [4.408715109637645, 50.42809119252208, 6.01702... Feature \n", - "3 [4.408715109637645, 50.42629366061962, 6.01702... Feature \n", - "4 [4.064087128317525, 50.453523278919015, 4.5795... Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[4.325619... sentinel-2-l2a \n", - "1 {'type': 'Polygon', 'coordinates': [[[4.436848... sentinel-2-l2a \n", - "2 {'type': 'Polygon', 'coordinates': [[[5.968085... sentinel-2-l2a \n", - "3 {'type': 'Polygon', 'coordinates': [[[4.436812... sentinel-2-l2a \n", - "4 {'type': 'Polygon', 'coordinates': [[[4.064087... sentinel-2-l2a \n", - "\n", - " properties \\\n", - "0 {'gsd': 10, 'created': '2025-02-15T08:31:15.80... \n", - "1 {'gsd': 10, 'created': '2025-02-14T19:06:43.50... \n", - "2 {'gsd': 10, 'created': '2025-02-14T14:34:10.93... \n", - "3 {'gsd': 10, 'created': '2025-02-14T08:11:38.91... \n", - "4 {'gsd': 10, 'created': '2025-02-14T08:11:38.75... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 43, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-2-l2a\"],\n", - " \"datetime\": \"2022-06-11T00:00:00Z/2022-06-22T23:59:59Z\",\n", - " \"bbox\": [4, 51, 4.5, 52],\n", - " \"limit\": 10,\n", - " \"query\": {\"eo:cloud_cover\": {\"gte\": 0, \"lte\": 10}},\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "print(\n", - " f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2022-06-11T00%3A00%3A00Z%2F2022-06-22T23%3A59%3A59Z&bbox=4,51,4.5,52&filter=eo%3Acloud_cover%20%3E%3D%200%20AND%20eo%3Acloud_cover%20%3C%3D%2010&limit=10\"\n", - ")\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features" - ] - }, - { - "cell_type": "markdown", - "id": "9596d2c8-f13c-4fa1-bc50-0ffec6ccbf7c", - "metadata": {}, - "source": [ - "This code uses the query parameter to search the Sentinel-1 GRD collection for items where the product type is `IW_GRDH_1S` and the polarization is `VV&VH`, returning up to 10 results." - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "id": "ff59624f-0511-46f8-ae7b-af71c6efe1f8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613...[-4.961516, 29.132935, -2.043568, 30.6371]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.28483...sentinel-1-grd{'created': '2025-12-31T06:01:17.880940Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612...[-4.750492, 30.215359, -1.708874, 32.141827]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.04354...sentinel-1-grd{'created': '2025-12-31T06:01:18.350244Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612...[-4.460252, 31.722683, -1.369323, 33.646049]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.70885...sentinel-1-grd{'created': '2025-12-31T06:12:00.285895Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612...[-4.168624, 33.229343, -1.009401, 35.147907]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.3693,...sentinel-1-grd{'created': '2025-12-31T06:12:01.441023Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611...[-3.860411, 34.733044, -0.639349, 36.648712]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.00938...sentinel-1-grd{'created': '2025-12-31T06:11:58.380623Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
5S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611...[-3.545959, 36.235367, -0.277303, 38.150902]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.63932...sentinel-1-grd{'created': '2025-12-31T06:11:58.937265Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
6S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610...[-3.243545, 37.739258, 0.093031, 39.652462]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.27728...sentinel-1-grd{'created': '2025-12-31T06:11:47.595395Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
7S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610...[-2.937376, 39.242229, 0.463011, 41.154549]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.093054...sentinel-1-grd{'created': '2025-12-31T06:11:48.024200Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
8S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610...[-2.63635, 40.745724, 0.852503, 42.654728]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.463035...sentinel-1-grd{'created': '2025-12-31T06:12:00.578034Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
9S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609...[-2.321066, 42.246735, 1.270123, 44.15239]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.852526...sentinel-1-grd{'created': '2025-12-31T06:11:59.740213Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613... \n", - "1 S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612... \n", - "2 S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612... \n", - "3 S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612... \n", - "4 S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611... \n", - "5 S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611... \n", - "6 S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610... \n", - "7 S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610... \n", - "8 S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610... \n", - "9 S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609... \n", - "\n", - " bbox type \\\n", - "0 [-4.961516, 29.132935, -2.043568, 30.6371] Feature \n", - "1 [-4.750492, 30.215359, -1.708874, 32.141827] Feature \n", - "2 [-4.460252, 31.722683, -1.369323, 33.646049] Feature \n", - "3 [-4.168624, 33.229343, -1.009401, 35.147907] Feature \n", - "4 [-3.860411, 34.733044, -0.639349, 36.648712] Feature \n", - "5 [-3.545959, 36.235367, -0.277303, 38.150902] Feature \n", - "6 [-3.243545, 37.739258, 0.093031, 39.652462] Feature \n", - "7 [-2.937376, 39.242229, 0.463011, 41.154549] Feature \n", - "8 [-2.63635, 40.745724, 0.852503, 42.654728] Feature \n", - "9 [-2.321066, 42.246735, 1.270123, 44.15239] Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "5 [{'rel': 'collection', 'type': 'application/js... \n", - "6 [{'rel': 'collection', 'type': 'application/js... \n", - "7 [{'rel': 'collection', 'type': 'application/js... \n", - "8 [{'rel': 'collection', 'type': 'application/js... \n", - "9 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "1 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "2 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "3 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "4 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "5 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "6 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "7 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "8 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "9 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[-2.28483... sentinel-1-grd \n", - "1 {'type': 'Polygon', 'coordinates': [[[-2.04354... sentinel-1-grd \n", - "2 {'type': 'Polygon', 'coordinates': [[[-1.70885... sentinel-1-grd \n", - "3 {'type': 'Polygon', 'coordinates': [[[-1.3693,... sentinel-1-grd \n", - "4 {'type': 'Polygon', 'coordinates': [[[-1.00938... sentinel-1-grd \n", - "5 {'type': 'Polygon', 'coordinates': [[[-0.63932... sentinel-1-grd \n", - "6 {'type': 'Polygon', 'coordinates': [[[-0.27728... sentinel-1-grd \n", - "7 {'type': 'Polygon', 'coordinates': [[[0.093054... sentinel-1-grd \n", - "8 {'type': 'Polygon', 'coordinates': [[[0.463035... sentinel-1-grd \n", - "9 {'type': 'Polygon', 'coordinates': [[[0.852526... sentinel-1-grd \n", - "\n", - " properties \\\n", - "0 {'created': '2025-12-31T06:01:17.880940Z', 'ex... \n", - "1 {'created': '2025-12-31T06:01:18.350244Z', 'ex... \n", - "2 {'created': '2025-12-31T06:12:00.285895Z', 'ex... \n", - "3 {'created': '2025-12-31T06:12:01.441023Z', 'ex... \n", - "4 {'created': '2025-12-31T06:11:58.380623Z', 'ex... \n", - "5 {'created': '2025-12-31T06:11:58.937265Z', 'ex... \n", - "6 {'created': '2025-12-31T06:11:47.595395Z', 'ex... \n", - "7 {'created': '2025-12-31T06:11:48.024200Z', 'ex... \n", - "8 {'created': '2025-12-31T06:12:00.578034Z', 'ex... \n", - "9 {'created': '2025-12-31T06:11:59.740213Z', 'ex... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "5 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "6 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "7 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "8 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "9 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"collections\": [\"sentinel-1-grd\"],\n", - " \"query\": {\n", - " \"product:type\": {\"eq\": \"IW_GRDH_1S\"},\n", - " \"sar:polarizations\": {\"eq\": [\"VV\", \"VH\"]},\n", - " },\n", - " \"limit\": 10,\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features" - ] - }, - { - "cell_type": "markdown", - "id": "e104a7e9-621c-4a6c-b83d-05beb58d45e4", - "metadata": {}, - "source": [ - "This code uses the filter parameter to search the Sentinel-1 GRD collection for items where the product type is `IW_GRDH_1S` and the polarization is `VV&VH`, returning up to 10 results." - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "91607e63-9b91-4c92-bd3e-f8551c699da3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613...[-4.961516, 29.132935, -2.043568, 30.6371]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.28483...sentinel-1-grd{'created': '2025-12-31T06:01:17.880940Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612...[-4.750492, 30.215359, -1.708874, 32.141827]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.04354...sentinel-1-grd{'created': '2025-12-31T06:01:18.350244Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612...[-4.460252, 31.722683, -1.369323, 33.646049]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.70885...sentinel-1-grd{'created': '2025-12-31T06:12:00.285895Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612...[-4.168624, 33.229343, -1.009401, 35.147907]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.3693,...sentinel-1-grd{'created': '2025-12-31T06:12:01.441023Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611...[-3.860411, 34.733044, -0.639349, 36.648712]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.00938...sentinel-1-grd{'created': '2025-12-31T06:11:58.380623Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
5S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611...[-3.545959, 36.235367, -0.277303, 38.150902]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.63932...sentinel-1-grd{'created': '2025-12-31T06:11:58.937265Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
6S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610...[-3.243545, 37.739258, 0.093031, 39.652462]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.27728...sentinel-1-grd{'created': '2025-12-31T06:11:47.595395Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
7S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610...[-2.937376, 39.242229, 0.463011, 41.154549]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.093054...sentinel-1-grd{'created': '2025-12-31T06:11:48.024200Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
8S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610...[-2.63635, 40.745724, 0.852503, 42.654728]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.463035...sentinel-1-grd{'created': '2025-12-31T06:12:00.578034Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
9S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609...[-2.321066, 42.246735, 1.270123, 44.15239]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.852526...sentinel-1-grd{'created': '2025-12-31T06:11:59.740213Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", - "
" - ], - "text/plain": [ - " id \\\n", - "0 S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613... \n", - "1 S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612... \n", - "2 S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612... \n", - "3 S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612... \n", - "4 S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611... \n", - "5 S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611... \n", - "6 S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610... \n", - "7 S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610... \n", - "8 S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610... \n", - "9 S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609... \n", - "\n", - " bbox type \\\n", - "0 [-4.961516, 29.132935, -2.043568, 30.6371] Feature \n", - "1 [-4.750492, 30.215359, -1.708874, 32.141827] Feature \n", - "2 [-4.460252, 31.722683, -1.369323, 33.646049] Feature \n", - "3 [-4.168624, 33.229343, -1.009401, 35.147907] Feature \n", - "4 [-3.860411, 34.733044, -0.639349, 36.648712] Feature \n", - "5 [-3.545959, 36.235367, -0.277303, 38.150902] Feature \n", - "6 [-3.243545, 37.739258, 0.093031, 39.652462] Feature \n", - "7 [-2.937376, 39.242229, 0.463011, 41.154549] Feature \n", - "8 [-2.63635, 40.745724, 0.852503, 42.654728] Feature \n", - "9 [-2.321066, 42.246735, 1.270123, 44.15239] Feature \n", - "\n", - " links \\\n", - "0 [{'rel': 'collection', 'type': 'application/js... \n", - "1 [{'rel': 'collection', 'type': 'application/js... \n", - "2 [{'rel': 'collection', 'type': 'application/js... \n", - "3 [{'rel': 'collection', 'type': 'application/js... \n", - "4 [{'rel': 'collection', 'type': 'application/js... \n", - "5 [{'rel': 'collection', 'type': 'application/js... \n", - "6 [{'rel': 'collection', 'type': 'application/js... \n", - "7 [{'rel': 'collection', 'type': 'application/js... \n", - "8 [{'rel': 'collection', 'type': 'application/js... \n", - "9 [{'rel': 'collection', 'type': 'application/js... \n", - "\n", - " assets \\\n", - "0 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "1 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "2 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "3 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "4 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "5 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "6 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "7 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "8 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "9 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", - "\n", - " geometry collection \\\n", - "0 {'type': 'Polygon', 'coordinates': [[[-2.28483... sentinel-1-grd \n", - "1 {'type': 'Polygon', 'coordinates': [[[-2.04354... sentinel-1-grd \n", - "2 {'type': 'Polygon', 'coordinates': [[[-1.70885... sentinel-1-grd \n", - "3 {'type': 'Polygon', 'coordinates': [[[-1.3693,... sentinel-1-grd \n", - "4 {'type': 'Polygon', 'coordinates': [[[-1.00938... sentinel-1-grd \n", - "5 {'type': 'Polygon', 'coordinates': [[[-0.63932... sentinel-1-grd \n", - "6 {'type': 'Polygon', 'coordinates': [[[-0.27728... sentinel-1-grd \n", - "7 {'type': 'Polygon', 'coordinates': [[[0.093054... sentinel-1-grd \n", - "8 {'type': 'Polygon', 'coordinates': [[[0.463035... sentinel-1-grd \n", - "9 {'type': 'Polygon', 'coordinates': [[[0.852526... sentinel-1-grd \n", - "\n", - " properties \\\n", - "0 {'created': '2025-12-31T06:01:17.880940Z', 'ex... \n", - "1 {'created': '2025-12-31T06:01:18.350244Z', 'ex... \n", - "2 {'created': '2025-12-31T06:12:00.285895Z', 'ex... \n", - "3 {'created': '2025-12-31T06:12:01.441023Z', 'ex... \n", - "4 {'created': '2025-12-31T06:11:58.380623Z', 'ex... \n", - "5 {'created': '2025-12-31T06:11:58.937265Z', 'ex... \n", - "6 {'created': '2025-12-31T06:11:47.595395Z', 'ex... \n", - "7 {'created': '2025-12-31T06:11:48.024200Z', 'ex... \n", - "8 {'created': '2025-12-31T06:12:00.578034Z', 'ex... \n", - "9 {'created': '2025-12-31T06:11:59.740213Z', 'ex... \n", - "\n", - " stac_extensions stac_version \n", - "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "5 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "6 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "7 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "8 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", - "9 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "params = {\n", - " \"filter-lang\": \"cql2-json\",\n", - " \"filter\": {\n", - " \"op\": \"and\",\n", - " \"args\": [\n", - " {\"op\": \"=\", \"args\": [{\"property\": \"product:type\"}, \"IW_GRDH_1S\"]},\n", - " {\"op\": \"a_contains\", \"args\": [{\"property\": \"sar:polarizations\"}, \"VV\"]},\n", - " {\"op\": \"a_contains\", \"args\": [{\"property\": \"sar:polarizations\"}, \"VH\"]},\n", - " ],\n", - " },\n", - " \"collections\": [\"sentinel-1-grd\"],\n", - " \"limit\": 10,\n", - "}\n", - "\n", - "response = requests.post(stac_url, json=params)\n", - "\n", - "json = response.json()\n", - "\n", - "df_features = pd.DataFrame(json[\"features\"])\n", - "df_features" - ] - }, - { - "cell_type": "markdown", - "id": "7a9920d2-9817-43a5-b005-12cc045c3323", - "metadata": {}, - "source": [ - "# **Conclusion**\n", - "\n", - "This notebook highlights the fundamental differences between the OpenSearch (Resto) Catalogue API and the STAC Catalogue API, with a strong focus on discovery capabilities and query expressiveness. Resto provides a relatively flat and limited search interface, primarily centered around collection-level queries with a fixed set of parameters and constrained filtering logic. While sufficient for basic discovery use cases, this model restricts fine-grained access to metadata and limits the ability to precisely target individual products or their components.\n", - "\n", - "In contrast, STAC introduces a hierarchical and standardized data model that enables discovery at multiple levels, ranging from collections, through individual items, down to specific assets within an item. This multi-level access is combined with a significantly richer querying framework. Through extensions such as Query, Filter, Fields, and Sort, STAC allows users to construct complex spatial, temporal, and attribute-based queries, apply precise sorting rules, limit result sets, and control the structure and size of responses. These capabilities make it possible to efficiently narrow searches to highly specific subsets of data, optimize performance, and integrate discovery workflows more tightly with downstream processing.\n", - "\n", - "Thanks to this notebook and its step-by-step examples, understanding the STAC data model and transitioning existing workflows from OpenSearch to STAC should be straightforward and significantly easier to implement in practice.\n", - "\n", - "Overall, migrating from Resto to STAC is not merely a change of endpoint but a shift to a more powerful, extensible, and interoperable discovery paradigm. STAC enables more precise data selection, better scalability, and improved integration with modern geospatial and data processing ecosystems, making it a robust foundation for future Earth Observation data access and exploitation." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "geo", - "language": "python", - "name": "geo" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From b6ff3e4f142ef67f0ae786538f8fd854d9fb1825 Mon Sep 17 00:00:00 2001 From: jtreska Date: Tue, 20 Jan 2026 11:30:18 +0100 Subject: [PATCH 2/3] Add files via upload --- ...igration_of_opensearch_to_stac_guide.ipynb | 8238 +++++++++++++++++ 1 file changed, 8238 insertions(+) create mode 100644 geo/migration_of_opensearch_to_stac_guide.ipynb diff --git a/geo/migration_of_opensearch_to_stac_guide.ipynb b/geo/migration_of_opensearch_to_stac_guide.ipynb new file mode 100644 index 0000000..c3213a9 --- /dev/null +++ b/geo/migration_of_opensearch_to_stac_guide.ipynb @@ -0,0 +1,8238 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "39d4bfb3-2594-48b5-8b4e-cd879500c7c6", + "metadata": {}, + "source": [ + "# **Switch to STAC Catalogue API - OpenSearch Catalogue API Decommissioning**" + ] + }, + { + "cell_type": "markdown", + "id": "e354bcb1-9a35-42d6-b8ed-a767f698ff76", + "metadata": {}, + "source": [ + "## **Introduction**" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "7ade6582-c6a6-43e1-ac26-d17159d50ecf", + "metadata": {}, + "source": [ + "Due to the planned **[decommissioning of the OpenSearch Catalogue API](https://dataspace.copernicus.eu/news/2025-10-16-opensearch-catalogue-api-decommissioning-notice)** (hereafter referred to as Resto) rescheduled for **2 March 2026**, users are encouraged to prepare their services and integrations for a transition to the STAC Catalogue API. This Jupyter notebook has been created as a practical migration guide to support that process and to facilitate a smooth and informed transition." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "8e259776-6382-48e7-9558-c602c7b6de0f", + "metadata": {}, + "source": [ + "The primary goal of this notebook is to help users understand how existing Resto-based workflows can be translated into equivalent STAC API queries. It provides conceptual guidance as well as concrete examples, enabling users to gradually adapt their applications while preserving existing functionality.\n", + "\n", + "Beyond serving as a replacement for Resto interface, STAC introduces a richer and more expressive data model, along with extended capabilities. By providing a standardized schema to describe spatiotemporal assets, STAC improves data interoperability across platforms and tools. This standardization lowers the entry barrier to efficiently discover, access, and exploit satellite and remote sensing data." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "47b0d475-3d1f-482b-91e2-1e4683ff12a8", + "metadata": {}, + "source": [ + "This notebook is structured into three main sections, focusing respectively on:\n", + "\n", + "* Collections & Items,\n", + "* Specific Items,\n", + "* Filters & Extensions.\n", + " \n", + "Each section focuses on practical usage patterns and highlights the correspondence between Resto query parameters and their STAC equivalents, allowing users to incrementally migrate their discovery workflows with confidence." + ] + }, + { + "cell_type": "markdown", + "id": "b673f64a-3bbd-413b-aa18-6c0827ac00e0", + "metadata": {}, + "source": [ + "## **Libraries**\n", + "\n", + "Before we begin, we need to make sure that all the required libraries are installed and imported.\n", + "\n", + "* `pandas`: Python library used for data manipulation and analysis \n", + "* `requests`: Python library used for sending HTTP requests and interacting with APIs \n", + "* `xml.etree.ElementTree`: Python library used for parsing and navigating an XML document" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "2cbc4397-4453-4aa1-b353-e5d27b53d136", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: pandas in /opt/conda/lib/python3.11/site-packages (2.3.3)\n", + "Requirement already satisfied: numpy>=1.23.2 in /opt/conda/lib/python3.11/site-packages (from pandas) (2.4.0)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.11/site-packages (from pandas) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.11/site-packages (from pandas) (2023.3)\n", + "Requirement already satisfied: tzdata>=2022.7 in /opt/conda/lib/python3.11/site-packages (from pandas) (2025.2)\n", + "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)\n" + ] + } + ], + "source": [ + "!pip install pandas\n", + "import pandas as pd\n", + "import requests\n", + "import xml.etree.ElementTree as ET" + ] + }, + { + "cell_type": "markdown", + "id": "7d90fbf7-3016-407d-9254-5a24e101fa16", + "metadata": {}, + "source": [ + "## **Collections & Items**\n", + "\n", + "This section is dedicated to exploring **collections** - discovering which collections are available, examining the products they contain, and accessing metadata and properties associated with them. \n", + "\n", + "It also covers **items** within those collections, including how to search for them, retrieve their attributes, and understand their spatial, temporal, and product-specific information.\n", + "\n", + "We will first cover aspects related to Resto and then transition smoothly to STAC." + ] + }, + { + "cell_type": "markdown", + "id": "72a007a8-041a-411f-bf77-3128c14e0653", + "metadata": {}, + "source": [ + "### **Resto**\n", + "\n", + "Data in Resto are organized into collections, which correspond to different satellites or data sources. Queries can target either all collections or a specific collection. \n", + "\n", + "Accessing the base Resto URL provides information about products available in the catalogue, rather than details about collections themselves - it does not provide collection-level summaries or structure." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "c4bc044f-e18d-4e5c-8576-0306bf5bf746", + "metadata": {}, + "outputs": [], + "source": [ + "resto_url = \"https://catalogue.dataspace.copernicus.eu/resto/api/collections/search.json?\"" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "9c448cb6-fd79-4add-a891-06507570c80d", + "metadata": {}, + "source": [ + "Executing the query below will return metadata about the products in the catalogue. The response includes key fields for each product: type, id, geometry, properties. \n", + "\n", + "> **Hint:** The `.head()` function is used to display the first five rows of a DataFrame. This is useful for quickly inspecting the structure of your data and verifying that it has been loaded correctly." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "138b99a2-c08c-435d-a333-b370e3e54806", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/search.json?\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Feature91822f33-b15c-5b60-aa39-6d9f6f5c773b{'type': 'Polygon', 'coordinates': [[[-176.587...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
1Featurebfd8cd54-52a7-48e2-88d0-58df86167399{'type': 'Polygon', 'coordinates': [[[-145.885...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
2Featureeb59e26f-c472-4f5f-8289-49bce7b13b7e{'type': 'MultiPolygon', 'coordinates': [[[[10...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
3Feature85899f29-0854-30a0-b9a7-5f2d332e6f10{'type': 'Polygon', 'coordinates': [[[140.656,...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
4Feature2b5ae1be-1831-447d-90b0-1e4b4d34d7b2{'type': 'Polygon', 'coordinates': [[[138.511,...{'collection': 'SENTINEL-3', 'status': 'ONLINE...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature 91822f33-b15c-5b60-aa39-6d9f6f5c773b \n", + "1 Feature bfd8cd54-52a7-48e2-88d0-58df86167399 \n", + "2 Feature eb59e26f-c472-4f5f-8289-49bce7b13b7e \n", + "3 Feature 85899f29-0854-30a0-b9a7-5f2d332e6f10 \n", + "4 Feature 2b5ae1be-1831-447d-90b0-1e4b4d34d7b2 \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[-176.587... \n", + "1 {'type': 'Polygon', 'coordinates': [[[-145.885... \n", + "2 {'type': 'MultiPolygon', 'coordinates': [[[[10... \n", + "3 {'type': 'Polygon', 'coordinates': [[[140.656,... \n", + "4 {'type': 'Polygon', 'coordinates': [[[138.511,... \n", + "\n", + " properties \n", + "0 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", + "1 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", + "2 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", + "3 {'collection': 'SENTINEL-3', 'status': 'ONLINE... \n", + "4 {'collection': 'SENTINEL-3', 'status': 'ONLINE... " + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "json = requests.get(resto_url).json()\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "pd.DataFrame(json['features']).head() " + ] + }, + { + "cell_type": "markdown", + "id": "2783332c-bc01-48e9-a5e5-1381fa2ce4a8", + "metadata": {}, + "source": [ + "The list of available collections must be obtained from the documentation. For the next steps, we will create a Python list containing a few selected collections. This will allow us to perform queries and examples more efficiently." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "fc5f20c5-b0d7-42d7-97a4-8f85b085c6e1", + "metadata": {}, + "outputs": [], + "source": [ + "resto_collections = [\n", + " \"Sentinel1\",\n", + " \"Sentinel2\",\n", + " \"Sentinel3\",\n", + " \"Sentinel5P\",\n", + " \"CLMS\"\n", + "]" + ] + }, + { + "cell_type": "markdown", + "id": "7a92eff6-6694-48c2-b9bf-eded274a67c4", + "metadata": {}, + "source": [ + "For each satellite (collection), the set of queryable parameters can be obtained from the resulting XML via **describe.xml** endpoint.\n", + "\n", + "To simplify it, we will create a Python function that reads the relevant parameters for a given collection from the XML. This approach allows users to know in advance what they can query, making it easier to construct valid requests without manually inspecting the XML for every collection." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "4fdbdd26-3335-4a4c-adf9-6485827849e0", + "metadata": {}, + "outputs": [], + "source": [ + "def parse_resto_collection(collection):\n", + " \"\"\"\n", + " Fetches and parses the describe.xml metadata for a given Resto collection.\n", + "\n", + " Args:\n", + " collection (str): The name of the collection (e.g., \"Sentinel2\").\n", + "\n", + " Returns:\n", + " dict: A dictionary containing:\n", + " - 'collection': the collection name\n", + " - 'short_name': the short name of the collection\n", + " - 'description': the collection description\n", + " - 'parameters': a list of queryable parameter names available for this collection\n", + "\n", + " \"\"\"\n", + " url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection}/describe.xml\"\n", + " response = requests.get(url)\n", + " root = ET.fromstring(response.content)\n", + "\n", + " ns = {\n", + " \"os\": \"http://a9.com/-/spec/opensearch/1.1/\",\n", + " \"param\": \"http://a9.com/-/spec/opensearch/extensions/parameters/1.0/\"\n", + " }\n", + "\n", + " return {\n", + " \"collection\": collection,\n", + " \"short_name\": root.findtext(\"os:ShortName\", namespaces=ns),\n", + " \"description\": root.findtext(\"os:Description\", namespaces=ns),\n", + " \"parameters\": [\n", + " p.attrib.get(\"name\")\n", + " for p in root.findall(\".//param:Parameter\", ns)\n", + " ],\n", + " }" + ] + }, + { + "cell_type": "markdown", + "id": "14918dba-59ee-4796-99cc-a89dcf847f9b", + "metadata": {}, + "source": [ + "The code below executes the `parse_resto_collection` function for every collection in the `resto_collections` list." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "ee2bcf43-20f1-42d2-b560-3c0b10dc1ef0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
collectionshort_namedescriptionparameters
0Sentinel1Sentinel-1Sentinel-1 Collection[maxRecords, index, page, identifier, geometry...
1Sentinel2Sentinel-2Sentinel-2 Collection[maxRecords, index, page, identifier, geometry...
2Sentinel3Sentinel-3Sentinel-3 Collection[maxRecords, index, page, identifier, geometry...
3Sentinel5PSentinel-5PSentinel-5P Collection[maxRecords, index, page, identifier, geometry...
4CLMSCLMSCopernicus Land Monitoring Service Collection[maxRecords, index, page, identifier, geometry...
\n", + "
" + ], + "text/plain": [ + " collection short_name description \\\n", + "0 Sentinel1 Sentinel-1 Sentinel-1 Collection \n", + "1 Sentinel2 Sentinel-2 Sentinel-2 Collection \n", + "2 Sentinel3 Sentinel-3 Sentinel-3 Collection \n", + "3 Sentinel5P Sentinel-5P Sentinel-5P Collection \n", + "4 CLMS CLMS Copernicus Land Monitoring Service Collection \n", + "\n", + " parameters \n", + "0 [maxRecords, index, page, identifier, geometry... \n", + "1 [maxRecords, index, page, identifier, geometry... \n", + "2 [maxRecords, index, page, identifier, geometry... \n", + "3 [maxRecords, index, page, identifier, geometry... \n", + "4 [maxRecords, index, page, identifier, geometry... " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_resto = pd.DataFrame([parse_resto_collection(c) for c in resto_collections])\n", + "df_resto" + ] + }, + { + "cell_type": "markdown", + "id": "54a43689-9107-4b58-b6af-2b398237030c", + "metadata": {}, + "source": [ + "The code below demonstrates how to retrieve only the **queryable parameters for a specific collection**, in this case Sentinel-2:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b766d5d5-e9ad-490d-9718-b36ab7301b82", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['maxRecords',\n", + " 'index',\n", + " 'page',\n", + " 'identifier',\n", + " 'geometry',\n", + " 'box',\n", + " 'lon',\n", + " 'lat',\n", + " 'radius',\n", + " 'startDate',\n", + " 'completionDate',\n", + " 'productIdentifier',\n", + " 'productType',\n", + " 'tileId',\n", + " 'processingLevel',\n", + " 'platform',\n", + " 'instrument',\n", + " 'orbitNumber',\n", + " 'sensorMode',\n", + " 'cloudCover',\n", + " 'updated',\n", + " 'publishedAfter',\n", + " 'publishedBefore',\n", + " 'sortParam',\n", + " 'sortOrder',\n", + " 'status',\n", + " 'exactCount',\n", + " 'orbitDirection',\n", + " 'relativeOrbitNumber',\n", + " 'processingBaseline',\n", + " 'missionTakeId']" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "s2_info = parse_resto_collection(\"Sentinel2\")\n", + "s2_parameters = s2_info[\"parameters\"]\n", + "s2_parameters" + ] + }, + { + "cell_type": "markdown", + "id": "ab2f1df1-3d4f-4c79-bbb9-e0e467b0d539", + "metadata": {}, + "source": [ + "The base Resto URL allows querying items from all collections. However, if we want to **retrieve products from a specific collection**, we need to include the collection name in the request URL." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "a7c9245d-b520-49d9-97af-e022c4c9a2de", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/CLMS/search.json\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Feature000bcf77-ddcf-4fba-b559-d4caaa972e96{'type': 'Point', 'coordinates': [67.04, 40.87]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
1Feature0018595d-a646-44ed-9b44-b32b0acf2cc1{'type': 'Point', 'coordinates': [-87.0, 44.0]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
2Feature0029ff2f-67ed-4d14-bc45-7486c03af258{'type': 'Point', 'coordinates': [13.29, 58.81]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
3Feature003beb57-788a-4ed1-b4f2-440fba282b07{'type': 'Point', 'coordinates': [-62.8, 7.41]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
4Feature00684216-d9a5-4cc1-9944-e0bba63a09d5{'type': 'Point', 'coordinates': [28.0, -16.93]}{'collection': 'CLMS', 'status': 'ONLINE', 'li...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature 000bcf77-ddcf-4fba-b559-d4caaa972e96 \n", + "1 Feature 0018595d-a646-44ed-9b44-b32b0acf2cc1 \n", + "2 Feature 0029ff2f-67ed-4d14-bc45-7486c03af258 \n", + "3 Feature 003beb57-788a-4ed1-b4f2-440fba282b07 \n", + "4 Feature 00684216-d9a5-4cc1-9944-e0bba63a09d5 \n", + "\n", + " geometry \\\n", + "0 {'type': 'Point', 'coordinates': [67.04, 40.87]} \n", + "1 {'type': 'Point', 'coordinates': [-87.0, 44.0]} \n", + "2 {'type': 'Point', 'coordinates': [13.29, 58.81]} \n", + "3 {'type': 'Point', 'coordinates': [-62.8, 7.41]} \n", + "4 {'type': 'Point', 'coordinates': [28.0, -16.93]} \n", + "\n", + " properties \n", + "0 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "1 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "2 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "3 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "4 {'collection': 'CLMS', 'status': 'ONLINE', 'li... " + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "collection_name = \"CLMS\"\n", + "resto_url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection_name}/search.json\"\n", + "\n", + "json = requests.get(resto_url).json()\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features.head()" + ] + }, + { + "cell_type": "markdown", + "id": "a32609b1-605a-4a3c-8431-da4f7fa387fd", + "metadata": {}, + "source": [ + "In Resto, each feature contains a nested properties dictionary with detailed metadata." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "ed313b6a-24eb-41d4-a386-9bce8290fd6b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
collectionstatusparentIdentifiertitledescriptionorganisationNamestartDatecompletionDateproductTypeprocessingLevel...license.grantedOrganizationCountrieslicense.grantedFlagslicense.viewServicelicense.signatureQuotalicense.description.shortNamecentroid.typecentroid.coordinatesservices.download.urlservices.download.mimeTypeservices.download.size
0CLMSONLINENonec_gls_WL_202509220600_1300000000138_ALTI_V2.2....Copernicus program priorities are to gain from...None1995-06-02T15:31:00.000000Z2025-09-22T06:00:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[67.04, 40.87]https://catalogue.dataspace.copernicus.eu/down...application/geo+json281916
1CLMSONLINENonec_gls_WL_202510170900_1300000000006_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-27T02:35:00.000000Z2025-10-17T09:00:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[-87.0, 44.0]https://catalogue.dataspace.copernicus.eu/down...application/geo+json688083
2CLMSONLINENonec_gls_WL_202509260506_1300000000105_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-28T22:30:00.000000Z2025-09-26T05:06:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[13.29, 58.81]https://catalogue.dataspace.copernicus.eu/down...application/geo+json373184
3CLMSONLINENonec_gls_WL_202505171602_1300000000073_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-30T00:51:00.000000Z2025-05-17T16:02:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[-62.8, 7.41]https://catalogue.dataspace.copernicus.eu/down...application/geo+json182737
4CLMSONLINENonec_gls_WL_202507122311_1300000000172_ALTI_V2.2....Copernicus program priorities are to gain from...None1992-09-26T00:14:00.000000Z2025-07-12T23:11:00.000000Zriver_and_lake_water_levelNone...NoneNonepublic-1No licensePoint[28.0, -16.93]https://catalogue.dataspace.copernicus.eu/down...application/geo+json355715
\n", + "

5 rows × 37 columns

\n", + "
" + ], + "text/plain": [ + " collection status parentIdentifier \\\n", + "0 CLMS ONLINE None \n", + "1 CLMS ONLINE None \n", + "2 CLMS ONLINE None \n", + "3 CLMS ONLINE None \n", + "4 CLMS ONLINE None \n", + "\n", + " title \\\n", + "0 c_gls_WL_202509220600_1300000000138_ALTI_V2.2.... \n", + "1 c_gls_WL_202510170900_1300000000006_ALTI_V2.2.... \n", + "2 c_gls_WL_202509260506_1300000000105_ALTI_V2.2.... \n", + "3 c_gls_WL_202505171602_1300000000073_ALTI_V2.2.... \n", + "4 c_gls_WL_202507122311_1300000000172_ALTI_V2.2.... \n", + "\n", + " description organisationName \\\n", + "0 Copernicus program priorities are to gain from... None \n", + "1 Copernicus program priorities are to gain from... None \n", + "2 Copernicus program priorities are to gain from... None \n", + "3 Copernicus program priorities are to gain from... None \n", + "4 Copernicus program priorities are to gain from... None \n", + "\n", + " startDate completionDate \\\n", + "0 1995-06-02T15:31:00.000000Z 2025-09-22T06:00:00.000000Z \n", + "1 1992-09-27T02:35:00.000000Z 2025-10-17T09:00:00.000000Z \n", + "2 1992-09-28T22:30:00.000000Z 2025-09-26T05:06:00.000000Z \n", + "3 1992-09-30T00:51:00.000000Z 2025-05-17T16:02:00.000000Z \n", + "4 1992-09-26T00:14:00.000000Z 2025-07-12T23:11:00.000000Z \n", + "\n", + " productType processingLevel ... \\\n", + "0 river_and_lake_water_level None ... \n", + "1 river_and_lake_water_level None ... \n", + "2 river_and_lake_water_level None ... \n", + "3 river_and_lake_water_level None ... \n", + "4 river_and_lake_water_level None ... \n", + "\n", + " license.grantedOrganizationCountries license.grantedFlags \\\n", + "0 None None \n", + "1 None None \n", + "2 None None \n", + "3 None None \n", + "4 None None \n", + "\n", + " license.viewService license.signatureQuota license.description.shortName \\\n", + "0 public -1 No license \n", + "1 public -1 No license \n", + "2 public -1 No license \n", + "3 public -1 No license \n", + "4 public -1 No license \n", + "\n", + " centroid.type centroid.coordinates \\\n", + "0 Point [67.04, 40.87] \n", + "1 Point [-87.0, 44.0] \n", + "2 Point [13.29, 58.81] \n", + "3 Point [-62.8, 7.41] \n", + "4 Point [28.0, -16.93] \n", + "\n", + " services.download.url \\\n", + "0 https://catalogue.dataspace.copernicus.eu/down... \n", + "1 https://catalogue.dataspace.copernicus.eu/down... \n", + "2 https://catalogue.dataspace.copernicus.eu/down... \n", + "3 https://catalogue.dataspace.copernicus.eu/down... \n", + "4 https://catalogue.dataspace.copernicus.eu/down... \n", + "\n", + " services.download.mimeType services.download.size \n", + "0 application/geo+json 281916 \n", + "1 application/geo+json 688083 \n", + "2 application/geo+json 373184 \n", + "3 application/geo+json 182737 \n", + "4 application/geo+json 355715 \n", + "\n", + "[5 rows x 37 columns]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_props = pd.json_normalize(df_features[\"properties\"])\n", + "df_props.head()" + ] + }, + { + "cell_type": "markdown", + "id": "ac8bbf2c-203b-4496-85d7-1d4aba72cde7", + "metadata": {}, + "source": [ + "### **STAC**\n", + "\n", + "STAC is built around a set of interconnected JSON objects. STAC catalogue consists of four core resource types: **Catalog**, **Collection**, **Item** and **Asset**. \n", + "\n", + "Catalogs and Collections are used to define shared metadata for groups of Items, while Items represent individual products, specifying the metadata values and attributes that distinguish one product from another within the same collection. It also enables users to access detailed Asset-level metadata, including spatial information, temporal coverage, and data specifications." + ] + }, + { + "cell_type": "markdown", + "id": "3325b8f1-b25d-462a-803e-e88e7fa355c7", + "metadata": {}, + "source": [ + "#### **Collections Endpoint**\n", + "\n", + "STAC provides a dedicated endpoint that allows users to retrieve **information about all collections available within the catalogue**. This endpoint returns metadata for each collection." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "d1770429-044c-4008-99aa-417e55c737ea", + "metadata": {}, + "outputs": [], + "source": [ + "stac_url = \"https://stac.dataspace.copernicus.eu/v1/collections\"" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "b6944db9-ffe9-4bb3-bbcb-891c8fd843d0", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idtypelinkstitleassetsextentlicensekeywordsproviderssummaries...auth:schemessci:citationstac_versionstac_extensionsstorage:schemesbandssci:doiceosard:typeceosard:specificationceosard:specification_version
0sentinel-3-sl-2-aod-nrtCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-3 SLSTR Aerosol Optical Depth (NRT){'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, Satellite, Global,...[{'url': 'https://sentinels.copernicus.eu/web/...{'gsd': [9500], 'platform': ['sentinel-3a', 's......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/alternate-a...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
1sentinel-1-global-mosaicsCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-1 Global Mosaics{'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, GRD, SAR, C-Band, ...[{'url': 'https://sentinels.copernicus.eu/web/...{'gsd': [20, 40], 'instruments': ['sar'], 'pro......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/authenticat...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
2sentinel-3-olci-2-wfr-nrtCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-3 OLCI Water Full Resolution (NRT){'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, Satellite, Global,...[{'url': 'https://sentinels.copernicus.eu/web/...{'gsd': [300], 'platform': ['sentinel-3a', 'se......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/eo/v2.0.0/s...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...[{'name': 'Oa01', 'description': 'Aerosol corr...NaNNaNNaNNaN
3sentinel-5p-l2-ch4-nrtiCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-5P Level 2 Methane (NRTI){'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[7000m, Atmosphere, CH4, Copernicus, EC, ESA, ...[{'url': 'https://sentinel.esa.int/web/sentine...{'gsd': [7000], 'platform': ['sentinel-5p'], '......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/alternate-a...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
4sentinel-1-slc-wvCollection[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-1 Single Look Complex: WV{'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other[Sentinel, Copernicus, ESA, SLC, SAR, C-Band, ...[{'url': 'https://sentinel.esa.int/web/sentine...{'platform': ['sentinel-1a', 'sentinel-1b', 's......{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...Copernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/authenticat...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...NaNNaNNaNNaNNaN
\n", + "

5 rows × 22 columns

\n", + "
" + ], + "text/plain": [ + " id type \\\n", + "0 sentinel-3-sl-2-aod-nrt Collection \n", + "1 sentinel-1-global-mosaics Collection \n", + "2 sentinel-3-olci-2-wfr-nrt Collection \n", + "3 sentinel-5p-l2-ch4-nrti Collection \n", + "4 sentinel-1-slc-wv Collection \n", + "\n", + " links \\\n", + "0 [{'rel': 'items', 'type': 'application/geo+jso... \n", + "1 [{'rel': 'items', 'type': 'application/geo+jso... \n", + "2 [{'rel': 'items', 'type': 'application/geo+jso... \n", + "3 [{'rel': 'items', 'type': 'application/geo+jso... \n", + "4 [{'rel': 'items', 'type': 'application/geo+jso... \n", + "\n", + " title \\\n", + "0 Sentinel-3 SLSTR Aerosol Optical Depth (NRT) \n", + "1 Sentinel-1 Global Mosaics \n", + "2 Sentinel-3 OLCI Water Full Resolution (NRT) \n", + "3 Sentinel-5P Level 2 Methane (NRTI) \n", + "4 Sentinel-1 Single Look Complex: WV \n", + "\n", + " assets \\\n", + "0 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", + "1 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", + "2 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", + "3 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", + "4 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", + "\n", + " extent license \\\n", + "0 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", + "1 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", + "2 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", + "3 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", + "4 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", + "\n", + " keywords \\\n", + "0 [Sentinel, Copernicus, ESA, Satellite, Global,... \n", + "1 [Sentinel, Copernicus, ESA, GRD, SAR, C-Band, ... \n", + "2 [Sentinel, Copernicus, ESA, Satellite, Global,... \n", + "3 [7000m, Atmosphere, CH4, Copernicus, EC, ESA, ... \n", + "4 [Sentinel, Copernicus, ESA, SLC, SAR, C-Band, ... \n", + "\n", + " providers \\\n", + "0 [{'url': 'https://sentinels.copernicus.eu/web/... \n", + "1 [{'url': 'https://sentinels.copernicus.eu/web/... \n", + "2 [{'url': 'https://sentinels.copernicus.eu/web/... \n", + "3 [{'url': 'https://sentinel.esa.int/web/sentine... \n", + "4 [{'url': 'https://sentinel.esa.int/web/sentine... \n", + "\n", + " summaries ... \\\n", + "0 {'gsd': [9500], 'platform': ['sentinel-3a', 's... ... \n", + "1 {'gsd': [20, 40], 'instruments': ['sar'], 'pro... ... \n", + "2 {'gsd': [300], 'platform': ['sentinel-3a', 'se... ... \n", + "3 {'gsd': [7000], 'platform': ['sentinel-5p'], '... ... \n", + "4 {'platform': ['sentinel-1a', 'sentinel-1b', 's... ... \n", + "\n", + " auth:schemes \\\n", + "0 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", + "1 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", + "2 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", + "3 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", + "4 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... \n", + "\n", + " sci:citation stac_version \\\n", + "0 Copernicus Sentinel data [Year] 1.1.0 \n", + "1 Copernicus Sentinel data [Year] 1.1.0 \n", + "2 Copernicus Sentinel data [Year] 1.1.0 \n", + "3 Copernicus Sentinel data [Year] 1.1.0 \n", + "4 Copernicus Sentinel data [Year] 1.1.0 \n", + "\n", + " stac_extensions \\\n", + "0 [https://stac-extensions.github.io/alternate-a... \n", + "1 [https://stac-extensions.github.io/authenticat... \n", + "2 [https://stac-extensions.github.io/eo/v2.0.0/s... \n", + "3 [https://stac-extensions.github.io/alternate-a... \n", + "4 [https://stac-extensions.github.io/authenticat... \n", + "\n", + " storage:schemes \\\n", + "0 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", + "1 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", + "2 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", + "3 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", + "4 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... \n", + "\n", + " bands sci:doi ceosard:type \\\n", + "0 NaN NaN NaN \n", + "1 NaN NaN NaN \n", + "2 [{'name': 'Oa01', 'description': 'Aerosol corr... NaN NaN \n", + "3 NaN NaN NaN \n", + "4 NaN NaN NaN \n", + "\n", + " ceosard:specification ceosard:specification_version \n", + "0 NaN NaN \n", + "1 NaN NaN \n", + "2 NaN NaN \n", + "3 NaN NaN \n", + "4 NaN NaN \n", + "\n", + "[5 rows x 22 columns]" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "pd.DataFrame(json[\"collections\"]).head()" + ] + }, + { + "cell_type": "markdown", + "id": "67fc4bcf-4649-4fa3-9e25-499fbaad9ef0", + "metadata": {}, + "source": [ + "Querying the STAC collections endpoint allows users to obtain any available information related to the properties of each collection.\n", + "\n", + "In this example, we store the following details: id, title and summaries. This approach provides a structured overview of all collections in the catalogue, making it easier to explore their attributes before performing item-level queries." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "adcfdef4-6d82-447d-b8ff-ede3b393624d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idtitlesummaries
0sentinel-3-sl-2-aod-nrtSentinel-3 SLSTR Aerosol Optical Depth (NRT){'gsd': [9500], 'platform': ['sentinel-3a', 's...
1sentinel-1-global-mosaicsSentinel-1 Global Mosaics{'gsd': [20, 40], 'instruments': ['sar'], 'pro...
2sentinel-3-olci-2-wfr-nrtSentinel-3 OLCI Water Full Resolution (NRT){'gsd': [300], 'platform': ['sentinel-3a', 'se...
3sentinel-5p-l2-ch4-nrtiSentinel-5P Level 2 Methane (NRTI){'gsd': [7000], 'platform': ['sentinel-5p'], '...
4sentinel-1-slc-wvSentinel-1 Single Look Complex: WV{'platform': ['sentinel-1a', 'sentinel-1b', 's...
\n", + "
" + ], + "text/plain": [ + " id title \\\n", + "0 sentinel-3-sl-2-aod-nrt Sentinel-3 SLSTR Aerosol Optical Depth (NRT) \n", + "1 sentinel-1-global-mosaics Sentinel-1 Global Mosaics \n", + "2 sentinel-3-olci-2-wfr-nrt Sentinel-3 OLCI Water Full Resolution (NRT) \n", + "3 sentinel-5p-l2-ch4-nrti Sentinel-5P Level 2 Methane (NRTI) \n", + "4 sentinel-1-slc-wv Sentinel-1 Single Look Complex: WV \n", + "\n", + " summaries \n", + "0 {'gsd': [9500], 'platform': ['sentinel-3a', 's... \n", + "1 {'gsd': [20, 40], 'instruments': ['sar'], 'pro... \n", + "2 {'gsd': [300], 'platform': ['sentinel-3a', 'se... \n", + "3 {'gsd': [7000], 'platform': ['sentinel-5p'], '... \n", + "4 {'platform': ['sentinel-1a', 'sentinel-1b', 's... " + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "pd.DataFrame(json[\"collections\"])[[\"id\", \"title\", \"summaries\"]].head()" + ] + }, + { + "cell_type": "markdown", + "id": "39f771ea-52c9-4ed1-bb5d-980529aeb9b6", + "metadata": {}, + "source": [ + "The code below allows us to obtain the **`id`s of all collections available in the catalogue**:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "fc7c3d2c-0a3b-4063-a2b5-5a784fd64926", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
id
0sentinel-3-sl-2-aod-nrt
1sentinel-1-global-mosaics
2sentinel-3-olci-2-wfr-nrt
3sentinel-5p-l2-ch4-nrti
4sentinel-1-slc-wv
......
135sentinel-5p-l2-o3-nrti
136sentinel-5p-l2-o3-offl
137sentinel-5p-l2-so2-offl
138sentinel-5p-l2-so2-nrti
139sentinel-5p-l2-so2-rpro
\n", + "

140 rows × 1 columns

\n", + "
" + ], + "text/plain": [ + " id\n", + "0 sentinel-3-sl-2-aod-nrt\n", + "1 sentinel-1-global-mosaics\n", + "2 sentinel-3-olci-2-wfr-nrt\n", + "3 sentinel-5p-l2-ch4-nrti\n", + "4 sentinel-1-slc-wv\n", + ".. ...\n", + "135 sentinel-5p-l2-o3-nrti\n", + "136 sentinel-5p-l2-o3-offl\n", + "137 sentinel-5p-l2-so2-offl\n", + "138 sentinel-5p-l2-so2-nrti\n", + "139 sentinel-5p-l2-so2-rpro\n", + "\n", + "[140 rows x 1 columns]" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stac_collections = pd.DataFrame(json[\"collections\"])[[\"id\"]]\n", + "stac_collections" + ] + }, + { + "cell_type": "markdown", + "id": "5a55c5f9-2430-465f-a23e-0bf10c936c0f", + "metadata": {}, + "source": [ + "The code below retrieves **information for a specific collection**:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "28f44451-0b49-4792-82ec-50f58fe06328", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idtypebandslinkstitleassetsextentlicensesci:doikeywords...descriptionitem_assetsauth:schemesceosard:typesci:citationstac_versionstac_extensionsstorage:schemesceosard:specificationceosard:specification_version
0sentinel-2-l2aCollection[{'gsd': 60, 'name': 'B01', 'description': 'Co...[{'rel': 'items', 'type': 'application/geo+jso...Sentinel-2 Level-2A{'thumbnail': {'href': 'https://s3.waw3-2.clou...{'spatial': {'bbox': [[-180, -90, 180, 90]]}, ...other10.5270/S2_-znk9xsj[Copernicus, Sentinel, EU, ESA, Satellite, Glo......The Sentinel-2 Level-2A Collection 1 product p...{'AOT_10m': {'gsd': 10, 'type': 'image/jp2', '...{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...opticalCopernicus Sentinel data [Year]1.1.0[https://stac-extensions.github.io/eo/v2.0.0/s...{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...SR5.0.1
\n", + "

1 rows × 22 columns

\n", + "
" + ], + "text/plain": [ + " id type \\\n", + "0 sentinel-2-l2a Collection \n", + "\n", + " bands \\\n", + "0 [{'gsd': 60, 'name': 'B01', 'description': 'Co... \n", + "\n", + " links title \\\n", + "0 [{'rel': 'items', 'type': 'application/geo+jso... Sentinel-2 Level-2A \n", + "\n", + " assets \\\n", + "0 {'thumbnail': {'href': 'https://s3.waw3-2.clou... \n", + "\n", + " extent license \\\n", + "0 {'spatial': {'bbox': [[-180, -90, 180, 90]]}, ... other \n", + "\n", + " sci:doi keywords \\\n", + "0 10.5270/S2_-znk9xsj [Copernicus, Sentinel, EU, ESA, Satellite, Glo... \n", + "\n", + " ... description \\\n", + "0 ... The Sentinel-2 Level-2A Collection 1 product p... \n", + "\n", + " item_assets \\\n", + "0 {'AOT_10m': {'gsd': 10, 'type': 'image/jp2', '... \n", + "\n", + " auth:schemes ceosard:type \\\n", + "0 {'s3': {'type': 's3'}, 'oidc': {'type': 'openI... optical \n", + "\n", + " sci:citation stac_version \\\n", + "0 Copernicus Sentinel data [Year] 1.1.0 \n", + "\n", + " stac_extensions \\\n", + "0 [https://stac-extensions.github.io/eo/v2.0.0/s... \n", + "\n", + " storage:schemes ceosard:specification \\\n", + "0 {'cdse-s3': {'type': 'custom-s3', 'title': 'Co... SR \n", + "\n", + " ceosard:specification_version \n", + "0 5.0.1 \n", + "\n", + "[1 rows x 22 columns]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "collection_id = \"sentinel-2-l2a\"\n", + "\n", + "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}\"\n", + "\n", + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "df = pd.DataFrame([json])\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "f72df62c-dd32-42c3-92a9-07a209d132b7", + "metadata": {}, + "source": [ + "#### **Items Endpoint**\n", + "\n", + "STAC provides a dedicated endpoint that allows users to retrieve **information about items available within the collection**." + ] + }, + { + "cell_type": "markdown", + "id": "615e6156-bd20-48fa-b2f5-a53d67c73f19", + "metadata": {}, + "source": [ + "The code below retrieves items (individual products) from a specific STAC collection:" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "5b56097c-73c6-4467-9096-4c1dc45a9347", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251231T051319_N0511_R133_T31CEJ_2...[2.998598727270369, -82.62787974508461, 3.5898...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[2.998682...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:05.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2...[-2.277998803053058, -80.22883981478951, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-2.18323...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:23.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251231T051319_N0511_R133_T31CDL_2...[-2.803841979337122, -81.13320280779526, 1.437...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[0.108578...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:30:58.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251231T051319_N0511_R133_T31CDK_2...[-3.447304707739892, -82.03781529080683, 2.739...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[1.369168...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:31:31.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251231T051319_N0511_R133_T30CWS_2...[-3.001058129404774, -80.25242038514605, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-3.00103...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:46.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20251231T051319_N0511_R133_T31CEJ_2... \n", + "1 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2... \n", + "2 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDL_2... \n", + "3 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDK_2... \n", + "4 S2B_MSIL2A_20251231T051319_N0511_R133_T30CWS_2... \n", + "\n", + " bbox type \\\n", + "0 [2.998598727270369, -82.62787974508461, 3.5898... Feature \n", + "1 [-2.277998803053058, -80.22883981478951, 0.184... Feature \n", + "2 [-2.803841979337122, -81.13320280779526, 1.437... Feature \n", + "3 [-3.447304707739892, -82.03781529080683, 2.739... Feature \n", + "4 [-3.001058129404774, -80.25242038514605, 0.184... Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[2.998682... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[-2.18323... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[0.108578... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[1.369168... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[-3.00103... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-12-31T07:23:05.00... \n", + "1 {'gsd': 10, 'created': '2025-12-31T07:23:23.00... \n", + "2 {'gsd': 10, 'created': '2025-12-31T07:30:58.00... \n", + "3 {'gsd': 10, 'created': '2025-12-31T07:31:31.00... \n", + "4 {'gsd': 10, 'created': '2025-12-31T07:24:46.00... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "collection_id = \"sentinel-2-l2a\"\n", + "\n", + "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}/items\"\n", + "\n", + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features.head()" + ] + }, + { + "cell_type": "markdown", + "id": "04f0ab44-df51-4020-b75b-bd4efd7c63fc", + "metadata": {}, + "source": [ + "In STAC, each item contains a nested properties dictionary with detailed metadata." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "e554340f-2f51-47c8-986e-1f2bc43e965d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
gsdcreatedexpiresupdateddatetimeplatformgrid:codepublishedinstrumentsend_datetime...storage:schemes.cdse-s3.titlestorage:schemes.cdse-s3.platformstorage:schemes.cdse-s3.descriptionstorage:schemes.cdse-s3.requester_paysstorage:schemes.creodias-s3.typestorage:schemes.creodias-s3.titlestorage:schemes.creodias-s3.platformstorage:schemes.creodias-s3.descriptionstorage:schemes.creodias-s3.requester_paysprocessing:software.eometadatatool
0102025-12-31T07:23:05.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:25:38.002693Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CEJ2025-12-31T07:25:38.002693Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
1102025-12-31T07:23:23.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:26:10.381080Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CDM2025-12-31T07:26:10.381080Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
2102025-12-31T07:30:58.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:33:41.761622Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CDL2025-12-31T07:33:41.761622Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
3102025-12-31T07:31:31.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:34:43.634267Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-31CDK2025-12-31T07:34:43.634267Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
4102025-12-31T07:24:46.000000Z9999-01-01T00:00:00.000000Z2025-12-31T07:27:44.406225Z2025-12-31T05:13:19.024000Zsentinel-2bMGRS-30CWS2025-12-31T07:27:44.406225Z[msi]2025-12-31T05:13:19.024000Z...Copernicus Data Space Ecosystem S3https://eodata.dataspace.copernicus.euThis endpoint provides access to EO data which...Falsecustom-s3CREODIAS S3https://eodata.cloudferro.comComprehensive Earth Observation Data (EODATA) ...True251021130925+dirty
\n", + "

5 rows × 58 columns

\n", + "
" + ], + "text/plain": [ + " gsd created expires \\\n", + "0 10 2025-12-31T07:23:05.000000Z 9999-01-01T00:00:00.000000Z \n", + "1 10 2025-12-31T07:23:23.000000Z 9999-01-01T00:00:00.000000Z \n", + "2 10 2025-12-31T07:30:58.000000Z 9999-01-01T00:00:00.000000Z \n", + "3 10 2025-12-31T07:31:31.000000Z 9999-01-01T00:00:00.000000Z \n", + "4 10 2025-12-31T07:24:46.000000Z 9999-01-01T00:00:00.000000Z \n", + "\n", + " updated datetime platform \\\n", + "0 2025-12-31T07:25:38.002693Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", + "1 2025-12-31T07:26:10.381080Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", + "2 2025-12-31T07:33:41.761622Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", + "3 2025-12-31T07:34:43.634267Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", + "4 2025-12-31T07:27:44.406225Z 2025-12-31T05:13:19.024000Z sentinel-2b \n", + "\n", + " grid:code published instruments \\\n", + "0 MGRS-31CEJ 2025-12-31T07:25:38.002693Z [msi] \n", + "1 MGRS-31CDM 2025-12-31T07:26:10.381080Z [msi] \n", + "2 MGRS-31CDL 2025-12-31T07:33:41.761622Z [msi] \n", + "3 MGRS-31CDK 2025-12-31T07:34:43.634267Z [msi] \n", + "4 MGRS-30CWS 2025-12-31T07:27:44.406225Z [msi] \n", + "\n", + " end_datetime ... storage:schemes.cdse-s3.title \\\n", + "0 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", + "1 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", + "2 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", + "3 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", + "4 2025-12-31T05:13:19.024000Z ... Copernicus Data Space Ecosystem S3 \n", + "\n", + " storage:schemes.cdse-s3.platform \\\n", + "0 https://eodata.dataspace.copernicus.eu \n", + "1 https://eodata.dataspace.copernicus.eu \n", + "2 https://eodata.dataspace.copernicus.eu \n", + "3 https://eodata.dataspace.copernicus.eu \n", + "4 https://eodata.dataspace.copernicus.eu \n", + "\n", + " storage:schemes.cdse-s3.description \\\n", + "0 This endpoint provides access to EO data which... \n", + "1 This endpoint provides access to EO data which... \n", + "2 This endpoint provides access to EO data which... \n", + "3 This endpoint provides access to EO data which... \n", + "4 This endpoint provides access to EO data which... \n", + "\n", + " storage:schemes.cdse-s3.requester_pays storage:schemes.creodias-s3.type \\\n", + "0 False custom-s3 \n", + "1 False custom-s3 \n", + "2 False custom-s3 \n", + "3 False custom-s3 \n", + "4 False custom-s3 \n", + "\n", + " storage:schemes.creodias-s3.title storage:schemes.creodias-s3.platform \\\n", + "0 CREODIAS S3 https://eodata.cloudferro.com \n", + "1 CREODIAS S3 https://eodata.cloudferro.com \n", + "2 CREODIAS S3 https://eodata.cloudferro.com \n", + "3 CREODIAS S3 https://eodata.cloudferro.com \n", + "4 CREODIAS S3 https://eodata.cloudferro.com \n", + "\n", + " storage:schemes.creodias-s3.description \\\n", + "0 Comprehensive Earth Observation Data (EODATA) ... \n", + "1 Comprehensive Earth Observation Data (EODATA) ... \n", + "2 Comprehensive Earth Observation Data (EODATA) ... \n", + "3 Comprehensive Earth Observation Data (EODATA) ... \n", + "4 Comprehensive Earth Observation Data (EODATA) ... \n", + "\n", + " storage:schemes.creodias-s3.requester_pays \\\n", + "0 True \n", + "1 True \n", + "2 True \n", + "3 True \n", + "4 True \n", + "\n", + " processing:software.eometadatatool \n", + "0 251021130925+dirty \n", + "1 251021130925+dirty \n", + "2 251021130925+dirty \n", + "3 251021130925+dirty \n", + "4 251021130925+dirty \n", + "\n", + "[5 rows x 58 columns]" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_props = pd.json_normalize(df_features[\"properties\"])\n", + "df_props.head(5)" + ] + }, + { + "cell_type": "markdown", + "id": "4c43af2e-41d9-41a4-9044-8004370dfed7", + "metadata": {}, + "source": [ + "#### **Queryables Endpoint**\n", + "\n", + "STAC provides a special queryables endpoint that allows users to explore the catalogue or a specific collection in terms of the **metadata fields available for querying**.\n", + "\n", + "This endpoint returns information about each queryable property, including its data type, description, and constraints, which helps users construct valid and efficient queries without manually inspecting individual items.\n", + "\n", + "By using the queryables endpoint, you can quickly understand which fields can be used in filters and searches across the catalog or within a specific collection." + ] + }, + { + "cell_type": "markdown", + "id": "f9261c96-7a38-401d-8f88-10358898cdca", + "metadata": {}, + "source": [ + "To access **queryable attributes across the entire catalogue**:" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "648d1984-4270-477a-98f2-1d7ef8b6f638", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/queryables\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
$idtypetitle$schemapropertiesadditionalProperties
0https://stac.dataspace.copernicus.eu/v1/querya...objectSTAC Queryables.http://json-schema.org/draft-07/schema#{'id': {'type': 'string', 'title': 'Item ID', ...True
\n", + "
" + ], + "text/plain": [ + " $id type \\\n", + "0 https://stac.dataspace.copernicus.eu/v1/querya... object \n", + "\n", + " title $schema \\\n", + "0 STAC Queryables. http://json-schema.org/draft-07/schema# \n", + "\n", + " properties additionalProperties \n", + "0 {'id': {'type': 'string', 'title': 'Item ID', ... True " + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stac_url = \"https://stac.dataspace.copernicus.eu/v1/queryables\"\n", + "\n", + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "df = pd.DataFrame([json])\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "4048c399-9454-4ba8-a0d0-324a770b6e2b", + "metadata": {}, + "source": [ + "To access its properties:" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "421232f7-24fe-44b7-a697-f8600cb2c72a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
id.typestring
id.titleItem ID
id.minLength1
id.descriptionItem identifier
datetime.typestring
datetime.titleAcquired
datetime.formatdate-time
datetime.pattern(\\+00:00|Z)$
datetime.descriptionDatetime
geometry.$refhttps://geojson.org/schema/Feature.json
geometry.titleItem Geometry
geometry.descriptionItem Geometry
platform.enum[sentinel-1a, sentinel-1b, sentinel-1c, sentin...
platform.typestring
platform.titlePlatform
platform.descriptionSatellite platform identifier
grid:code.typestring
grid:code.titleGrid Code
grid:code.pattern^[A-Z0-9]+-[-_.A-Za-z0-9]+$
grid:code.descriptionGrid Code
published.typestring
published.titlePublished
published.formatdate-time
published.pattern(\\+00:00|Z)$
published.descriptionDatetime
product:type.enum[EW_GRDH_1S, EW_GRDM_1S, IW_GRDH_1S, S1_GRDH_1...
product:type.typestring
product:type.titleProduct Type
product:type.descriptionProduct Type
eo:snow_cover.typenumber
eo:snow_cover.titleSnow Cover
eo:snow_cover.maximum100
eo:snow_cover.minimum0
eo:snow_cover.descriptionSnow cover in percent
eo:cloud_cover.typenumber
eo:cloud_cover.titleCloud Cover
eo:cloud_cover.maximum100
eo:cloud_cover.minimum0
eo:cloud_cover.descriptionCloud cover in percent
sat:orbit_state.enum[ascending, descending, geostationary]
sat:orbit_state.typestring
sat:orbit_state.titleOrbit State
sat:orbit_state.descriptionThe state of the orbit: ascending or descendin...
sar:polarizations.enum[HH, HV, VH, VV]
sar:polarizations.typestring
sar:polarizations.titleSAR polarizations
sar:polarizations.descriptionSAR polarizations
processing:version.typestring
processing:version.titleProcessing Version
processing:version.descriptionWhich software/processor version was used to g...
sat:relative_orbit.typeinteger
sat:relative_orbit.titleRelative Orbit
sat:relative_orbit.minimum1
sat:relative_orbit.descriptionSatellite relative orbit number
sar:instrument_mode.enum[EW, IW, SM]
sar:instrument_mode.typestring
sar:instrument_mode.titleInstrument mode
sar:instrument_mode.descriptionSAR instrument mode
\n", + "
" + ], + "text/plain": [ + " 0\n", + "id.type string\n", + "id.title Item ID\n", + "id.minLength 1\n", + "id.description Item identifier\n", + "datetime.type string\n", + "datetime.title Acquired\n", + "datetime.format date-time\n", + "datetime.pattern (\\+00:00|Z)$\n", + "datetime.description Datetime\n", + "geometry.$ref https://geojson.org/schema/Feature.json\n", + "geometry.title Item Geometry\n", + "geometry.description Item Geometry\n", + "platform.enum [sentinel-1a, sentinel-1b, sentinel-1c, sentin...\n", + "platform.type string\n", + "platform.title Platform\n", + "platform.description Satellite platform identifier\n", + "grid:code.type string\n", + "grid:code.title Grid Code\n", + "grid:code.pattern ^[A-Z0-9]+-[-_.A-Za-z0-9]+$\n", + "grid:code.description Grid Code\n", + "published.type string\n", + "published.title Published\n", + "published.format date-time\n", + "published.pattern (\\+00:00|Z)$\n", + "published.description Datetime\n", + "product:type.enum [EW_GRDH_1S, EW_GRDM_1S, IW_GRDH_1S, S1_GRDH_1...\n", + "product:type.type string\n", + "product:type.title Product Type\n", + "product:type.description Product Type\n", + "eo:snow_cover.type number\n", + "eo:snow_cover.title Snow Cover\n", + "eo:snow_cover.maximum 100\n", + "eo:snow_cover.minimum 0\n", + "eo:snow_cover.description Snow cover in percent\n", + "eo:cloud_cover.type number\n", + "eo:cloud_cover.title Cloud Cover\n", + "eo:cloud_cover.maximum 100\n", + "eo:cloud_cover.minimum 0\n", + "eo:cloud_cover.description Cloud cover in percent\n", + "sat:orbit_state.enum [ascending, descending, geostationary]\n", + "sat:orbit_state.type string\n", + "sat:orbit_state.title Orbit State\n", + "sat:orbit_state.description The state of the orbit: ascending or descendin...\n", + "sar:polarizations.enum [HH, HV, VH, VV]\n", + "sar:polarizations.type string\n", + "sar:polarizations.title SAR polarizations\n", + "sar:polarizations.description SAR polarizations\n", + "processing:version.type string\n", + "processing:version.title Processing Version\n", + "processing:version.description Which software/processor version was used to g...\n", + "sat:relative_orbit.type integer\n", + "sat:relative_orbit.title Relative Orbit\n", + "sat:relative_orbit.minimum 1\n", + "sat:relative_orbit.description Satellite relative orbit number\n", + "sar:instrument_mode.enum [EW, IW, SM]\n", + "sar:instrument_mode.type string\n", + "sar:instrument_mode.title Instrument mode\n", + "sar:instrument_mode.description SAR instrument mode" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_props = pd.json_normalize(df[\"properties\"])\n", + "df_props.transpose()" + ] + }, + { + "cell_type": "markdown", + "id": "2c89e8dd-4421-464f-9d17-fe90c56fc21d", + "metadata": {}, + "source": [ + "To access **queryables for a specific collection**:" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "120812a3-12ef-4c03-9746-4ca760dd953a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/queryables\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
$idtypetitle$schemapropertiesadditionalProperties
0https://stac.dataspace.copernicus.eu/v1/collec...objectSTAC Queryables.http://json-schema.org/draft-07/schema#{'id': {'type': 'string', 'title': 'Item ID', ...True
\n", + "
" + ], + "text/plain": [ + " $id type \\\n", + "0 https://stac.dataspace.copernicus.eu/v1/collec... object \n", + "\n", + " title $schema \\\n", + "0 STAC Queryables. http://json-schema.org/draft-07/schema# \n", + "\n", + " properties additionalProperties \n", + "0 {'id': {'type': 'string', 'title': 'Item ID', ... True " + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "collection_id = \"sentinel-2-l2a\"\n", + "\n", + "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}/queryables\"\n", + "\n", + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "df = pd.DataFrame([json])\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "2f6a3b99-fb74-40f2-b845-8a87329782f7", + "metadata": {}, + "source": [ + "To access its properties:" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "95141c91-36a2-4eb2-9d4a-eae041c85623", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
sentinel-2-l2a
id.typestring
id.titleItem ID
id.minLength1
id.descriptionItem identifier
datetime.typestring
datetime.titleAcquired
datetime.formatdate-time
datetime.pattern(\\+00:00|Z)$
datetime.descriptionDatetime
geometry.$refhttps://geojson.org/schema/Feature.json
geometry.titleItem Geometry
geometry.descriptionItem Geometry
platform.enum[sentinel-2a, sentinel-2b, sentinel-2c]
platform.typestring
platform.titlePlatform
platform.descriptionSatellite platform identifier
grid:code.typestring
grid:code.titleGrid Code
grid:code.pattern^[A-Z0-9]+-[-_.A-Za-z0-9]+$
grid:code.descriptionGrid Code
published.typestring
published.titlePublished
published.formatdate-time
published.descriptionPublication date and time of a product in the ...
eo:snow_cover.typenumber
eo:snow_cover.titleSnow Cover
eo:snow_cover.maximum100
eo:snow_cover.minimum0
eo:snow_cover.descriptionSnow cover in percent
eo:cloud_cover.typenumber
eo:cloud_cover.titleCloud Cover
eo:cloud_cover.maximum100
eo:cloud_cover.minimum0
eo:cloud_cover.descriptionCloud cover in percent
sat:orbit_state.enum[ascending, descending, geostationary]
sat:orbit_state.typestring
sat:orbit_state.titleOrbit State
sat:orbit_state.descriptionThe state of the orbit: ascending or descendin...
processing:version.typestring
processing:version.titleProcessing Version
processing:version.descriptionWhich software/processor version was used to g...
sat:relative_orbit.typeinteger
sat:relative_orbit.titleRelative Orbit
sat:relative_orbit.minimum1
sat:relative_orbit.descriptionSatellite relative orbit number
\n", + "
" + ], + "text/plain": [ + " sentinel-2-l2a\n", + "id.type string\n", + "id.title Item ID\n", + "id.minLength 1\n", + "id.description Item identifier\n", + "datetime.type string\n", + "datetime.title Acquired\n", + "datetime.format date-time\n", + "datetime.pattern (\\+00:00|Z)$\n", + "datetime.description Datetime\n", + "geometry.$ref https://geojson.org/schema/Feature.json\n", + "geometry.title Item Geometry\n", + "geometry.description Item Geometry\n", + "platform.enum [sentinel-2a, sentinel-2b, sentinel-2c]\n", + "platform.type string\n", + "platform.title Platform\n", + "platform.description Satellite platform identifier\n", + "grid:code.type string\n", + "grid:code.title Grid Code\n", + "grid:code.pattern ^[A-Z0-9]+-[-_.A-Za-z0-9]+$\n", + "grid:code.description Grid Code\n", + "published.type string\n", + "published.title Published\n", + "published.format date-time\n", + "published.description Publication date and time of a product in the ...\n", + "eo:snow_cover.type number\n", + "eo:snow_cover.title Snow Cover\n", + "eo:snow_cover.maximum 100\n", + "eo:snow_cover.minimum 0\n", + "eo:snow_cover.description Snow cover in percent\n", + "eo:cloud_cover.type number\n", + "eo:cloud_cover.title Cloud Cover\n", + "eo:cloud_cover.maximum 100\n", + "eo:cloud_cover.minimum 0\n", + "eo:cloud_cover.description Cloud cover in percent\n", + "sat:orbit_state.enum [ascending, descending, geostationary]\n", + "sat:orbit_state.type string\n", + "sat:orbit_state.title Orbit State\n", + "sat:orbit_state.description The state of the orbit: ascending or descendin...\n", + "processing:version.type string\n", + "processing:version.title Processing Version\n", + "processing:version.description Which software/processor version was used to g...\n", + "sat:relative_orbit.type integer\n", + "sat:relative_orbit.title Relative Orbit\n", + "sat:relative_orbit.minimum 1\n", + "sat:relative_orbit.description Satellite relative orbit number" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_props = pd.json_normalize(df[\"properties\"])\n", + "df_props = df_props.transpose()\n", + "df_props.columns = [f\"{collection_id}\"]\n", + "df_props" + ] + }, + { + "cell_type": "markdown", + "id": "4ff006fe-333c-4d47-920c-75efa1ded4bc", + "metadata": {}, + "source": [ + "## **Specific Items**\n", + "\n", + "This section is dedicated to retrieving and exploring **individual items** within a collection, including accessing their metadata, properties, spatial and temporal information, and associated assets." + ] + }, + { + "cell_type": "markdown", + "id": "872dafeb-16da-42a4-89e7-b53ad7e2d864", + "metadata": {}, + "source": [ + "### **Resto**\n", + "\n", + "When using the Resto interface, it is not possible to query a specific product directly by its `id`. Resto only allows searches based on collections and queryable parameters (e.g., `productType`, `cloudCover`, `processingLevel`)." + ] + }, + { + "cell_type": "markdown", + "id": "d671e7c5-f0ef-4a4b-be2e-d0403f96f2b6", + "metadata": {}, + "source": [ + "### **STAC**\n", + "\n", + "Unlike Resto, **STAC allows you to search for a specific product using its unique `id`**. You can query the collection and retrieve the full metadata of that item." + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "2a88abd4-fc8b-430c-9c26-e3a2d3e7e54d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items/S2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_20251229T111511\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
idS2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_2...
bbox[23.940406316632895, 53.123645037009204, 25.45...
typeFeature
links[{'rel': 'collection', 'type': 'application/js...
assets{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...
geometry{'type': 'Polygon', 'coordinates': [[[25.45795...
collectionsentinel-2-l2a
properties{'gsd': 10, 'created': '2025-12-29T12:00:34.00...
stac_extensions[https://cs-si.github.io/eopf-stac-extension/v...
stac_version1.1.0
\n", + "
" + ], + "text/plain": [ + " 0\n", + "id S2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_2...\n", + "bbox [23.940406316632895, 53.123645037009204, 25.45...\n", + "type Feature\n", + "links [{'rel': 'collection', 'type': 'application/js...\n", + "assets {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...\n", + "geometry {'type': 'Polygon', 'coordinates': [[[25.45795...\n", + "collection sentinel-2-l2a\n", + "properties {'gsd': 10, 'created': '2025-12-29T12:00:34.00...\n", + "stac_extensions [https://cs-si.github.io/eopf-stac-extension/v...\n", + "stac_version 1.1.0" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "item_id = \"S2C_MSIL2A_20251229T094421_N0511_R036_T35ULV_20251229T111511\"\n", + "collection_id = \"sentinel-2-l2a\"\n", + "\n", + "stac_url = f\"https://stac.dataspace.copernicus.eu/v1/collections/{collection_id}/items/{item_id}\"\n", + "\n", + "json = requests.get(stac_url).json()\n", + "\n", + "print(f\"HTTPS Request: {stac_url}\")\n", + "\n", + "df = pd.DataFrame([json])\n", + "df.transpose()" + ] + }, + { + "cell_type": "markdown", + "id": "4ff1ddcd-eb2f-41b2-a13a-2bace824835c", + "metadata": {}, + "source": [ + "To access its properties:" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "8b17fff1-4b19-4ff3-b7d0-56dc71b46b54", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
gsd10
created2025-12-29T12:00:34.000000Z
expires9999-01-01T00:00:00.000000Z
updated2025-12-29T12:07:04.465575Z
datetime2025-12-29T09:44:21.025000Z
platformsentinel-2c
grid:codeMGRS-35ULV
published2025-12-29T12:04:27.641533Z
statistics{'water': 0.009615, 'nodata': 28.0182, 'dark_a...
instruments[msi]
auth:schemes{'s3': {'type': 's3'}, 'oidc': {'type': 'openI...
end_datetime2025-12-29T09:44:21.025000Z
product:typeS2MSI2A
view:azimuth289.976841
constellationsentinel-2
eo:snow_cover0.0
eo:cloud_cover99.62
start_datetime2025-12-29T09:44:21.025000Z
sat:orbit_statedescending
storage:schemes{'cdse-s3': {'type': 'custom-s3', 'title': 'Co...
eopf:datatake_idGS2C_20251229T094421_006870_N05.11
processing:levelL2
view:sun_azimuth171.251219
eopf:datastrip_idS2C_OPER_MSI_L2A_DS_2CPS_20251229T111511_S2025...
processing:version05.11
product:timelinessPT24H
sat:absolute_orbit6870
sat:relative_orbit36
view:sun_elevation12.743069
processing:datetime2025-12-29T11:15:11.000000Z
processing:facilityESA
processing:software{'eometadatatool': '251021130925+dirty'}
eopf:instrument_modeINS-NOBS
eopf:origin_datetime2025-12-29T12:00:34.000000Z
view:incidence_angle8.734348
product:timeliness_categoryNRT
sat:platform_international_designator2024-157A
\n", + "
" + ], + "text/plain": [ + " 0\n", + "gsd 10\n", + "created 2025-12-29T12:00:34.000000Z\n", + "expires 9999-01-01T00:00:00.000000Z\n", + "updated 2025-12-29T12:07:04.465575Z\n", + "datetime 2025-12-29T09:44:21.025000Z\n", + "platform sentinel-2c\n", + "grid:code MGRS-35ULV\n", + "published 2025-12-29T12:04:27.641533Z\n", + "statistics {'water': 0.009615, 'nodata': 28.0182, 'dark_a...\n", + "instruments [msi]\n", + "auth:schemes {'s3': {'type': 's3'}, 'oidc': {'type': 'openI...\n", + "end_datetime 2025-12-29T09:44:21.025000Z\n", + "product:type S2MSI2A\n", + "view:azimuth 289.976841\n", + "constellation sentinel-2\n", + "eo:snow_cover 0.0\n", + "eo:cloud_cover 99.62\n", + "start_datetime 2025-12-29T09:44:21.025000Z\n", + "sat:orbit_state descending\n", + "storage:schemes {'cdse-s3': {'type': 'custom-s3', 'title': 'Co...\n", + "eopf:datatake_id GS2C_20251229T094421_006870_N05.11\n", + "processing:level L2\n", + "view:sun_azimuth 171.251219\n", + "eopf:datastrip_id S2C_OPER_MSI_L2A_DS_2CPS_20251229T111511_S2025...\n", + "processing:version 05.11\n", + "product:timeliness PT24H\n", + "sat:absolute_orbit 6870\n", + "sat:relative_orbit 36\n", + "view:sun_elevation 12.743069\n", + "processing:datetime 2025-12-29T11:15:11.000000Z\n", + "processing:facility ESA\n", + "processing:software {'eometadatatool': '251021130925+dirty'}\n", + "eopf:instrument_mode INS-NOBS\n", + "eopf:origin_datetime 2025-12-29T12:00:34.000000Z\n", + "view:incidence_angle 8.734348\n", + "product:timeliness_category NRT\n", + "sat:platform_international_designator 2024-157A" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_features = pd.DataFrame([json['properties']])\n", + "df_features.transpose()" + ] + }, + { + "cell_type": "markdown", + "id": "cd40d159-68cf-4f6f-ab10-c70b6e10b8fd", + "metadata": {}, + "source": [ + "STAC items may contain nested metadata within the properties field. For example, statistics or other detailed attributes may be stored in sub-dictionaries. The code below demonstrates how to extract such nested information:" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "3034ccc0-3f6d-41f1-84d1-88f433efbda3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
water0.009615
nodata28.018200
dark_area0.003554
vegetation0.000000
thin_cirrus0.001378
cloud_shadow0.357159
unclassified0.010159
not_vegetated0.001065
high_proba_clouds91.287762
medium_proba_clouds8.329306
saturated_defective0.000000
\n", + "
" + ], + "text/plain": [ + " 0\n", + "water 0.009615\n", + "nodata 28.018200\n", + "dark_area 0.003554\n", + "vegetation 0.000000\n", + "thin_cirrus 0.001378\n", + "cloud_shadow 0.357159\n", + "unclassified 0.010159\n", + "not_vegetated 0.001065\n", + "high_proba_clouds 91.287762\n", + "medium_proba_clouds 8.329306\n", + "saturated_defective 0.000000" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_stats = pd.json_normalize(json['properties']['statistics'])\n", + "df_stats.transpose()" + ] + }, + { + "cell_type": "markdown", + "id": "809d70d2-e383-434e-a50b-a99eed11c8c9", + "metadata": {}, + "source": [ + "To access geometry:" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "822f601c-f1e8-4b3d-bffd-09a21628fa53", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
lonlat
025.45795354.137210
124.89191553.139700
224.01091153.123645
323.94040654.109206
425.45795354.137210
\n", + "
" + ], + "text/plain": [ + " lon lat\n", + "0 25.457953 54.137210\n", + "1 24.891915 53.139700\n", + "2 24.010911 53.123645\n", + "3 23.940406 54.109206\n", + "4 25.457953 54.137210" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_geometry = pd.DataFrame(json['geometry']['coordinates'][0], columns=['lon', 'lat'])\n", + "df_geometry" + ] + }, + { + "cell_type": "markdown", + "id": "2c36a40e-7f16-473b-9951-15974f6d6fbd", + "metadata": {}, + "source": [ + "In STAC, each item contains **assets** that describes the actual data files associated with the product. Assets include URLs to the data, file type, roles, and other metadata." + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "21643688-9093-4a32-a222-7de9ed7dd565", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
0
AOT_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
AOT_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
AOT_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B01_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B01_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B02_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B02_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B02_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B03_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B03_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B03_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B04_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B04_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B04_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B05_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B05_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B06_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B06_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B07_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B07_60m{'gsd': 60, 'href': 's3://eodata/Sentinel-2/MS...
B08_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B09_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B11_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B11_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B12_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B12_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B8A_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
B8A_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
Product{'href': 'https://download.dataspace.copernicu...
SCL_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
SCL_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
TCI_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
TCI_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
TCI_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
WVP_10m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
WVP_20m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
WVP_60m{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
thumbnail{'href': 'https://datahub.creodias.eu/odata/v1...
safe_manifest{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
granule_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
inspire_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
product_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
datastrip_metadata{'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...
\n", + "
" + ], + "text/plain": [ + " 0\n", + "AOT_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "AOT_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "AOT_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B01_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B01_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B02_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B02_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B02_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B03_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B03_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B03_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B04_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B04_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B04_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B05_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B05_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B06_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B06_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B07_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B07_60m {'gsd': 60, 'href': 's3://eodata/Sentinel-2/MS...\n", + "B08_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B09_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B11_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B11_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B12_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B12_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B8A_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "B8A_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "Product {'href': 'https://download.dataspace.copernicu...\n", + "SCL_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "SCL_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "TCI_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "TCI_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "TCI_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "WVP_10m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "WVP_20m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "WVP_60m {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "thumbnail {'href': 'https://datahub.creodias.eu/odata/v1...\n", + "safe_manifest {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "granule_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "inspire_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "product_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/...\n", + "datastrip_metadata {'href': 's3://eodata/Sentinel-2/MSI/L2A/2025/..." + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_assets = pd.DataFrame([json['assets']])\n", + "df_assets.transpose()" + ] + }, + { + "cell_type": "markdown", + "id": "c990722c-57d3-441a-9d26-7e3c0ceb88f5", + "metadata": {}, + "source": [ + "## **Filters & Extensions**" + ] + }, + { + "cell_type": "markdown", + "id": "03c80a48-7c4a-4693-9b3d-66a554ea2466", + "metadata": {}, + "source": [ + "### **Resto**\n", + "\n", + "Resto does not provide an advanced filtering syntax. Queries are constructed by combining URL parameters.\n", + "\n", + "**Filtering** can be done by attributes, spatial extent, or datetime, and you can include **sorting** options or **limits** on the number of items returned (default is 20). Single values use `param=value`, ranges use `param=[minvalue,maxvalue]`, and multiple parameters are joined with `&`.\n", + "\n", + "Because very general queries may return a large number of results, it is recommended to restrict queries geographically or temporally to avoid exceeding the maximum of 200,000 items. For long date ranges, splitting queries by year or smaller intervals helps maintain performance. **Sorting** is controlled using `sortParam` (e.g., `startDate`, `completionDate`, `published`, `updated`) and `sortOrder` (`ascending` or `descending`).\n", + "\n", + "Some parameters are satellite-specific, such as `cloudCover` (for optical satellites) or `polarisation` (for radar satellites), while others like `instrument` or `productType` depend on the satellite or service. Note that certain features, such as `cloudCover`, may be missing or ambiguous in some products, so filtering by them requires caution.\n", + "\n", + "For full details on all parameters and usage, see the [OpenSearch Catalogue API documentation](https://documentation.dataspace.copernicus.eu/APIs/OpenSearch.html)." + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "30511ef4-e2db-487c-a897-235448dc03a5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/CLMS/search.json?productType=soil_water_index\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Feature1a63419d-3369-4655-89ad-c372852728f1{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
1Featurec1caf30e-8348-43b6-b693-d2a5b4b213a9{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
2Feature23f992f3-f12e-4eda-9634-4d56950aeb14{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
3Featured1bfa68f-1fc9-434a-952e-5e3ff96f6d34{'type': 'Polygon', 'coordinates': [[[-180.0, ...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
4Featurefe327b4a-2af9-4fc0-9645-df42020e6924{'type': 'Polygon', 'coordinates': [[[-49.9790...{'collection': 'CLMS', 'status': 'ONLINE', 'li...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature 1a63419d-3369-4655-89ad-c372852728f1 \n", + "1 Feature c1caf30e-8348-43b6-b693-d2a5b4b213a9 \n", + "2 Feature 23f992f3-f12e-4eda-9634-4d56950aeb14 \n", + "3 Feature d1bfa68f-1fc9-434a-952e-5e3ff96f6d34 \n", + "4 Feature fe327b4a-2af9-4fc0-9645-df42020e6924 \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", + "1 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", + "2 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", + "3 {'type': 'Polygon', 'coordinates': [[[-180.0, ... \n", + "4 {'type': 'Polygon', 'coordinates': [[[-49.9790... \n", + "\n", + " properties \n", + "0 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "1 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "2 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "3 {'collection': 'CLMS', 'status': 'ONLINE', 'li... \n", + "4 {'collection': 'CLMS', 'status': 'ONLINE', 'li... " + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "collection_name = \"CLMS\"\n", + "product_type = \"soil_water_index\"\n", + "\n", + "resto_url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection_name}/search.json?productType={product_type}\"\n", + "\n", + "json = requests.get(resto_url).json()\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df = pd.DataFrame.from_dict(json['features'])\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "id": "4da67fd8-adc6-4a3f-a4b7-b05dad222abf", + "metadata": {}, + "source": [ + "#### **Examples**\n", + "\n", + "Knowing this, we can create a simple function that follows this structure and focuses specifically on filtering parameters. This function can help streamline queries by automatically constructing the URL with the desired attributes, spatial or temporal constraints, and sorting options." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "885a9eb3-f2b5-4f3e-b7aa-93c1cad21de8", + "metadata": {}, + "outputs": [], + "source": [ + "def resto_search(collection, filters=None):\n", + " \"\"\"\n", + " Executes a query to the OpenSearch Catalogue API for a given collection.\n", + "\n", + " Args:\n", + " collection (str): The name of the collection, e.g., \"Sentinel2\".\n", + " filters (dict, optional): A dictionary of filtering parameters, for example:\n", + " {\n", + " \"cloudCover\": \"[0,10]\",\n", + " \"startDate\": \"2021-06-21T00:00:00Z\",\n", + " \"completionDate\": \"2021-09-22T23:59:59Z\",\n", + " \"lon\": 21.01,\n", + " \"lat\": 52.22\n", + " }\n", + " These parameters are translated into URL query parameters.\n", + "\n", + " Returns:\n", + " pd.DataFrame: A DataFrame containing all the fields returned for each feature\n", + " in the collection, including `type`, `id`, `geometry`, and `properties`. \n", + " If no items are found, returns an empty DataFrame.\n", + " \"\"\"\n", + " base_url = f\"https://catalogue.dataspace.copernicus.eu/resto/api/collections/{collection}/search.json\"\n", + " \n", + " filters = filters or {}\n", + " \n", + " response = requests.get(base_url, params=filters)\n", + " json = response.json()\n", + " features = json.get(\"features\", [])\n", + "\n", + " df = pd.DataFrame.from_dict(json['features'])\n", + " \n", + " return df, response.url" + ] + }, + { + "cell_type": "markdown", + "id": "d6c71530-9ded-456c-a859-1a601eb331ea", + "metadata": {}, + "source": [ + "The code below executes a query to retrieve twenty Sentinel-2 products acquired in January 2025, sorted by `startDate`:" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "255e43db-c87a-4540-8b84-6661c2ea12fe", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?startDate=2025-01-01T00%3A00%3A00Z&completionDate=2025-01-31T23%3A59%3A59Z&sortParam=startDate&maxRecords=20\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Feature049162f6-29eb-4ae2-9936-d4f4ea5cd0d4{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Feature05c036dd-d6fb-4cf8-a2a8-75d02aa965c9{'type': 'Polygon', 'coordinates': [[[158.0939...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Feature05c92b08-d07a-4f29-9199-809cf3016791{'type': 'Polygon', 'coordinates': [[[157.2826...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Feature0a319264-4bb4-4157-af83-0839dd1a3d12{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Feature0ad4ff10-1bfb-4f9f-88c5-fcf1406c35d3{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
5Feature0c442108-83f6-4c85-bc60-7e8743ce434e{'type': 'Polygon', 'coordinates': [[[156.2813...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
6Feature12db9bc3-a33d-4f51-ad55-0b0350d75549{'type': 'Polygon', 'coordinates': [[[156.2833...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
7Feature1abd0faf-5dab-4bdf-950b-9589a80e1430{'type': 'Polygon', 'coordinates': [[[157.1880...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
8Feature24e5c8a4-32ce-4011-8665-37aabccd5a11{'type': 'Polygon', 'coordinates': [[[158.0939...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
9Feature313ee18d-74ff-476e-b8cd-0eab9e5930e2{'type': 'Polygon', 'coordinates': [[[157.2826...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
10Feature4865edf9-34a0-4996-92f7-4a8b226cc16e{'type': 'Polygon', 'coordinates': [[[157.1880...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
11Feature59eb60f1-b034-429c-a82d-82a75ce079a5{'type': 'Polygon', 'coordinates': [[[158.3183...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
12Feature73a717b1-8cab-48d7-ad4e-21414068e43b{'type': 'Polygon', 'coordinates': [[[156.0589...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
13Feature7495d076-4343-4dda-9ad4-9f7275e7a800{'type': 'Polygon', 'coordinates': [[[158.2868...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
14Feature81494ebf-37c9-41e8-ba14-11be98078525{'type': 'Polygon', 'coordinates': [[[157.7636...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
15Feature8776d69e-ae4e-4e1c-a063-9f8630d3c284{'type': 'Polygon', 'coordinates': [[[156.2833...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
16Feature8e61f3b7-2f5a-4c2c-9a59-0fd05e35f74f{'type': 'Polygon', 'coordinates': [[[155.8609...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
17Featureaf3af6a9-ef33-4ba0-9276-241c52aa7292{'type': 'Polygon', 'coordinates': [[[156.0589...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
18Featureb340deb0-edf8-4ab0-bb96-829a99f178be{'type': 'Polygon', 'coordinates': [[[155.8609...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
19Featureb7ed98a9-ec31-4f41-97a3-ccca877ed1be{'type': 'Polygon', 'coordinates': [[[158.1858...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature 049162f6-29eb-4ae2-9936-d4f4ea5cd0d4 \n", + "1 Feature 05c036dd-d6fb-4cf8-a2a8-75d02aa965c9 \n", + "2 Feature 05c92b08-d07a-4f29-9199-809cf3016791 \n", + "3 Feature 0a319264-4bb4-4157-af83-0839dd1a3d12 \n", + "4 Feature 0ad4ff10-1bfb-4f9f-88c5-fcf1406c35d3 \n", + "5 Feature 0c442108-83f6-4c85-bc60-7e8743ce434e \n", + "6 Feature 12db9bc3-a33d-4f51-ad55-0b0350d75549 \n", + "7 Feature 1abd0faf-5dab-4bdf-950b-9589a80e1430 \n", + "8 Feature 24e5c8a4-32ce-4011-8665-37aabccd5a11 \n", + "9 Feature 313ee18d-74ff-476e-b8cd-0eab9e5930e2 \n", + "10 Feature 4865edf9-34a0-4996-92f7-4a8b226cc16e \n", + "11 Feature 59eb60f1-b034-429c-a82d-82a75ce079a5 \n", + "12 Feature 73a717b1-8cab-48d7-ad4e-21414068e43b \n", + "13 Feature 7495d076-4343-4dda-9ad4-9f7275e7a800 \n", + "14 Feature 81494ebf-37c9-41e8-ba14-11be98078525 \n", + "15 Feature 8776d69e-ae4e-4e1c-a063-9f8630d3c284 \n", + "16 Feature 8e61f3b7-2f5a-4c2c-9a59-0fd05e35f74f \n", + "17 Feature af3af6a9-ef33-4ba0-9276-241c52aa7292 \n", + "18 Feature b340deb0-edf8-4ab0-bb96-829a99f178be \n", + "19 Feature b7ed98a9-ec31-4f41-97a3-ccca877ed1be \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", + "1 {'type': 'Polygon', 'coordinates': [[[158.0939... \n", + "2 {'type': 'Polygon', 'coordinates': [[[157.2826... \n", + "3 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", + "4 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", + "5 {'type': 'Polygon', 'coordinates': [[[156.2813... \n", + "6 {'type': 'Polygon', 'coordinates': [[[156.2833... \n", + "7 {'type': 'Polygon', 'coordinates': [[[157.1880... \n", + "8 {'type': 'Polygon', 'coordinates': [[[158.0939... \n", + "9 {'type': 'Polygon', 'coordinates': [[[157.2826... \n", + "10 {'type': 'Polygon', 'coordinates': [[[157.1880... \n", + "11 {'type': 'Polygon', 'coordinates': [[[158.3183... \n", + "12 {'type': 'Polygon', 'coordinates': [[[156.0589... \n", + "13 {'type': 'Polygon', 'coordinates': [[[158.2868... \n", + "14 {'type': 'Polygon', 'coordinates': [[[157.7636... \n", + "15 {'type': 'Polygon', 'coordinates': [[[156.2833... \n", + "16 {'type': 'Polygon', 'coordinates': [[[155.8609... \n", + "17 {'type': 'Polygon', 'coordinates': [[[156.0589... \n", + "18 {'type': 'Polygon', 'coordinates': [[[155.8609... \n", + "19 {'type': 'Polygon', 'coordinates': [[[158.1858... \n", + "\n", + " properties \n", + "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "5 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "6 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "7 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "8 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "9 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "10 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "11 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "12 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "13 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "14 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "15 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "16 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "17 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "18 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "19 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "filters = {\n", + " \"startDate\": \"2025-01-01T00:00:00Z\",\n", + " \"completionDate\": \"2025-01-31T23:59:59Z\",\n", + " \"sortParam\": \"startDate\",\n", + " \"maxRecords\": \"20\"\n", + "}\n", + "\n", + "df, resto_url = resto_search(\"Sentinel2\", filters)\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "f3dcdad1-caca-428e-b67e-07a3c04814bc", + "metadata": {}, + "source": [ + "To get the next twenty items from the same query, you can add the `page=2` parameter:" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "f7421d44-f367-4925-8237-a382188276b2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?startDate=2025-01-01T00%3A00%3A00Z&completionDate=2025-01-31T23%3A59%3A59Z&sortParam=startDate&maxRecords=20&page=2\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Featurecbff9b4a-f98d-4c6d-ae0d-bba181b35573{'type': 'Polygon', 'coordinates': [[[156.6984...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Featured0f31bf8-0e19-4b78-b7b5-dfcb0367b535{'type': 'Polygon', 'coordinates': [[[156.6984...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Featured198f91e-3e48-4ddf-bd63-725d87400af1{'type': 'Polygon', 'coordinates': [[[156.2813...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Featuree5800cc5-755f-4b71-ab39-75ba2139caa5{'type': 'Polygon', 'coordinates': [[[158.2868...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Featuref9c80d04-202f-40a0-8e8f-bb9093bfd8a7{'type': 'Polygon', 'coordinates': [[[157.7636...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
5Featurefc1324de-6cee-410e-86a1-90de1350a924{'type': 'Polygon', 'coordinates': [[[158.3183...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
6Feature03853cbf-bee1-4738-9169-7074e927c97f{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
7Feature0d99a056-d390-4297-8049-f243c9fcb555{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
8Feature1e6a45d3-fc4a-43d1-b59f-70acccc1bac7{'type': 'Polygon', 'coordinates': [[[154.6712...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
9Feature2467d219-a97c-4533-b616-cb27ad6945ef{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
10Feature28d4c142-40d1-495f-a856-76f706b112ea{'type': 'Polygon', 'coordinates': [[[154.7972...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
11Feature3e7473f3-af16-4829-949f-209bf2adbe15{'type': 'Polygon', 'coordinates': [[[154.6712...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
12Feature3f688831-bb03-41e9-af7a-dcdbae7f64e9{'type': 'Polygon', 'coordinates': [[[157.2027...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
13Feature42f20c25-0fac-42bf-9fba-5b2db370783f{'type': 'Polygon', 'coordinates': [[[154.8852...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
14Feature4af84efd-7b6f-4fee-9ca8-5d64148d1d38{'type': 'Polygon', 'coordinates': [[[157.1290...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
15Feature525f03b7-7d86-487f-b3ca-b7fd838a82b3{'type': 'Polygon', 'coordinates': [[[155.6954...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
16Feature724ace31-18c3-4e52-b240-241173143c20{'type': 'Polygon', 'coordinates': [[[157.2027...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
17Feature8549fff5-18c3-4e77-83cf-2f1ba97eef3f{'type': 'Polygon', 'coordinates': [[[154.8852...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
18Featurebe61cfd9-8269-4208-ad6f-5eca64972b72{'type': 'Polygon', 'coordinates': [[[156.6802...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
19Featured86b077f-1a81-4a44-a9d4-f1d4b20be41e{'type': 'Polygon', 'coordinates': [[[156.6802...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature cbff9b4a-f98d-4c6d-ae0d-bba181b35573 \n", + "1 Feature d0f31bf8-0e19-4b78-b7b5-dfcb0367b535 \n", + "2 Feature d198f91e-3e48-4ddf-bd63-725d87400af1 \n", + "3 Feature e5800cc5-755f-4b71-ab39-75ba2139caa5 \n", + "4 Feature f9c80d04-202f-40a0-8e8f-bb9093bfd8a7 \n", + "5 Feature fc1324de-6cee-410e-86a1-90de1350a924 \n", + "6 Feature 03853cbf-bee1-4738-9169-7074e927c97f \n", + "7 Feature 0d99a056-d390-4297-8049-f243c9fcb555 \n", + "8 Feature 1e6a45d3-fc4a-43d1-b59f-70acccc1bac7 \n", + "9 Feature 2467d219-a97c-4533-b616-cb27ad6945ef \n", + "10 Feature 28d4c142-40d1-495f-a856-76f706b112ea \n", + "11 Feature 3e7473f3-af16-4829-949f-209bf2adbe15 \n", + "12 Feature 3f688831-bb03-41e9-af7a-dcdbae7f64e9 \n", + "13 Feature 42f20c25-0fac-42bf-9fba-5b2db370783f \n", + "14 Feature 4af84efd-7b6f-4fee-9ca8-5d64148d1d38 \n", + "15 Feature 525f03b7-7d86-487f-b3ca-b7fd838a82b3 \n", + "16 Feature 724ace31-18c3-4e52-b240-241173143c20 \n", + "17 Feature 8549fff5-18c3-4e77-83cf-2f1ba97eef3f \n", + "18 Feature be61cfd9-8269-4208-ad6f-5eca64972b72 \n", + "19 Feature d86b077f-1a81-4a44-a9d4-f1d4b20be41e \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[156.6984... \n", + "1 {'type': 'Polygon', 'coordinates': [[[156.6984... \n", + "2 {'type': 'Polygon', 'coordinates': [[[156.2813... \n", + "3 {'type': 'Polygon', 'coordinates': [[[158.2868... \n", + "4 {'type': 'Polygon', 'coordinates': [[[157.7636... \n", + "5 {'type': 'Polygon', 'coordinates': [[[158.3183... \n", + "6 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", + "7 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", + "8 {'type': 'Polygon', 'coordinates': [[[154.6712... \n", + "9 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", + "10 {'type': 'Polygon', 'coordinates': [[[154.7972... \n", + "11 {'type': 'Polygon', 'coordinates': [[[154.6712... \n", + "12 {'type': 'Polygon', 'coordinates': [[[157.2027... \n", + "13 {'type': 'Polygon', 'coordinates': [[[154.8852... \n", + "14 {'type': 'Polygon', 'coordinates': [[[157.1290... \n", + "15 {'type': 'Polygon', 'coordinates': [[[155.6954... \n", + "16 {'type': 'Polygon', 'coordinates': [[[157.2027... \n", + "17 {'type': 'Polygon', 'coordinates': [[[154.8852... \n", + "18 {'type': 'Polygon', 'coordinates': [[[156.6802... \n", + "19 {'type': 'Polygon', 'coordinates': [[[156.6802... \n", + "\n", + " properties \n", + "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "5 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "6 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "7 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "8 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "9 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "10 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "11 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "12 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "13 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "14 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "15 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "16 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "17 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "18 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "19 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "filters = {\n", + " \"startDate\": \"2025-01-01T00:00:00Z\",\n", + " \"completionDate\": \"2025-01-31T23:59:59Z\",\n", + " \"sortParam\": \"startDate\",\n", + " \"maxRecords\": \"20\",\n", + " \"page\": \"2\"\n", + "}\n", + "\n", + "df, resto_url = resto_search(\"Sentinel2\", filters)\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "67d3a54f-4cc8-4909-a11a-68a4af245dd8", + "metadata": {}, + "source": [ + "The code below retrieves Sentinel-2 products with cloud cover between 0% and 10%, acquired between June 21, 2021 and September 22, 2021, and located near a specific geographic point:" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "03ab9ca2-4156-4c12-9b3c-7c6a2b0b683f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?cloudCover=%5B0%2C10%5D&startDate=2021-06-21T00%3A00%3A00Z&completionDate=2021-09-22T23%3A59%3A59Z&lon=21.01&lat=52.22\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Feature04008903-8704-437b-a8b8-d0942d7fa19c{'type': 'Polygon', 'coordinates': [[[22.45053...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Feature545a3805-d55b-4ce0-b088-3e259072f934{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Featuref5d8f083-77f3-432a-bd8d-cc816ddd1300{'type': 'Polygon', 'coordinates': [[[22.45053...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Feature8eeb4008-c8e9-4ddc-998c-b22f259d5de6{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Feature97e26e1a-361d-4e37-b30c-5eba50506187{'type': 'Polygon', 'coordinates': [[[21.96038...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
5Featurecc1dbd1e-9b1b-4ea0-9b72-08be8bc7ab47{'type': 'Polygon', 'coordinates': [[[19.50094...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
6Featureae2a69fd-1ad2-4b20-b9e9-d36b2ec05806{'type': 'Polygon', 'coordinates': [[[21.96038...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
7Feature83d9e0ae-61f2-4a27-beca-2c428715cf12{'type': 'Polygon', 'coordinates': [[[21.96424...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
8Featuref09bd83c-7d3a-4823-8e63-b5899fa090b3{'type': 'Polygon', 'coordinates': [[[21.96360...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
9Featurea3f8f7e9-2276-54e5-b202-dcda07c35839{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
10Feature9823f638-51d5-4eb3-ac55-4f62532a2dc4{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
11Featurec9e836ee-8b7c-403b-bca2-d59074783d98{'type': 'Polygon', 'coordinates': [[[21.96014...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
12Featureed68db23-4c0f-4585-8693-6f022b5980c8{'type': 'Polygon', 'coordinates': [[[22.45478...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
13Featurea1009dac-c58d-4b9a-b0ec-1db868c2e3bd{'type': 'Polygon', 'coordinates': [[[21.96014...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
14Feature80eef4fb-9f20-4728-848c-8d678aba60c7{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
15Featurecf68685c-e9e3-439c-97fc-90025a6e4513{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
16Feature84ae8070-005b-4ffc-9af1-ad9aca5ae26b{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
17Featurefbb4d27b-d3ff-40aa-8424-06ceaee8f375{'type': 'Polygon', 'coordinates': [[[19.53152...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
18Featuref130d80d-dd19-59cf-a7ff-f85495d7dd21{'type': 'Polygon', 'coordinates': [[[20.99970...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
19Featureea169cc8-83bd-48b0-8247-f5769ec1ebef{'type': 'Polygon', 'coordinates': [[[22.44973...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature 04008903-8704-437b-a8b8-d0942d7fa19c \n", + "1 Feature 545a3805-d55b-4ce0-b088-3e259072f934 \n", + "2 Feature f5d8f083-77f3-432a-bd8d-cc816ddd1300 \n", + "3 Feature 8eeb4008-c8e9-4ddc-998c-b22f259d5de6 \n", + "4 Feature 97e26e1a-361d-4e37-b30c-5eba50506187 \n", + "5 Feature cc1dbd1e-9b1b-4ea0-9b72-08be8bc7ab47 \n", + "6 Feature ae2a69fd-1ad2-4b20-b9e9-d36b2ec05806 \n", + "7 Feature 83d9e0ae-61f2-4a27-beca-2c428715cf12 \n", + "8 Feature f09bd83c-7d3a-4823-8e63-b5899fa090b3 \n", + "9 Feature a3f8f7e9-2276-54e5-b202-dcda07c35839 \n", + "10 Feature 9823f638-51d5-4eb3-ac55-4f62532a2dc4 \n", + "11 Feature c9e836ee-8b7c-403b-bca2-d59074783d98 \n", + "12 Feature ed68db23-4c0f-4585-8693-6f022b5980c8 \n", + "13 Feature a1009dac-c58d-4b9a-b0ec-1db868c2e3bd \n", + "14 Feature 80eef4fb-9f20-4728-848c-8d678aba60c7 \n", + "15 Feature cf68685c-e9e3-439c-97fc-90025a6e4513 \n", + "16 Feature 84ae8070-005b-4ffc-9af1-ad9aca5ae26b \n", + "17 Feature fbb4d27b-d3ff-40aa-8424-06ceaee8f375 \n", + "18 Feature f130d80d-dd19-59cf-a7ff-f85495d7dd21 \n", + "19 Feature ea169cc8-83bd-48b0-8247-f5769ec1ebef \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[22.45053... \n", + "1 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", + "2 {'type': 'Polygon', 'coordinates': [[[22.45053... \n", + "3 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", + "4 {'type': 'Polygon', 'coordinates': [[[21.96038... \n", + "5 {'type': 'Polygon', 'coordinates': [[[19.50094... \n", + "6 {'type': 'Polygon', 'coordinates': [[[21.96038... \n", + "7 {'type': 'Polygon', 'coordinates': [[[21.96424... \n", + "8 {'type': 'Polygon', 'coordinates': [[[21.96360... \n", + "9 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", + "10 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", + "11 {'type': 'Polygon', 'coordinates': [[[21.96014... \n", + "12 {'type': 'Polygon', 'coordinates': [[[22.45478... \n", + "13 {'type': 'Polygon', 'coordinates': [[[21.96014... \n", + "14 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", + "15 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", + "16 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", + "17 {'type': 'Polygon', 'coordinates': [[[19.53152... \n", + "18 {'type': 'Polygon', 'coordinates': [[[20.99970... \n", + "19 {'type': 'Polygon', 'coordinates': [[[22.44973... \n", + "\n", + " properties \n", + "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "5 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "6 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "7 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "8 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "9 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "10 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "11 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "12 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "13 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "14 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "15 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "16 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "17 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "18 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "19 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "filters = {\n", + " \"cloudCover\": \"[0,10]\",\n", + " \"startDate\": \"2021-06-21T00:00:00Z\",\n", + " \"completionDate\": \"2021-09-22T23:59:59Z\",\n", + " \"lon\": 21.01,\n", + " \"lat\": 52.22\n", + "}\n", + "\n", + "df, resto_url = resto_search(\"Sentinel2\", filters)\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "1417a59d-4d91-4694-b302-d907a5cc4ac7", + "metadata": {}, + "source": [ + "The code below retrieves up to ten Sentinel-2 products of `S2MSI2A` product type with cloud cover between 0% and 10%, acquired between June 11 and June 22, 2022, and within a geographic bounding box." + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "1d092fff-d944-4462-bd49-291f6326437a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?productType=S2MSI2A&cloudCover=%5B0%2C10%5D&startDate=2022-06-11T00%3A00%3A00Z&completionDate=2022-06-22T23%3A59%3A59Z&maxRecords=10&box=4%2C51%2C4.5%2C52\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Feature5ecd6532-0200-497d-a7c1-776ff2738d1a{'type': 'Polygon', 'coordinates': [[[4.436812...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
1Feature5831e264-e17e-4af9-a1f7-d6de71a8a038{'type': 'Polygon', 'coordinates': [[[4.436848...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
2Featureef6df284-3d63-4821-8dc2-f86825dfde0f{'type': 'Polygon', 'coordinates': [[[4.064087...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
3Feature1b32f7ad-ec32-45a1-807b-9adbd510e688{'type': 'Polygon', 'coordinates': [[[5.968085...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
4Feature530aeeb3-b889-4596-9c09-3d2e917e9aa4{'type': 'Polygon', 'coordinates': [[[4.325619...{'collection': 'SENTINEL-2', 'status': 'ONLINE...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature 5ecd6532-0200-497d-a7c1-776ff2738d1a \n", + "1 Feature 5831e264-e17e-4af9-a1f7-d6de71a8a038 \n", + "2 Feature ef6df284-3d63-4821-8dc2-f86825dfde0f \n", + "3 Feature 1b32f7ad-ec32-45a1-807b-9adbd510e688 \n", + "4 Feature 530aeeb3-b889-4596-9c09-3d2e917e9aa4 \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[4.436812... \n", + "1 {'type': 'Polygon', 'coordinates': [[[4.436848... \n", + "2 {'type': 'Polygon', 'coordinates': [[[4.064087... \n", + "3 {'type': 'Polygon', 'coordinates': [[[5.968085... \n", + "4 {'type': 'Polygon', 'coordinates': [[[4.325619... \n", + "\n", + " properties \n", + "0 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "1 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "2 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "3 {'collection': 'SENTINEL-2', 'status': 'ONLINE... \n", + "4 {'collection': 'SENTINEL-2', 'status': 'ONLINE... " + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "filters = {\n", + " \"productType\": \"S2MSI2A\",\n", + " \"cloudCover\": \"[0,10]\",\n", + " \"startDate\": \"2022-06-11T00:00:00Z\",\n", + " \"completionDate\": \"2022-06-22T23:59:59Z\",\n", + " \"maxRecords\": 10,\n", + " \"box\": \"4,51,4.5,52\"\n", + "}\n", + "\n", + "df, resto_url = resto_search(\"Sentinel2\", filters)\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "01b6dc8a-b50e-4cda-8e2e-8a5f3aeb6e4c", + "metadata": {}, + "source": [ + "The code below retrieves Sentinel-1 products of type `IW_GRDH_1S` with `VV&VH` polarisation:" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "9b030df2-918a-488b-9bb9-e9071b471f51", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS Request: https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel1/search.json?polarisationChannels=VV%26VH&productType=IW_GRDH_1S\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
typeidgeometryproperties
0Featureda70cfa7-8b3b-514a-a807-efd43a2d9652{'type': 'Polygon', 'coordinates': [[[17.75591...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
1Feature02036627-0bbd-5533-b92f-5229818a9b57{'type': 'Polygon', 'coordinates': [[[19.06133...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
2Feature9aab3f54-50d9-59f7-8194-e5f0e7539841{'type': 'Polygon', 'coordinates': [[[20.65879...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
3Featurec7bad712-83bd-5b02-bdfa-be0665ed820a{'type': 'Polygon', 'coordinates': [[[2.281085...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
4Feature84a3d05a-119e-5d2b-8297-4e23b801361b{'type': 'Polygon', 'coordinates': [[[-0.01425...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
5Featurebfd85b2c-1d8d-5768-bed5-b5581faed35c{'type': 'Polygon', 'coordinates': [[[11.97771...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
6Feature69b6f0a6-f5bc-5be0-8899-c0ecab4bccd9{'type': 'Polygon', 'coordinates': [[[-9.38965...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
7Feature6064f952-7b8f-59c1-919f-18173a6394ad{'type': 'Polygon', 'coordinates': [[[84.86653...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
8Featured40fa39b-a849-53e4-99c8-2e1839370628{'type': 'Polygon', 'coordinates': [[[46.27384...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
9Feature165d3b85-e65d-5bbe-9cab-f7bad6fee8e7{'type': 'Polygon', 'coordinates': [[[42.11571...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
10Feature409e8402-7997-556f-8784-71e657ad3604{'type': 'Polygon', 'coordinates': [[[-8.27511...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
11Feature486c8fbf-dbe4-51af-bb36-d50c1e19e6f2{'type': 'Polygon', 'coordinates': [[[20.00865...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
12Feature63b87052-4ee1-5dd7-a917-f58ac80089db{'type': 'Polygon', 'coordinates': [[[-7.18738...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
13Featuref9208ee1-1dab-5b13-a5a0-5fb6f29b4f3b{'type': 'Polygon', 'coordinates': [[[-4.20402...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
14Feature69865c3a-87ae-5392-a7cd-e3cd43690b0e{'type': 'Polygon', 'coordinates': [[[6.677761...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
15Feature0ade07fb-010a-5572-b121-0549cea086e6{'type': 'Polygon', 'coordinates': [[[22.64895...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
16Feature546770e8-aa49-523c-ade6-05cbc57b44de{'type': 'Polygon', 'coordinates': [[[20.51301...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
17Featureb6783847-c4f6-51db-bf71-4fadf26b4d43{'type': 'Polygon', 'coordinates': [[[18.18976...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
18Featuree03a43b5-7b4b-5a83-b5a8-188739344c79{'type': 'Polygon', 'coordinates': [[[-100.043...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
19Featureb0a0c958-fbd7-56a2-a64e-efe5bace332b{'type': 'Polygon', 'coordinates': [[[7.678896...{'collection': 'SENTINEL-1', 'status': 'ONLINE...
\n", + "
" + ], + "text/plain": [ + " type id \\\n", + "0 Feature da70cfa7-8b3b-514a-a807-efd43a2d9652 \n", + "1 Feature 02036627-0bbd-5533-b92f-5229818a9b57 \n", + "2 Feature 9aab3f54-50d9-59f7-8194-e5f0e7539841 \n", + "3 Feature c7bad712-83bd-5b02-bdfa-be0665ed820a \n", + "4 Feature 84a3d05a-119e-5d2b-8297-4e23b801361b \n", + "5 Feature bfd85b2c-1d8d-5768-bed5-b5581faed35c \n", + "6 Feature 69b6f0a6-f5bc-5be0-8899-c0ecab4bccd9 \n", + "7 Feature 6064f952-7b8f-59c1-919f-18173a6394ad \n", + "8 Feature d40fa39b-a849-53e4-99c8-2e1839370628 \n", + "9 Feature 165d3b85-e65d-5bbe-9cab-f7bad6fee8e7 \n", + "10 Feature 409e8402-7997-556f-8784-71e657ad3604 \n", + "11 Feature 486c8fbf-dbe4-51af-bb36-d50c1e19e6f2 \n", + "12 Feature 63b87052-4ee1-5dd7-a917-f58ac80089db \n", + "13 Feature f9208ee1-1dab-5b13-a5a0-5fb6f29b4f3b \n", + "14 Feature 69865c3a-87ae-5392-a7cd-e3cd43690b0e \n", + "15 Feature 0ade07fb-010a-5572-b121-0549cea086e6 \n", + "16 Feature 546770e8-aa49-523c-ade6-05cbc57b44de \n", + "17 Feature b6783847-c4f6-51db-bf71-4fadf26b4d43 \n", + "18 Feature e03a43b5-7b4b-5a83-b5a8-188739344c79 \n", + "19 Feature b0a0c958-fbd7-56a2-a64e-efe5bace332b \n", + "\n", + " geometry \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[17.75591... \n", + "1 {'type': 'Polygon', 'coordinates': [[[19.06133... \n", + "2 {'type': 'Polygon', 'coordinates': [[[20.65879... \n", + "3 {'type': 'Polygon', 'coordinates': [[[2.281085... \n", + "4 {'type': 'Polygon', 'coordinates': [[[-0.01425... \n", + "5 {'type': 'Polygon', 'coordinates': [[[11.97771... \n", + "6 {'type': 'Polygon', 'coordinates': [[[-9.38965... \n", + "7 {'type': 'Polygon', 'coordinates': [[[84.86653... \n", + "8 {'type': 'Polygon', 'coordinates': [[[46.27384... \n", + "9 {'type': 'Polygon', 'coordinates': [[[42.11571... \n", + "10 {'type': 'Polygon', 'coordinates': [[[-8.27511... \n", + "11 {'type': 'Polygon', 'coordinates': [[[20.00865... \n", + "12 {'type': 'Polygon', 'coordinates': [[[-7.18738... \n", + "13 {'type': 'Polygon', 'coordinates': [[[-4.20402... \n", + "14 {'type': 'Polygon', 'coordinates': [[[6.677761... \n", + "15 {'type': 'Polygon', 'coordinates': [[[22.64895... \n", + "16 {'type': 'Polygon', 'coordinates': [[[20.51301... \n", + "17 {'type': 'Polygon', 'coordinates': [[[18.18976... \n", + "18 {'type': 'Polygon', 'coordinates': [[[-100.043... \n", + "19 {'type': 'Polygon', 'coordinates': [[[7.678896... \n", + "\n", + " properties \n", + "0 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "1 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "2 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "3 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "4 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "5 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "6 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "7 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "8 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "9 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "10 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "11 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "12 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "13 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "14 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "15 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "16 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "17 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "18 {'collection': 'SENTINEL-1', 'status': 'ONLINE... \n", + "19 {'collection': 'SENTINEL-1', 'status': 'ONLINE... " + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "filters = {\n", + " \"polarisationChannels\": \"VV&VH\",\n", + " \"productType\": \"IW_GRDH_1S\"\n", + "}\n", + "\n", + "df, resto_url = resto_search(\"Sentinel1\", filters)\n", + "\n", + "print(f\"HTTPS Request: {resto_url}\")\n", + "\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "7eeffc32-2315-40a6-856c-23d9aee3eb3d", + "metadata": {}, + "source": [ + "### **STAC**\n", + "\n", + "STAC presents a much more standardized metadata model aimed at increasing interoperability and applicability of spatio-temporal datasets. By using a common schema and well-defined object types, STAC makes it easier to discover, understand, and integrate Earth observation data across different providers and missions.\n", + "\n", + "Compared to Resto, STAC offers broader possibilities for data search and filtering. It enables more expressive queries and clearer separation between collections and items, which improves both usability and consistency of the API.\n", + "\n", + "A key concept in STAC is the use of **extensions**, which add additional functionality on top of the core specification. The STAC API specification allows flexible API extensions that enhance core capabilities without changing the base data model.\n", + "\n", + "Currently implemented extensions include:\n", + "\n", + "- `Filter`\n", + "- `Query`\n", + "- `Fields`\n", + "- `Sort`\n", + "\n", + "These extensions significantly extend the search and filtering capabilities of the STAC API while preserving a standardized and interoperable interface." + ] + }, + { + "cell_type": "markdown", + "id": "c31f6650-d796-4c8a-a2b2-b7f25ea8a459", + "metadata": {}, + "source": [ + "#### **Filter Extension**\n", + "\n", + "**Filtering** is built around the standardized CQL2 query language, which enables spatial, temporal, and attribute-based comparisons within a single request.\n", + "\n", + "Filtering can be applied to the Item Search endpoint (`/search`) and supports both simple and more complex conditions. Logical operators such as `AND`, `OR`, and `NOT` can be combined with comparison operators (`=`, `<>`, `<`, `<=`, `>`, `>=`) and null checks. These operators can be used with string, numeric, boolean, date, and datetime values. Basic spatial relationships, such as intersection, are also supported.\n", + "\n", + "Queries can be executed using both GET and POST requests. For GET requests, filters are typically expressed using a text-based CQL2 syntax, while POST requests allow filters to be provided in a structured JSON form. This flexibility makes it possible to construct advanced and readable queries while keeping compatibility with standard HTTP workflows.\n", + "\n", + "Detailed and up-to-date information about supported operators, parameters, and query formats is available in the [STAC Catalogue API documentation](https://documentation.dataspace.copernicus.eu/APIs/STAC.html)." + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "e2a46536-e8a9-4c64-b8b2-2e675fb7aae1", + "metadata": {}, + "outputs": [], + "source": [ + "stac_url = \"https://stac.dataspace.copernicus.eu/v1/search\"" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "7afe5266-21eb-444f-b43e-4ce0c1aa3e4e", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover <= 10&datetime >= TIMESTAMP('2025-04-08T04:39:23Z')&S_INTERSECTS(geometry, POLYGON((43.5845 -79.5442, 43.6079 -79.4893, 43.5677 -79.4632, 43.6129 -79.3925, 43.6223 -79.3238, 43.6576 -79.3163, 43.7945 -79.1178, 43.8144 -79.1542, 43.8555 -79.1714, 43.7509 -79.6390, 43.5845 -79.5442)))\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251228T233129_N0511_R101_T38CMS_2...[39.72200119694694, -80.25203205661444, 45.516...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[40.19847...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-29T02:20:59.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251228T233129_N0511_R101_T37CEM_2...[38.99894187059522, -80.25242038514605, 44.788...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[38.99903...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-29T02:21:40.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251228T000139_N0511_R087_T38CMT_2...[40.1593625828737, -79.35014408984915, 44.5605...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[40.29181...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-28T01:34:35.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251228T000139_N0511_R087_T38CMS_2...[39.72200119694694, -80.25203205661444, 45.516...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[43.28200...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-28T01:42:28.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251228T000139_N0511_R087_T37CEM_2...[38.99894187059522, -80.25242038514605, 44.788...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[43.04873...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-28T01:41:49.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20251228T233129_N0511_R101_T38CMS_2... \n", + "1 S2B_MSIL2A_20251228T233129_N0511_R101_T37CEM_2... \n", + "2 S2B_MSIL2A_20251228T000139_N0511_R087_T38CMT_2... \n", + "3 S2B_MSIL2A_20251228T000139_N0511_R087_T38CMS_2... \n", + "4 S2B_MSIL2A_20251228T000139_N0511_R087_T37CEM_2... \n", + "\n", + " bbox type \\\n", + "0 [39.72200119694694, -80.25203205661444, 45.516... Feature \n", + "1 [38.99894187059522, -80.25242038514605, 44.788... Feature \n", + "2 [40.1593625828737, -79.35014408984915, 44.5605... Feature \n", + "3 [39.72200119694694, -80.25203205661444, 45.516... Feature \n", + "4 [38.99894187059522, -80.25242038514605, 44.788... Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[40.19847... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[38.99903... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[40.29181... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[43.28200... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[43.04873... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-12-29T02:20:59.00... \n", + "1 {'gsd': 10, 'created': '2025-12-29T02:21:40.00... \n", + "2 {'gsd': 10, 'created': '2025-12-28T01:34:35.00... \n", + "3 {'gsd': 10, 'created': '2025-12-28T01:42:28.00... \n", + "4 {'gsd': 10, 'created': '2025-12-28T01:41:49.00... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"filter\": {\n", + " \"op\": \"and\",\n", + " \"args\": [\n", + " {\n", + " \"op\": \"=\",\n", + " \"args\": [\n", + " {\n", + " \"property\": \"collection\"\n", + " },\n", + " \"sentinel-2-l2a\"\n", + " ]\n", + " },\n", + " {\n", + " \"op\": \"<=\",\n", + " \"args\": [\n", + " {\n", + " \"property\": \"eo:cloud_cover\"\n", + " },\n", + " 10\n", + " ]\n", + " },\n", + " {\n", + " \"op\": \">=\",\n", + " \"args\": [\n", + " {\n", + " \"property\": \"datetime\"\n", + " },\n", + " {\n", + " \"timestamp\": \"2025-04-08T04:39:23Z\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"op\": \"s_intersects\",\n", + " \"args\": [\n", + " {\n", + " \"property\": \"geometry\"\n", + " },\n", + " {\n", + " \"type\": \"Polygon\",\n", + " \"coordinates\": [\n", + " [\n", + " [\n", + " 43.5845,\n", + " -79.5442\n", + " ],\n", + " [\n", + " 43.6079,\n", + " -79.4893\n", + " ],\n", + " [\n", + " 43.5677,\n", + " -79.4632\n", + " ],\n", + " [\n", + " 43.6129,\n", + " -79.3925\n", + " ],\n", + " [\n", + " 43.6223,\n", + " -79.3238\n", + " ],\n", + " [\n", + " 43.6576,\n", + " -79.3163\n", + " ],\n", + " [\n", + " 43.7945,\n", + " -79.1178\n", + " ],\n", + " [\n", + " 43.8144,\n", + " -79.1542\n", + " ],\n", + " [\n", + " 43.8555,\n", + " -79.1714\n", + " ],\n", + " [\n", + " 43.7509,\n", + " -79.6390\n", + " ],\n", + " [\n", + " 43.5845,\n", + " -79.5442\n", + " ]\n", + " ]\n", + " ]\n", + " }\n", + " ]\n", + " }\n", + " ]\n", + " }\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover <= 10&datetime >= TIMESTAMP('2025-04-08T04:39:23Z')&S_INTERSECTS(geometry, POLYGON((43.5845 -79.5442, 43.6079 -79.4893, 43.5677 -79.4632, 43.6129 -79.3925, 43.6223 -79.3238, 43.6576 -79.3163, 43.7945 -79.1178, 43.8144 -79.1542, 43.8555 -79.1714, 43.7509 -79.6390, 43.5845 -79.5442)))\")\n", + "\n", + "df = pd.DataFrame.from_dict(json['features'])\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "id": "9c1c3929-e36f-4158-b17a-13757f26e280", + "metadata": {}, + "source": [ + "#### **Query Extension**\n", + "\n", + "**`Query`** parameter that enables additional filtering based on the properties of Item objects. It allows users to apply simple, property-based conditions when searching for items in the catalog.\n", + "\n", + "The following comparison operators are supported:\n", + "\n", + "- `eq` – equal to \n", + "- `neq` – not equal to \n", + "- `lt` – less than \n", + "- `lte` – less than or equal to \n", + "- `gt` – greater than \n", + "- `gte` – greater than or equal to \n", + "\n", + "These operators can be used to define constraints on numeric and comparable item properties." + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "e1191a3b-935e-4313-8145-c3cbeae8c08f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&eo:cloud_cover%3C15\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2...[-2.277998803053058, -80.22883981478951, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-2.18323...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:23.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2...[-8.277998803053059, -80.25203205661444, -2.48...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-8.23246...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:25:36.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2...[-9.001058129404774, -80.25242038514605, -3.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-9.00104...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:16.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2...[-13.59074209711865, -80.24048353817358, -9.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-13.5907...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:35.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2...[70.35704429215036, -48.83293960900481, 71.460...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[70.36265...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:18:51.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2... \n", + "1 S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2... \n", + "2 S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2... \n", + "3 S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2... \n", + "4 S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2... \n", + "\n", + " bbox type \\\n", + "0 [-2.277998803053058, -80.22883981478951, 0.184... Feature \n", + "1 [-8.277998803053059, -80.25203205661444, -2.48... Feature \n", + "2 [-9.001058129404774, -80.25242038514605, -3.21... Feature \n", + "3 [-13.59074209711865, -80.24048353817358, -9.21... Feature \n", + "4 [70.35704429215036, -48.83293960900481, 71.460... Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[-2.18323... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[-8.23246... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[-9.00104... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[-13.5907... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[70.36265... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-12-31T07:23:23.00... \n", + "1 {'gsd': 10, 'created': '2025-12-31T07:25:36.00... \n", + "2 {'gsd': 10, 'created': '2025-12-31T07:24:16.00... \n", + "3 {'gsd': 10, 'created': '2025-12-31T07:24:35.00... \n", + "4 {'gsd': 10, 'created': '2025-12-31T07:18:51.00... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\n", + " \"sentinel-2-l2a\"\n", + " ],\n", + " \"query\": {\n", + " \"eo:cloud_cover\": {\n", + " \"lt\": 15\n", + " }\n", + " }\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&eo:cloud_cover%3C15\")\n", + "\n", + "df = pd.DataFrame.from_dict(json['features'])\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "id": "ed128efe-5741-4487-8639-ca53c7b39de4", + "metadata": {}, + "source": [ + "#### **Fields Extension**\n", + "\n", + "This extension allows users to control which attributes are **included** or **excluded** in search responses. This makes it possible to optimize query performance by **limiting the amount of returned data**, which is especially useful when working with large or complex Item objects.\n", + "\n", + "Through the **`fields`** parameter users can explicitly define which fields should be returned or omitted from the response.\n", + "\n", + "For GET requests, fields can be excluded by prefixing their names with a hyphen. For example, using `-geometry` removes the geometry object from the response. This provides a simple way to reduce response size while keeping only the information relevant to a given workflow." + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "id": "bf7b13d5-7f95-406f-a9bb-dddad0ebc8a8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=-geometry\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetscollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2...[-2.277998803053058, -80.22883981478951, 0.184...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:23:23.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2...[-8.277998803053059, -80.25203205661444, -2.48...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:25:36.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2...[-9.001058129404774, -80.25242038514605, -3.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:16.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2...[-13.59074209711865, -80.24048353817358, -9.21...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:24:35.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2...[70.35704429215036, -48.83293960900481, 71.460...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...sentinel-2-l2a{'gsd': 10, 'created': '2025-12-31T07:18:51.00...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20251231T051319_N0511_R133_T31CDM_2... \n", + "1 S2B_MSIL2A_20251231T051319_N0511_R133_T30CVS_2... \n", + "2 S2B_MSIL2A_20251231T051319_N0511_R133_T29CNM_2... \n", + "3 S2B_MSIL2A_20251231T051319_N0511_R133_T28CES_2... \n", + "4 S2B_MSIL2A_20251231T050229_N0511_R133_T42FXM_2... \n", + "\n", + " bbox type \\\n", + "0 [-2.277998803053058, -80.22883981478951, 0.184... Feature \n", + "1 [-8.277998803053059, -80.25203205661444, -2.48... Feature \n", + "2 [-9.001058129404774, -80.25242038514605, -3.21... Feature \n", + "3 [-13.59074209711865, -80.24048353817358, -9.21... Feature \n", + "4 [70.35704429215036, -48.83293960900481, 71.460... Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets collection \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-12-31T07:23:23.00... \n", + "1 {'gsd': 10, 'created': '2025-12-31T07:25:36.00... \n", + "2 {'gsd': 10, 'created': '2025-12-31T07:24:16.00... \n", + "3 {'gsd': 10, 'created': '2025-12-31T07:24:35.00... \n", + "4 {'gsd': 10, 'created': '2025-12-31T07:18:51.00... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\n", + " \"sentinel-2-l2a\"\n", + " ],\n", + " \"filter\": {\n", + " \"op\": \"lt\",\n", + " \"args\": [\n", + " {\n", + " \"property\": \"eo:cloud_cover\"\n", + " },\n", + " 15\n", + " ]\n", + " },\n", + " \"fields\": {\n", + " \"exclude\": [\n", + " \"geometry\"\n", + " ]\n", + " }\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=-geometry\")\n", + "\n", + "df = pd.DataFrame.from_dict(json['features'])\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "id": "52cdafb6-5799-4b39-9826-9d58f06bbaa7", + "metadata": {}, + "source": [ + "In the following example, the request is further restricted to return only the `assets` of each item." + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "9dcc3f33-f848-47ac-ba59-eb671db10c82", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=assets\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
assetslinks
0{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
1{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
2{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
3{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
4{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
5{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
6{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
7{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
8{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
9{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...[{'rel': 'collection', 'type': 'application/js...
\n", + "
" + ], + "text/plain": [ + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "8 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "9 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " links \n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "5 [{'rel': 'collection', 'type': 'application/js... \n", + "6 [{'rel': 'collection', 'type': 'application/js... \n", + "7 [{'rel': 'collection', 'type': 'application/js... \n", + "8 [{'rel': 'collection', 'type': 'application/js... \n", + "9 [{'rel': 'collection', 'type': 'application/js... " + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\n", + " \"sentinel-2-l2a\"\n", + " ],\n", + " \"filter\": {\n", + " \"op\": \"lt\",\n", + " \"args\": [\n", + " {\n", + " \"property\": \"eo:cloud_cover\"\n", + " },\n", + " 15\n", + " ]\n", + " },\n", + " \"fields\": {\n", + " \"include\": [\n", + " \"assets\"\n", + " ]\n", + " }\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&filter=eo:cloud_cover%3C15&fields=assets\")\n", + "\n", + "df = pd.DataFrame.from_dict(json['features'])\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "205be0e0-96af-4e9b-9263-d2898ddb775a", + "metadata": {}, + "source": [ + "#### **Sort Extension**\n", + "\n", + "With this extension users are able to define **sorting** criteria for search results using the **`sortby`** parameter. Sorting can be applied to string, numeric, and datetime fields of an Item or its properties.\n", + "\n", + "Fields can be sorted in either **ascending** or **descending** order. **Multiple fields** may be specified to define a sorting priority.\n", + "\n", + "In GET requests, sorting fields are provided as a comma-separated list. A prefix may be used to indicate the sort order:\n", + "- `+` denotes ascending order (default)\n", + "- `-` denotes descending order\n", + "\n", + "In POST requests, sorting criteria are expressed as an array, which provides a structured way to define the sorting behavior. Each element of the array specifies a field and the desired order \\[`asc` (or `ascending`) and `desc` (or `descending`)].\n", + "\n", + "This extension gives explicit control over result ordering, which is particularly useful when paging through large result sets or comparing items based on specific metadata fields." + ] + }, + { + "cell_type": "markdown", + "id": "1c2d34a9-28e9-4d16-927f-9b3472644cc9", + "metadata": {}, + "source": [ + "In addition to the use of the `sortby` parameter, this query also includes the **`limit`** parameter, which defines the maximum number of Items to be returned in the response. The default value is set to 12." + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "3f8283e0-a4b8-4731-9089-e40a67be8b96", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items?filter=eo:cloud_cover%3C15&datetime=2025-01-01T00:00:00Z/2025-01-15T23:59:59Z&sortby=+properties.eo:cloud_cover&limit=10\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2...[88.664444, 20.851601, 89.027861, 21.692646]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[89.01644...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-15T07:22:11.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
1S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2...[-156.43536, -74.863265, -156.220227, -74.762472]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-156.220...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-14T23:33:48.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
2S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2...[-82.910307, 18.894431, -82.404586, 19.890114]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-82.4045...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-12T21:56:54.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
3S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2...[-173.79563, -15.450678, -173.254328, -14.455833]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-173.254...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-11T23:29:04.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
4S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2...[-123.000374, 60.33627, -120.949436, 61.334442]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[-120.983...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-08T23:35:08.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
5S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2...[86.99875, -82.012669, 94.069006, -81.007392]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[90.74373...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T22:39:28.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
6S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2...[156.297745, -4.122706, 156.409008, -3.61448]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.4090...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-06T02:48:01.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
7S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2...[71.754262, 33.309546, 72.956153, 34.324206]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[71.75426...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-04T09:50:28.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
8S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2...[11.086289, 30.62773, 11.392596, 31.618143]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[11.39259...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-14T13:23:07.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
9S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2...[18.227016, -13.641674, 18.47779, -12.649679]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[18.47779...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-13T12:09:51.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2... \n", + "1 S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2... \n", + "2 S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2... \n", + "3 S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2... \n", + "4 S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2... \n", + "5 S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2... \n", + "6 S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2... \n", + "7 S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2... \n", + "8 S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2... \n", + "9 S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2... \n", + "\n", + " bbox type \\\n", + "0 [88.664444, 20.851601, 89.027861, 21.692646] Feature \n", + "1 [-156.43536, -74.863265, -156.220227, -74.762472] Feature \n", + "2 [-82.910307, 18.894431, -82.404586, 19.890114] Feature \n", + "3 [-173.79563, -15.450678, -173.254328, -14.455833] Feature \n", + "4 [-123.000374, 60.33627, -120.949436, 61.334442] Feature \n", + "5 [86.99875, -82.012669, 94.069006, -81.007392] Feature \n", + "6 [156.297745, -4.122706, 156.409008, -3.61448] Feature \n", + "7 [71.754262, 33.309546, 72.956153, 34.324206] Feature \n", + "8 [11.086289, 30.62773, 11.392596, 31.618143] Feature \n", + "9 [18.227016, -13.641674, 18.47779, -12.649679] Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "5 [{'rel': 'collection', 'type': 'application/js... \n", + "6 [{'rel': 'collection', 'type': 'application/js... \n", + "7 [{'rel': 'collection', 'type': 'application/js... \n", + "8 [{'rel': 'collection', 'type': 'application/js... \n", + "9 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "8 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "9 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[89.01644... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[-156.220... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[-82.4045... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[-173.254... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[-120.983... sentinel-2-l2a \n", + "5 {'type': 'Polygon', 'coordinates': [[[90.74373... sentinel-2-l2a \n", + "6 {'type': 'Polygon', 'coordinates': [[[156.4090... sentinel-2-l2a \n", + "7 {'type': 'Polygon', 'coordinates': [[[71.75426... sentinel-2-l2a \n", + "8 {'type': 'Polygon', 'coordinates': [[[11.39259... sentinel-2-l2a \n", + "9 {'type': 'Polygon', 'coordinates': [[[18.47779... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-01-15T07:22:11.00... \n", + "1 {'gsd': 10, 'created': '2025-01-14T23:33:48.00... \n", + "2 {'gsd': 10, 'created': '2025-01-12T21:56:54.00... \n", + "3 {'gsd': 10, 'created': '2025-01-11T23:29:04.00... \n", + "4 {'gsd': 10, 'created': '2025-01-08T23:35:08.00... \n", + "5 {'gsd': 10, 'created': '2025-01-01T22:39:28.00... \n", + "6 {'gsd': 10, 'created': '2025-01-06T02:48:01.00... \n", + "7 {'gsd': 10, 'created': '2025-01-04T09:50:28.00... \n", + "8 {'gsd': 10, 'created': '2025-01-14T13:23:07.00... \n", + "9 {'gsd': 10, 'created': '2025-01-13T12:09:51.00... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "1 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "2 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "3 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "4 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "5 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "6 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "7 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "8 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "9 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 " + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\"sentinel-2-l2a\"],\n", + " \"query\": {\n", + " \"eo:cloud_cover\": {\n", + " \"gt\": 10\n", + " }\n", + " },\n", + " \"datetime\": \"2025-01-01T00:00:00Z/2025-01-15T23:59:59Z\",\n", + " \"sortby\": [\n", + " {\n", + " \"field\": \"eo:cloud_cover\",\n", + " \"direction\": \"asc\"\n", + " }\n", + " ],\n", + " \"limit\": 10\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items?filter=eo:cloud_cover%3C15&datetime=2025-01-01T00:00:00Z/2025-01-15T23:59:59Z&sortby=+properties.eo:cloud_cover&limit=10\")\n", + "\n", + "df = pd.DataFrame.from_dict(json['features'])\n", + "df" + ] + }, + { + "cell_type": "markdown", + "id": "41502181-7a15-41b3-9375-a76cab280a23", + "metadata": {}, + "source": [ + "To verify that the query sorts the results correctly, we can inspect the cloud cover values of the returned products." + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "60fa8c02-9f39-4c9b-b234-8e9c08c01b11", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idproperties.eo:cloud_cover
0S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2...10.01
1S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2...10.01
2S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2...10.01
3S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2...10.01
4S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2...10.01
5S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2...10.01
6S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2...10.01
7S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2...10.01
8S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2...10.02
9S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2...10.02
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20250115T043029_N0511_R133_T45QXD_2... \n", + "1 S2B_MSIL2A_20250114T190459_N0511_R127_T05CMS_2... \n", + "2 S2B_MSIL2A_20250112T160529_N0511_R097_T17QLB_2... \n", + "3 S2B_MSIL2A_20250111T215909_N0511_R086_T02LKJ_2... \n", + "4 S2B_MSIL2A_20250108T194719_N0511_R042_T10VEN_2... \n", + "5 S2B_MSIL2A_20250101T204019_N0511_R085_T45CWK_2... \n", + "6 S2A_MSIL2A_20250106T000731_N0511_R073_T57MTR_2... \n", + "7 S2A_MSIL2A_20250104T055231_N0511_R048_T43SBT_2... \n", + "8 S2B_MSIL2A_20250114T100259_N0511_R122_T32RQV_2... \n", + "9 S2B_MSIL2A_20250113T085229_N0511_R107_T34LBL_2... \n", + "\n", + " properties.eo:cloud_cover \n", + "0 10.01 \n", + "1 10.01 \n", + "2 10.01 \n", + "3 10.01 \n", + "4 10.01 \n", + "5 10.01 \n", + "6 10.01 \n", + "7 10.01 \n", + "8 10.02 \n", + "9 10.02 " + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_cc = pd.json_normalize(json[\"features\"], sep=\".\")\n", + "df_cc[[\"id\", \"properties.eo:cloud_cover\"]]" + ] + }, + { + "cell_type": "markdown", + "id": "3dcb095c-f148-4319-8403-342ea29708dd", + "metadata": {}, + "source": [ + "#### **Resto query equivalents in STAC**\n", + "\n", + "With the concepts introduced above, we can now attempt to translate selected Resto queries into their STAC equivalents. This section demonstrates how typical filtering patterns used in the Resto can be remapped to STAC search requests, highlighting the differences in syntax while preserving the original query intent." + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "8f09219c-70d0-4cce-ba55-331ca9b679bc", + "metadata": {}, + "outputs": [], + "source": [ + "stac_url = \"https://stac.dataspace.copernicus.eu/v1/search\"" + ] + }, + { + "cell_type": "markdown", + "id": "5e2343de-a370-4411-b1ed-1f9856c38d4e", + "metadata": {}, + "source": [ + "This code queries the Sentinel-2 L2A collection for items from January 1 to January 31, 2025, using the collection name, datetime range, a limit of 20 results, and sorting by datetime in ascending order." + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "82854c1c-c0cb-4ac7-aac8-dbbc0941d7fe", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2025-01-01T00:00:00Z/2025-01-31T23:59:59Z&limit=20&sortby=+datetime\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20250101T000439_N0511_R073_T57NVH_2...[158.093982, 6.243793, 158.745574, 7.155754]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.0939...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:44:17.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
1S2B_MSIL2A_20250101T000439_N0511_R073_T57NVG_2...[158.095521, 5.339213, 158.599385, 6.33265]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.2868...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:30:22.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
2S2B_MSIL2A_20250101T000439_N0511_R073_T57NVF_2...[158.096981, 5.31548, 158.396634, 5.427753]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.3183...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:23:15.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
3S2B_MSIL2A_20250101T000439_N0511_R073_T57NUJ_2...[157.188064, 7.145259, 158.12463, 7.360241]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.1880...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:27:52.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
4S2B_MSIL2A_20250101T000439_N0511_R073_T57NUH_2...[157.188619, 6.241466, 158.184617, 7.235884]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.7636...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:47:52.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
5S2B_MSIL2A_20250101T000439_N0511_R073_T57NUG_2...[157.191994, 5.367592, 158.185873, 6.332402]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.1858...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:33:24.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
6S2B_MSIL2A_20250101T000439_N0511_R073_T57NUF_2...[157.949753, 5.367593, 158.185869, 5.427677]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[158.1858...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:24:35.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
7S2B_MSIL2A_20250101T000439_N0511_R073_T57NTJ_2...[156.281374, 7.140815, 157.277502, 7.532774]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.2813...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:28:04.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
8S2B_MSIL2A_20250101T000439_N0511_R073_T57NTH_2...[156.283325, 6.237589, 157.280668, 7.234569]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.2833...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:36:42.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
9S2B_MSIL2A_20250101T000439_N0511_R073_T57NTG_2...[156.288384, 5.591788, 157.282626, 6.330194]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.2826...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:44:40.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
10S2B_MSIL2A_20250101T000439_N0511_R073_T56NRP_2...[156.058923, 7.133902, 156.711379, 7.556189]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.0589...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:27:53.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
11S2B_MSIL2A_20250101T000439_N0511_R073_T56NRN_2...[155.860957, 6.231558, 156.70932, 7.227175]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[155.8609...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:31:26.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
12S2B_MSIL2A_20250101T000439_N0511_R073_T56NRM_2...[155.784722, 5.718646, 156.702422, 6.32492]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.6984...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:34:52.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
13S2B_MSIL2A_20250101T000619_N0511_R073_T57NUA_2...[157.202748, 0.157188, 157.360626, 0.798383]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.2027...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:22:58.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
14S2B_MSIL2A_20250101T000619_N0511_R073_T57NTB_2...[156.304301, 0.81552, 157.139021, 1.025204]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.1290...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:23:51.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
15S2B_MSIL2A_20250101T000619_N0511_R073_T57NTA_2...[156.304464, 0.157188, 157.290683, 0.904207]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[157.1290...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:28:27.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
16S2B_MSIL2A_20250101T000619_N0511_R073_T56NRG_2...[155.695115, 0.814734, 156.680581, 1.15563]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[155.6954...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:24:32.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
17S2B_MSIL2A_20250101T000619_N0511_R073_T56NRF_2...[155.695053, 0.303835, 156.680494, 0.903904]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[156.6802...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:25:56.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
18S2B_MSIL2A_20250101T000619_N0511_R073_T56NQG_2...[154.796875, 0.81546, 155.783269, 1.325109]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[154.7972...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:33:19.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
19S2B_MSIL2A_20250101T000619_N0511_R073_T56NQF_2...[154.796872, 0.515161, 155.782977, 0.904464]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[155.7828...sentinel-2-l2a{'gsd': 10, 'created': '2025-01-01T01:30:31.00...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20250101T000439_N0511_R073_T57NVH_2... \n", + "1 S2B_MSIL2A_20250101T000439_N0511_R073_T57NVG_2... \n", + "2 S2B_MSIL2A_20250101T000439_N0511_R073_T57NVF_2... \n", + "3 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUJ_2... \n", + "4 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUH_2... \n", + "5 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUG_2... \n", + "6 S2B_MSIL2A_20250101T000439_N0511_R073_T57NUF_2... \n", + "7 S2B_MSIL2A_20250101T000439_N0511_R073_T57NTJ_2... \n", + "8 S2B_MSIL2A_20250101T000439_N0511_R073_T57NTH_2... \n", + "9 S2B_MSIL2A_20250101T000439_N0511_R073_T57NTG_2... \n", + "10 S2B_MSIL2A_20250101T000439_N0511_R073_T56NRP_2... \n", + "11 S2B_MSIL2A_20250101T000439_N0511_R073_T56NRN_2... \n", + "12 S2B_MSIL2A_20250101T000439_N0511_R073_T56NRM_2... \n", + "13 S2B_MSIL2A_20250101T000619_N0511_R073_T57NUA_2... \n", + "14 S2B_MSIL2A_20250101T000619_N0511_R073_T57NTB_2... \n", + "15 S2B_MSIL2A_20250101T000619_N0511_R073_T57NTA_2... \n", + "16 S2B_MSIL2A_20250101T000619_N0511_R073_T56NRG_2... \n", + "17 S2B_MSIL2A_20250101T000619_N0511_R073_T56NRF_2... \n", + "18 S2B_MSIL2A_20250101T000619_N0511_R073_T56NQG_2... \n", + "19 S2B_MSIL2A_20250101T000619_N0511_R073_T56NQF_2... \n", + "\n", + " bbox type \\\n", + "0 [158.093982, 6.243793, 158.745574, 7.155754] Feature \n", + "1 [158.095521, 5.339213, 158.599385, 6.33265] Feature \n", + "2 [158.096981, 5.31548, 158.396634, 5.427753] Feature \n", + "3 [157.188064, 7.145259, 158.12463, 7.360241] Feature \n", + "4 [157.188619, 6.241466, 158.184617, 7.235884] Feature \n", + "5 [157.191994, 5.367592, 158.185873, 6.332402] Feature \n", + "6 [157.949753, 5.367593, 158.185869, 5.427677] Feature \n", + "7 [156.281374, 7.140815, 157.277502, 7.532774] Feature \n", + "8 [156.283325, 6.237589, 157.280668, 7.234569] Feature \n", + "9 [156.288384, 5.591788, 157.282626, 6.330194] Feature \n", + "10 [156.058923, 7.133902, 156.711379, 7.556189] Feature \n", + "11 [155.860957, 6.231558, 156.70932, 7.227175] Feature \n", + "12 [155.784722, 5.718646, 156.702422, 6.32492] Feature \n", + "13 [157.202748, 0.157188, 157.360626, 0.798383] Feature \n", + "14 [156.304301, 0.81552, 157.139021, 1.025204] Feature \n", + "15 [156.304464, 0.157188, 157.290683, 0.904207] Feature \n", + "16 [155.695115, 0.814734, 156.680581, 1.15563] Feature \n", + "17 [155.695053, 0.303835, 156.680494, 0.903904] Feature \n", + "18 [154.796875, 0.81546, 155.783269, 1.325109] Feature \n", + "19 [154.796872, 0.515161, 155.782977, 0.904464] Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "5 [{'rel': 'collection', 'type': 'application/js... \n", + "6 [{'rel': 'collection', 'type': 'application/js... \n", + "7 [{'rel': 'collection', 'type': 'application/js... \n", + "8 [{'rel': 'collection', 'type': 'application/js... \n", + "9 [{'rel': 'collection', 'type': 'application/js... \n", + "10 [{'rel': 'collection', 'type': 'application/js... \n", + "11 [{'rel': 'collection', 'type': 'application/js... \n", + "12 [{'rel': 'collection', 'type': 'application/js... \n", + "13 [{'rel': 'collection', 'type': 'application/js... \n", + "14 [{'rel': 'collection', 'type': 'application/js... \n", + "15 [{'rel': 'collection', 'type': 'application/js... \n", + "16 [{'rel': 'collection', 'type': 'application/js... \n", + "17 [{'rel': 'collection', 'type': 'application/js... \n", + "18 [{'rel': 'collection', 'type': 'application/js... \n", + "19 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "8 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "9 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "10 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "11 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "12 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "13 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "14 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "15 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "16 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "17 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "18 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "19 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[158.0939... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[158.2868... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[158.3183... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[157.1880... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[157.7636... sentinel-2-l2a \n", + "5 {'type': 'Polygon', 'coordinates': [[[158.1858... sentinel-2-l2a \n", + "6 {'type': 'Polygon', 'coordinates': [[[158.1858... sentinel-2-l2a \n", + "7 {'type': 'Polygon', 'coordinates': [[[156.2813... sentinel-2-l2a \n", + "8 {'type': 'Polygon', 'coordinates': [[[156.2833... sentinel-2-l2a \n", + "9 {'type': 'Polygon', 'coordinates': [[[157.2826... sentinel-2-l2a \n", + "10 {'type': 'Polygon', 'coordinates': [[[156.0589... sentinel-2-l2a \n", + "11 {'type': 'Polygon', 'coordinates': [[[155.8609... sentinel-2-l2a \n", + "12 {'type': 'Polygon', 'coordinates': [[[156.6984... sentinel-2-l2a \n", + "13 {'type': 'Polygon', 'coordinates': [[[157.2027... sentinel-2-l2a \n", + "14 {'type': 'Polygon', 'coordinates': [[[157.1290... sentinel-2-l2a \n", + "15 {'type': 'Polygon', 'coordinates': [[[157.1290... sentinel-2-l2a \n", + "16 {'type': 'Polygon', 'coordinates': [[[155.6954... sentinel-2-l2a \n", + "17 {'type': 'Polygon', 'coordinates': [[[156.6802... sentinel-2-l2a \n", + "18 {'type': 'Polygon', 'coordinates': [[[154.7972... sentinel-2-l2a \n", + "19 {'type': 'Polygon', 'coordinates': [[[155.7828... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-01-01T01:44:17.00... \n", + "1 {'gsd': 10, 'created': '2025-01-01T01:30:22.00... \n", + "2 {'gsd': 10, 'created': '2025-01-01T01:23:15.00... \n", + "3 {'gsd': 10, 'created': '2025-01-01T01:27:52.00... \n", + "4 {'gsd': 10, 'created': '2025-01-01T01:47:52.00... \n", + "5 {'gsd': 10, 'created': '2025-01-01T01:33:24.00... \n", + "6 {'gsd': 10, 'created': '2025-01-01T01:24:35.00... \n", + "7 {'gsd': 10, 'created': '2025-01-01T01:28:04.00... \n", + "8 {'gsd': 10, 'created': '2025-01-01T01:36:42.00... \n", + "9 {'gsd': 10, 'created': '2025-01-01T01:44:40.00... \n", + "10 {'gsd': 10, 'created': '2025-01-01T01:27:53.00... \n", + "11 {'gsd': 10, 'created': '2025-01-01T01:31:26.00... \n", + "12 {'gsd': 10, 'created': '2025-01-01T01:34:52.00... \n", + "13 {'gsd': 10, 'created': '2025-01-01T01:22:58.00... \n", + "14 {'gsd': 10, 'created': '2025-01-01T01:23:51.00... \n", + "15 {'gsd': 10, 'created': '2025-01-01T01:28:27.00... \n", + "16 {'gsd': 10, 'created': '2025-01-01T01:24:32.00... \n", + "17 {'gsd': 10, 'created': '2025-01-01T01:25:56.00... \n", + "18 {'gsd': 10, 'created': '2025-01-01T01:33:19.00... \n", + "19 {'gsd': 10, 'created': '2025-01-01T01:30:31.00... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "1 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "2 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "3 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "4 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "5 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "6 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "7 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "8 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "9 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "10 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "11 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "12 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "13 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "14 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "15 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "16 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "17 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "18 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "19 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 " + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\"sentinel-2-l2a\"],\n", + " \"datetime\": \"2025-01-01T00:00:00Z/2025-01-31T23:59:59Z\",\n", + " \"limit\": 20,\n", + " \"sortby\": [\n", + " {\"field\": \"datetime\", \n", + " \"direction\": \"asc\"}\n", + " ]\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2025-01-01T00:00:00Z/2025-01-31T23:59:59Z&limit=20&sortby=+datetime\")\n", + "\n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features" + ] + }, + { + "cell_type": "markdown", + "id": "c48b03fb-ad4d-4fb7-a721-5e5b8968af31", + "metadata": {}, + "source": [ + "This code queries the Sentinel-2 L2A collection for items between June 21 and September 22, 2021, that intersect the point at coordinates [21.01, 52.22] and have a cloud cover between 0% and 10%." + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "7cb7a76b-f10c-4a26-b1dd-1f24fbffe3f8", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2021-06-21T00%3A00%3A00Z%2F2021-09-22T23%3A59%3A59Z&intersects=%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B21.01%2C52.22%5D%7D&filter=eo%3Acloud_cover%20%3C%3D%2010\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2B_MSIL2A_20210909T095029_N0500_R079_T34UEC_2...[20.999706, 51.360232, 21.963602, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.96360...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-13T01:48:59.09...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
1S2B_MSIL2A_20210909T095029_N0500_R079_T34UDC_2...[19.531529, 51.354432, 21.143291, 52.350386]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[19.53152...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-13T01:53:31.43...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
2S2A_MSIL2A_20210904T095031_N0500_R079_T34UEC_2...[20.999706, 51.360262, 21.960142, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.96014...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-12T16:22:37.90...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
3S2B_MSIL2A_20210807T094029_N0500_R036_T34UEC_2...[20.999706, 51.352634, 22.611384, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[20.99970...sentinel-2-l2a{'gsd': 10, 'created': '2023-02-14T13:47:12.87...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
4S2B_MSIL2A_20210711T095029_N0500_R079_T34UEC_2...[20.999706, 51.360286, 21.955875, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.95587...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-15T08:23:16.75...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
5S2B_MSIL2A_20210708T094029_N0500_R036_T34UEC_2...[20.999706, 51.352634, 22.611384, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[20.99970...sentinel-2-l2a{'gsd': 10, 'created': '2023-03-16T17:59:14.58...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
6S2B_MSIL2A_20210621T095029_N0500_R079_T34UEC_2...[20.999706, 51.360262, 21.960388, 52.350473]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[21.96038...sentinel-2-l2a{'gsd': 10, 'created': '2023-06-10T22:54:38.64...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
7S2B_MSIL2A_20210621T095029_N0500_R079_T34UDC_2...[19.531529, 51.354432, 21.143291, 52.350386]Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[19.53152...sentinel-2-l2a{'gsd': 10, 'created': '2023-06-10T22:58:56.96...[https://stac-extensions.github.io/eo/v2.0.0/s...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2B_MSIL2A_20210909T095029_N0500_R079_T34UEC_2... \n", + "1 S2B_MSIL2A_20210909T095029_N0500_R079_T34UDC_2... \n", + "2 S2A_MSIL2A_20210904T095031_N0500_R079_T34UEC_2... \n", + "3 S2B_MSIL2A_20210807T094029_N0500_R036_T34UEC_2... \n", + "4 S2B_MSIL2A_20210711T095029_N0500_R079_T34UEC_2... \n", + "5 S2B_MSIL2A_20210708T094029_N0500_R036_T34UEC_2... \n", + "6 S2B_MSIL2A_20210621T095029_N0500_R079_T34UEC_2... \n", + "7 S2B_MSIL2A_20210621T095029_N0500_R079_T34UDC_2... \n", + "\n", + " bbox type \\\n", + "0 [20.999706, 51.360232, 21.963602, 52.350473] Feature \n", + "1 [19.531529, 51.354432, 21.143291, 52.350386] Feature \n", + "2 [20.999706, 51.360262, 21.960142, 52.350473] Feature \n", + "3 [20.999706, 51.352634, 22.611384, 52.350473] Feature \n", + "4 [20.999706, 51.360286, 21.955875, 52.350473] Feature \n", + "5 [20.999706, 51.352634, 22.611384, 52.350473] Feature \n", + "6 [20.999706, 51.360262, 21.960388, 52.350473] Feature \n", + "7 [19.531529, 51.354432, 21.143291, 52.350386] Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "5 [{'rel': 'collection', 'type': 'application/js... \n", + "6 [{'rel': 'collection', 'type': 'application/js... \n", + "7 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "5 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "6 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "7 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[21.96360... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[19.53152... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[21.96014... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[20.99970... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[21.95587... sentinel-2-l2a \n", + "5 {'type': 'Polygon', 'coordinates': [[[20.99970... sentinel-2-l2a \n", + "6 {'type': 'Polygon', 'coordinates': [[[21.96038... sentinel-2-l2a \n", + "7 {'type': 'Polygon', 'coordinates': [[[19.53152... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2023-03-13T01:48:59.09... \n", + "1 {'gsd': 10, 'created': '2023-03-13T01:53:31.43... \n", + "2 {'gsd': 10, 'created': '2023-03-12T16:22:37.90... \n", + "3 {'gsd': 10, 'created': '2023-02-14T13:47:12.87... \n", + "4 {'gsd': 10, 'created': '2023-03-15T08:23:16.75... \n", + "5 {'gsd': 10, 'created': '2023-03-16T17:59:14.58... \n", + "6 {'gsd': 10, 'created': '2023-06-10T22:54:38.64... \n", + "7 {'gsd': 10, 'created': '2023-06-10T22:58:56.96... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "1 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "2 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "3 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "4 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "5 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "6 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 \n", + "7 [https://stac-extensions.github.io/eo/v2.0.0/s... 1.1.0 " + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\"sentinel-2-l2a\"],\n", + " \"datetime\": \"2021-06-21T00:00:00Z/2021-09-22T23:59:59Z\",\n", + " \"intersects\": {\n", + " \"type\": \"Point\",\n", + " \"coordinates\": [21.01, 52.22]\n", + " },\n", + " \"query\": {\n", + " \"eo:cloud_cover\": {\n", + " \"gte\": 0,\n", + " \"lte\": 10\n", + " }\n", + " }\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2021-06-21T00%3A00%3A00Z%2F2021-09-22T23%3A59%3A59Z&intersects=%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B21.01%2C52.22%5D%7D&filter=eo%3Acloud_cover%20%3C%3D%2010\")\n", + " \n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features" + ] + }, + { + "cell_type": "markdown", + "id": "1493c22f-309a-40b0-9a3f-99636c1e1e48", + "metadata": {}, + "source": [ + "This code queries the Sentinel-2 L2A collection for items between June 11 and June 22, 2022, within the bounding box [4, 51, 4.5, 52], with cloud cover between 0% and 10%, limiting the results to 10 items." + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "3fdb653d-a36e-4c2a-9647-9d93efce3d58", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2022-06-11T00%3A00%3A00Z%2F2022-06-22T23%3A59%3A59Z&bbox=4,51,4.5,52&filter=eo%3Acloud_cover%20%3E%3D%200%20AND%20eo%3Acloud_cover%20%3C%3D%2010&limit=10\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S2A_MSIL2A_20220622T105631_N0510_R094_T31UET_2...[2.999706370881351, 51.357799703919795, 4.3256...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.325619...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-15T08:31:15.80...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S2A_MSIL2A_20220616T103631_N0510_R008_T31UFT_2...[4.436120625123461, 51.32452335478603, 6.07775...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.436848...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T19:06:43.50...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S2B_MSIL2A_20220614T104629_N0510_R051_T31UFS_2...[4.408715109637645, 50.42809119252208, 6.01702...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[5.968085...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T14:34:10.93...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S2B_MSIL2A_20220611T103629_N0510_R008_T31UFS_2...[4.408715109637645, 50.42629366061962, 6.01702...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.436812...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T08:11:38.91...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S2B_MSIL2A_20220611T103629_N0510_R008_T31UES_2...[4.064087128317525, 50.453523278919015, 4.5795...Feature[{'rel': 'collection', 'type': 'application/js...{'AOT_10m': {'href': 's3://eodata/Sentinel-2/M...{'type': 'Polygon', 'coordinates': [[[4.064087...sentinel-2-l2a{'gsd': 10, 'created': '2025-02-14T08:11:38.75...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S2A_MSIL2A_20220622T105631_N0510_R094_T31UET_2... \n", + "1 S2A_MSIL2A_20220616T103631_N0510_R008_T31UFT_2... \n", + "2 S2B_MSIL2A_20220614T104629_N0510_R051_T31UFS_2... \n", + "3 S2B_MSIL2A_20220611T103629_N0510_R008_T31UFS_2... \n", + "4 S2B_MSIL2A_20220611T103629_N0510_R008_T31UES_2... \n", + "\n", + " bbox type \\\n", + "0 [2.999706370881351, 51.357799703919795, 4.3256... Feature \n", + "1 [4.436120625123461, 51.32452335478603, 6.07775... Feature \n", + "2 [4.408715109637645, 50.42809119252208, 6.01702... Feature \n", + "3 [4.408715109637645, 50.42629366061962, 6.01702... Feature \n", + "4 [4.064087128317525, 50.453523278919015, 4.5795... Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "1 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "2 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "3 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "4 {'AOT_10m': {'href': 's3://eodata/Sentinel-2/M... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[4.325619... sentinel-2-l2a \n", + "1 {'type': 'Polygon', 'coordinates': [[[4.436848... sentinel-2-l2a \n", + "2 {'type': 'Polygon', 'coordinates': [[[5.968085... sentinel-2-l2a \n", + "3 {'type': 'Polygon', 'coordinates': [[[4.436812... sentinel-2-l2a \n", + "4 {'type': 'Polygon', 'coordinates': [[[4.064087... sentinel-2-l2a \n", + "\n", + " properties \\\n", + "0 {'gsd': 10, 'created': '2025-02-15T08:31:15.80... \n", + "1 {'gsd': 10, 'created': '2025-02-14T19:06:43.50... \n", + "2 {'gsd': 10, 'created': '2025-02-14T14:34:10.93... \n", + "3 {'gsd': 10, 'created': '2025-02-14T08:11:38.91... \n", + "4 {'gsd': 10, 'created': '2025-02-14T08:11:38.75... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\"sentinel-2-l2a\"],\n", + " \"datetime\": \"2022-06-11T00:00:00Z/2022-06-22T23:59:59Z\",\n", + " \"bbox\": [4, 51, 4.5, 52],\n", + " \"limit\": 10,\n", + " \"query\": {\n", + " \"eo:cloud_cover\": {\n", + " \"gte\": 0,\n", + " \"lte\": 10\n", + " }\n", + " }\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "print(f\"HTTPS GET Request: https://stac.dataspace.copernicus.eu/v1/search?collections=sentinel-2-l2a&datetime=2022-06-11T00%3A00%3A00Z%2F2022-06-22T23%3A59%3A59Z&bbox=4,51,4.5,52&filter=eo%3Acloud_cover%20%3E%3D%200%20AND%20eo%3Acloud_cover%20%3C%3D%2010&limit=10\")\n", + "\n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features" + ] + }, + { + "cell_type": "markdown", + "id": "9596d2c8-f13c-4fa1-bc50-0ffec6ccbf7c", + "metadata": {}, + "source": [ + "This code uses the query parameter to search the Sentinel-1 GRD collection for items where the product type is `IW_GRDH_1S` and the polarization is `VV&VH`, returning up to 10 results." + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "ff59624f-0511-46f8-ae7b-af71c6efe1f8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613...[-4.961516, 29.132935, -2.043568, 30.6371]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.28483...sentinel-1-grd{'created': '2025-12-31T06:01:17.880940Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612...[-4.750492, 30.215359, -1.708874, 32.141827]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.04354...sentinel-1-grd{'created': '2025-12-31T06:01:18.350244Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612...[-4.460252, 31.722683, -1.369323, 33.646049]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.70885...sentinel-1-grd{'created': '2025-12-31T06:12:00.285895Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612...[-4.168624, 33.229343, -1.009401, 35.147907]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.3693,...sentinel-1-grd{'created': '2025-12-31T06:12:01.441023Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611...[-3.860411, 34.733044, -0.639349, 36.648712]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.00938...sentinel-1-grd{'created': '2025-12-31T06:11:58.380623Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
5S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611...[-3.545959, 36.235367, -0.277303, 38.150902]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.63932...sentinel-1-grd{'created': '2025-12-31T06:11:58.937265Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
6S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610...[-3.243545, 37.739258, 0.093031, 39.652462]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.27728...sentinel-1-grd{'created': '2025-12-31T06:11:47.595395Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
7S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610...[-2.937376, 39.242229, 0.463011, 41.154549]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.093054...sentinel-1-grd{'created': '2025-12-31T06:11:48.024200Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
8S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610...[-2.63635, 40.745724, 0.852503, 42.654728]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.463035...sentinel-1-grd{'created': '2025-12-31T06:12:00.578034Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
9S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609...[-2.321066, 42.246735, 1.270123, 44.15239]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.852526...sentinel-1-grd{'created': '2025-12-31T06:11:59.740213Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613... \n", + "1 S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612... \n", + "2 S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612... \n", + "3 S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612... \n", + "4 S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611... \n", + "5 S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611... \n", + "6 S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610... \n", + "7 S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610... \n", + "8 S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610... \n", + "9 S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609... \n", + "\n", + " bbox type \\\n", + "0 [-4.961516, 29.132935, -2.043568, 30.6371] Feature \n", + "1 [-4.750492, 30.215359, -1.708874, 32.141827] Feature \n", + "2 [-4.460252, 31.722683, -1.369323, 33.646049] Feature \n", + "3 [-4.168624, 33.229343, -1.009401, 35.147907] Feature \n", + "4 [-3.860411, 34.733044, -0.639349, 36.648712] Feature \n", + "5 [-3.545959, 36.235367, -0.277303, 38.150902] Feature \n", + "6 [-3.243545, 37.739258, 0.093031, 39.652462] Feature \n", + "7 [-2.937376, 39.242229, 0.463011, 41.154549] Feature \n", + "8 [-2.63635, 40.745724, 0.852503, 42.654728] Feature \n", + "9 [-2.321066, 42.246735, 1.270123, 44.15239] Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "5 [{'rel': 'collection', 'type': 'application/js... \n", + "6 [{'rel': 'collection', 'type': 'application/js... \n", + "7 [{'rel': 'collection', 'type': 'application/js... \n", + "8 [{'rel': 'collection', 'type': 'application/js... \n", + "9 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "1 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "2 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "3 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "4 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "5 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "6 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "7 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "8 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "9 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[-2.28483... sentinel-1-grd \n", + "1 {'type': 'Polygon', 'coordinates': [[[-2.04354... sentinel-1-grd \n", + "2 {'type': 'Polygon', 'coordinates': [[[-1.70885... sentinel-1-grd \n", + "3 {'type': 'Polygon', 'coordinates': [[[-1.3693,... sentinel-1-grd \n", + "4 {'type': 'Polygon', 'coordinates': [[[-1.00938... sentinel-1-grd \n", + "5 {'type': 'Polygon', 'coordinates': [[[-0.63932... sentinel-1-grd \n", + "6 {'type': 'Polygon', 'coordinates': [[[-0.27728... sentinel-1-grd \n", + "7 {'type': 'Polygon', 'coordinates': [[[0.093054... sentinel-1-grd \n", + "8 {'type': 'Polygon', 'coordinates': [[[0.463035... sentinel-1-grd \n", + "9 {'type': 'Polygon', 'coordinates': [[[0.852526... sentinel-1-grd \n", + "\n", + " properties \\\n", + "0 {'created': '2025-12-31T06:01:17.880940Z', 'ex... \n", + "1 {'created': '2025-12-31T06:01:18.350244Z', 'ex... \n", + "2 {'created': '2025-12-31T06:12:00.285895Z', 'ex... \n", + "3 {'created': '2025-12-31T06:12:01.441023Z', 'ex... \n", + "4 {'created': '2025-12-31T06:11:58.380623Z', 'ex... \n", + "5 {'created': '2025-12-31T06:11:58.937265Z', 'ex... \n", + "6 {'created': '2025-12-31T06:11:47.595395Z', 'ex... \n", + "7 {'created': '2025-12-31T06:11:48.024200Z', 'ex... \n", + "8 {'created': '2025-12-31T06:12:00.578034Z', 'ex... \n", + "9 {'created': '2025-12-31T06:11:59.740213Z', 'ex... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "5 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "6 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "7 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "8 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "9 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"collections\": [\"sentinel-1-grd\"],\n", + " \"query\": {\n", + " \"product:type\": {\"eq\": \"IW_GRDH_1S\"},\n", + " \"sar:polarizations\": {\"eq\": [\"VV\", \"VH\"]}\n", + " },\n", + " \"limit\": 10\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "\n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features" + ] + }, + { + "cell_type": "markdown", + "id": "e104a7e9-621c-4a6c-b83d-05beb58d45e4", + "metadata": {}, + "source": [ + "This code uses the filter parameter to search the Sentinel-1 GRD collection for items where the product type is `IW_GRDH_1S` and the polarization is `VV&VH`, returning up to 10 results." + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "91607e63-9b91-4c92-bd3e-f8551c699da3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idbboxtypelinksassetsgeometrycollectionpropertiesstac_extensionsstac_version
0S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613...[-4.961516, 29.132935, -2.043568, 30.6371]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.28483...sentinel-1-grd{'created': '2025-12-31T06:01:17.880940Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
1S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612...[-4.750492, 30.215359, -1.708874, 32.141827]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-2.04354...sentinel-1-grd{'created': '2025-12-31T06:01:18.350244Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
2S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612...[-4.460252, 31.722683, -1.369323, 33.646049]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.70885...sentinel-1-grd{'created': '2025-12-31T06:12:00.285895Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
3S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612...[-4.168624, 33.229343, -1.009401, 35.147907]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.3693,...sentinel-1-grd{'created': '2025-12-31T06:12:01.441023Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
4S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611...[-3.860411, 34.733044, -0.639349, 36.648712]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-1.00938...sentinel-1-grd{'created': '2025-12-31T06:11:58.380623Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
5S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611...[-3.545959, 36.235367, -0.277303, 38.150902]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.63932...sentinel-1-grd{'created': '2025-12-31T06:11:58.937265Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
6S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610...[-3.243545, 37.739258, 0.093031, 39.652462]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[-0.27728...sentinel-1-grd{'created': '2025-12-31T06:11:47.595395Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
7S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610...[-2.937376, 39.242229, 0.463011, 41.154549]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.093054...sentinel-1-grd{'created': '2025-12-31T06:11:48.024200Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
8S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610...[-2.63635, 40.745724, 0.852503, 42.654728]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.463035...sentinel-1-grd{'created': '2025-12-31T06:12:00.578034Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
9S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609...[-2.321066, 42.246735, 1.270123, 44.15239]Feature[{'rel': 'collection', 'type': 'application/js...{'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW...{'type': 'Polygon', 'coordinates': [[[0.852526...sentinel-1-grd{'created': '2025-12-31T06:11:59.740213Z', 'ex...[https://cs-si.github.io/eopf-stac-extension/v...1.1.0
\n", + "
" + ], + "text/plain": [ + " id \\\n", + "0 S1A_IW_GRDH_1SDV_20251231T061257_20251231T0613... \n", + "1 S1A_IW_GRDH_1SDV_20251231T061232_20251231T0612... \n", + "2 S1A_IW_GRDH_1SDV_20251231T061207_20251231T0612... \n", + "3 S1A_IW_GRDH_1SDV_20251231T061142_20251231T0612... \n", + "4 S1A_IW_GRDH_1SDV_20251231T061117_20251231T0611... \n", + "5 S1A_IW_GRDH_1SDV_20251231T061052_20251231T0611... \n", + "6 S1A_IW_GRDH_1SDV_20251231T061027_20251231T0610... \n", + "7 S1A_IW_GRDH_1SDV_20251231T061002_20251231T0610... \n", + "8 S1A_IW_GRDH_1SDV_20251231T060937_20251231T0610... \n", + "9 S1A_IW_GRDH_1SDV_20251231T060912_20251231T0609... \n", + "\n", + " bbox type \\\n", + "0 [-4.961516, 29.132935, -2.043568, 30.6371] Feature \n", + "1 [-4.750492, 30.215359, -1.708874, 32.141827] Feature \n", + "2 [-4.460252, 31.722683, -1.369323, 33.646049] Feature \n", + "3 [-4.168624, 33.229343, -1.009401, 35.147907] Feature \n", + "4 [-3.860411, 34.733044, -0.639349, 36.648712] Feature \n", + "5 [-3.545959, 36.235367, -0.277303, 38.150902] Feature \n", + "6 [-3.243545, 37.739258, 0.093031, 39.652462] Feature \n", + "7 [-2.937376, 39.242229, 0.463011, 41.154549] Feature \n", + "8 [-2.63635, 40.745724, 0.852503, 42.654728] Feature \n", + "9 [-2.321066, 42.246735, 1.270123, 44.15239] Feature \n", + "\n", + " links \\\n", + "0 [{'rel': 'collection', 'type': 'application/js... \n", + "1 [{'rel': 'collection', 'type': 'application/js... \n", + "2 [{'rel': 'collection', 'type': 'application/js... \n", + "3 [{'rel': 'collection', 'type': 'application/js... \n", + "4 [{'rel': 'collection', 'type': 'application/js... \n", + "5 [{'rel': 'collection', 'type': 'application/js... \n", + "6 [{'rel': 'collection', 'type': 'application/js... \n", + "7 [{'rel': 'collection', 'type': 'application/js... \n", + "8 [{'rel': 'collection', 'type': 'application/js... \n", + "9 [{'rel': 'collection', 'type': 'application/js... \n", + "\n", + " assets \\\n", + "0 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "1 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "2 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "3 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "4 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "5 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "6 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "7 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "8 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "9 {'vh': {'href': 's3://eodata/Sentinel-1/SAR/IW... \n", + "\n", + " geometry collection \\\n", + "0 {'type': 'Polygon', 'coordinates': [[[-2.28483... sentinel-1-grd \n", + "1 {'type': 'Polygon', 'coordinates': [[[-2.04354... sentinel-1-grd \n", + "2 {'type': 'Polygon', 'coordinates': [[[-1.70885... sentinel-1-grd \n", + "3 {'type': 'Polygon', 'coordinates': [[[-1.3693,... sentinel-1-grd \n", + "4 {'type': 'Polygon', 'coordinates': [[[-1.00938... sentinel-1-grd \n", + "5 {'type': 'Polygon', 'coordinates': [[[-0.63932... sentinel-1-grd \n", + "6 {'type': 'Polygon', 'coordinates': [[[-0.27728... sentinel-1-grd \n", + "7 {'type': 'Polygon', 'coordinates': [[[0.093054... sentinel-1-grd \n", + "8 {'type': 'Polygon', 'coordinates': [[[0.463035... sentinel-1-grd \n", + "9 {'type': 'Polygon', 'coordinates': [[[0.852526... sentinel-1-grd \n", + "\n", + " properties \\\n", + "0 {'created': '2025-12-31T06:01:17.880940Z', 'ex... \n", + "1 {'created': '2025-12-31T06:01:18.350244Z', 'ex... \n", + "2 {'created': '2025-12-31T06:12:00.285895Z', 'ex... \n", + "3 {'created': '2025-12-31T06:12:01.441023Z', 'ex... \n", + "4 {'created': '2025-12-31T06:11:58.380623Z', 'ex... \n", + "5 {'created': '2025-12-31T06:11:58.937265Z', 'ex... \n", + "6 {'created': '2025-12-31T06:11:47.595395Z', 'ex... \n", + "7 {'created': '2025-12-31T06:11:48.024200Z', 'ex... \n", + "8 {'created': '2025-12-31T06:12:00.578034Z', 'ex... \n", + "9 {'created': '2025-12-31T06:11:59.740213Z', 'ex... \n", + "\n", + " stac_extensions stac_version \n", + "0 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "1 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "2 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "3 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "4 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "5 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "6 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "7 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "8 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 \n", + "9 [https://cs-si.github.io/eopf-stac-extension/v... 1.1.0 " + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "params = {\n", + " \"filter-lang\": \"cql2-json\",\n", + " \"filter\": {\n", + " \"op\": \"and\",\n", + " \"args\": [\n", + " {\n", + " \"op\": \"=\",\n", + " \"args\": [\n", + " { \"property\": \"product:type\" },\n", + " \"IW_GRDH_1S\"\n", + " ]\n", + " },\n", + " {\n", + " \"op\": \"a_contains\",\n", + " \"args\": [\n", + " { \"property\": \"sar:polarizations\" },\n", + " \"VV\"\n", + " ]\n", + " },\n", + " {\n", + " \"op\": \"a_contains\",\n", + " \"args\": [\n", + " { \"property\": \"sar:polarizations\" },\n", + " \"VH\"\n", + " ]\n", + " }\n", + " ]\n", + " },\n", + " \"collections\": [\"sentinel-1-grd\"],\n", + " \"limit\": 10\n", + "}\n", + "\n", + "response = requests.post(stac_url, json=params)\n", + "\n", + "json = response.json()\n", + "\n", + "df_features = pd.DataFrame(json[\"features\"])\n", + "df_features" + ] + }, + { + "cell_type": "markdown", + "id": "7a9920d2-9817-43a5-b005-12cc045c3323", + "metadata": {}, + "source": [ + "# **Conclusion**\n", + "\n", + "This notebook highlights the fundamental differences between the OpenSearch (Resto) Catalogue API and the STAC Catalogue API, with a strong focus on discovery capabilities and query expressiveness. Resto provides a relatively flat and limited search interface, primarily centered around collection-level queries with a fixed set of parameters and constrained filtering logic. While sufficient for basic discovery use cases, this model restricts fine-grained access to metadata and limits the ability to precisely target individual products or their components.\n", + "\n", + "In contrast, STAC introduces a hierarchical and standardized data model that enables discovery at multiple levels, ranging from collections, through individual items, down to specific assets within an item. This multi-level access is combined with a significantly richer querying framework. Through extensions such as Query, Filter, Fields, and Sort, STAC allows users to construct complex spatial, temporal, and attribute-based queries, apply precise sorting rules, limit result sets, and control the structure and size of responses. These capabilities make it possible to efficiently narrow searches to highly specific subsets of data, optimize performance, and integrate discovery workflows more tightly with downstream processing.\n", + "\n", + "Thanks to this notebook and its step-by-step examples, understanding the STAC data model and transitioning existing workflows from OpenSearch to STAC should be straightforward and significantly easier to implement in practice.\n", + "\n", + "Overall, migrating from Resto to STAC is not merely a change of endpoint but a shift to a more powerful, extensible, and interoperable discovery paradigm. STAC enables more precise data selection, better scalability, and improved integration with modern geospatial and data processing ecosystems, making it a robust foundation for future Earth Observation data access and exploitation." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From a74da4f604b113bfe8c774c5e6b983d7ce220ea6 Mon Sep 17 00:00:00 2001 From: jtreska Date: Tue, 20 Jan 2026 13:20:09 +0100 Subject: [PATCH 3/3] Update migration_of_opensearch_to_stac_guide.ipynb --- geo/migration_of_opensearch_to_stac_guide.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geo/migration_of_opensearch_to_stac_guide.ipynb b/geo/migration_of_opensearch_to_stac_guide.ipynb index c3213a9..58b4494 100644 --- a/geo/migration_of_opensearch_to_stac_guide.ipynb +++ b/geo/migration_of_opensearch_to_stac_guide.ipynb @@ -8216,9 +8216,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "geo", "language": "python", - "name": "python3" + "name": "geo" }, "language_info": { "codemirror_mode": {