You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tato dokumentace popisuje STAC katalog (SpatioTemporal Asset Catalog) vytvořený pro organizaci a správu metadat produktů
3
-
dálkového průzkumu Země. Katalog zahrnuje data z programů [Sentinel](./sentinel.md), [Landsat](./landsat.md) a [ERA5](./era5.md),
4
-
která jsou rozřazena do kolekcí.
5
-
Relevantní popisy použití STAC katalogu naleznete také na stránkách těchto programů v této dokumentaci.
6
-
Katalog je přístupný na adrese [https://stac.cesnet.cz/](https://stac.cesnet.cz/).
1
+
# STAC Catalog
7
2
8
-
## Struktura katalogu
9
-
Podrobná specifikace STAC katalogu je dostupná v angličtině na [https://stacspec.org/en/about/stac-spec/](https://stacspec.org/en/about/stac-spec/).
3
+
This documentation describes the STAC catalog (SpatioTemporal Asset Catalog) created for the organization and management of Earth observation product metadata. The catalog includes data from the [Sentinel](./sentinel.md), [Landsat](./landsat.md), and [ERA5](./era5.md) programs, which are categorized into collections.
10
4
11
-
**Katalog** - STAC katalog je způsob, jak uspořádat a propojit data, aby se dala snadno procházet a vyhledávat.
12
-
Funguje jako seznam, který obsahuje data a odkazy na další (pod)katalogy.
5
+
Relevant usage descriptions of the STAC catalog can also be found on the pages of these programs in this documentation.
13
6
14
-
**Kolekce** - STAC kolekce poskytuje dodatečné informace o souboru dat (např. část dat Sentinelu 1 - kolekce sentinel-1-slc).
15
-
Rozšiřuje funkčnost katalogu přidáním dalších polí, která umožňují popis prostorového a časového rozsahu dat,
16
-
licence, klíčových slov, poskytovatelů, apod. Seznam kolekcí je přístupný na endpointu [/collections](https://stac.vm.cesnet.cz/collections).
7
+
The catalog is accessible at [https://stac.cesnet.cz/](https://stac.cesnet.cz/).
17
8
18
-
**Item** - STAC item je ucelený záznam obsahující data a metadata, jehož specifikace může obsahovat časovou značku, náhledový obrázek,
19
-
odkazy k datům, odkazy k relevantním itemům a asset linky.
9
+
## STAC Catalog Structure
20
10
21
-
**Asset** - soubor přidružený ke konkrétnímu itemu. Asset je možné stáhnout, např.
22
-
náhledový obrázek, GeoTIFF nebo NetCDF soubor. Součástí metadat assetu jsou informace jako název, popis, typ a odkaz na soubor (_href_).
11
+
A detailed specification of the STAC catalog is available at [STAC Specification](https://stacspec.org/en/about/stac-spec/).
12
+
13
+
### **Catalog**
14
+
A STAC catalog is a way of organizing and linking data so that it can be easily browsed and searched. It functions like a list containing data and links to other (sub)catalogs.
15
+
16
+
### **Collection**
17
+
A STAC collection provides additional information about a set of data (e.g., part of Sentinel 1 data - collection sentinel-1-slc). It extends the functionality of the catalog by adding fields that describe the spatial and temporal extent of the data, licenses, keywords, providers, etc. The list of collections is available at the endpoint [/collections](https://stac.vm.cesnet.cz/collections).
18
+
19
+
### **Item**
20
+
A STAC item is a self-contained record containing data and metadata. Its specification may include a timestamp, a thumbnail image, data links, links to relevant items, and asset links.
21
+
22
+
### **Asset**
23
+
An asset is a file associated with a specific item. An asset can be downloaded, e.g., a thumbnail image, GeoTIFF, or NetCDF file. The metadata of an asset includes information such as name, description, type, and the link to the file (`_href_`).
23
24
24
25
## API
25
-
Pro volání API použijte identickou adresu [https://stac.cesnet.cz/](https://stac.cesnet.cz/).
26
-
Podrobná dokumentace metod je k dispozici v angličtině zde: [https://stac.cesnet.cz/api.html](https://stac.cesnet.cz/api.html).
27
-
Pro prohledávání není potřeba autentizace.
28
26
29
-
K vyhledání produktů slouží endpoint [/search](https://stac.cesnet.cz/search).
30
-
Na tento endpoint v těle requestu zasíláte JSON obsahující ohraničující body (_bbox_) a časové rozmezí.
27
+
To call the API, use the identical address [https://stac.cesnet.cz/](https://stac.cesnet.cz/).
28
+
29
+
A detailed documentation of the methods is available in the [API Documentation](https://stac.cesnet.cz/api.html).
30
+
31
+
Authentication is not required for searching.
32
+
33
+
To search for products, use the endpoint [/search](https://stac.cesnet.cz/search). In the body of the request, you send a JSON containing bounding box (_bbox_) and time range.
34
+
31
35
32
36
```
33
37
{
@@ -36,7 +40,7 @@ Na tento endpoint v těle requestu zasíláte JSON obsahující ohraničující
36
40
}
37
41
```
38
42
39
-
Odpověď získáte v následujícím formátu:
43
+
The response will be returned in the following format:
40
44
41
45
```
42
46
{
@@ -54,59 +58,60 @@ Odpověď získáte v následujícím formátu:
54
58
]
55
59
}
56
60
```
57
-
kde **features** obsahuje itemy splňující vyhledávací parametry, **numberMatched** obsahuje celkový počet itemů splňujících
58
-
vyhledávací parametry, **numberReturned** počet aktuálně vrácených itemů a **href** zanořený v **links** je URL odkazující na další
59
-
stránku výsledků tohoto vyhledávání.
60
61
62
+
where **features** contains the items matching the search parameters, **numberMatched** contains the total number of items matching the search parameters, **numberReturned** is the number of items currently returned, and **href** nested within **links** is the URL pointing to the next page of search results.
63
+
64
+
## Browser
65
+
A product browser is also available through the graphical interface: [https://stac.cesnet.cz/browser/](https://stac.cesnet.cz/browser/).
61
66
62
-
## Prohlížeč
63
-
Rovněž je k dispozici prohlížeč produktů v grafickém rozhraní: [https://stac.cesnet.cz/browser/](https://stac.cesnet.cz/browser/).
64
67

65
-
I zde jsou data rozřazena do kolekcí a je možné stáhnout jednotlivé assety.
66
68
67
-
## PySTAC a další knihovny Pythonu pro práci s geoprostorovými daty
68
-
Python poskytuje knihovnu [PySTAC](https://pystac.readthedocs.io/en/stable/), která umožňuje práci se STAC katalogem.
69
-
Při jejím použití je nutné použít API adresu [https://stac.vm.cesnet.cz/](https://stac.vm.cesnet.cz/).
69
+
Data is also organized into collections here, and individual assets can be downloaded.
70
+
71
+
## Python Libraries for Geospatial Data
72
+
73
+
Python provides the [PySTAC](https://pystac.readthedocs.io/en/stable/) library, which allows working with the STAC catalog.
74
+
75
+
When using it, you need to use the API address [https://stac.vm.cesnet.cz/](https://stac.vm.cesnet.cz/).
70
76
71
77
```python
72
78
from pystac_client import Client
73
79
api_url ="https://stac.vm.cesnet.cz/"
74
80
client = Client.open(api_url)
75
81
```
76
82
77
-
Příklad práce s kolekcí
83
+
Below is an example of how to work with a collection using the STAC API.
Knihovna [Leafmap](https://leafmap.org/) slouží v prostředí Jupyter notebooků pro geoprostorovou analýzu
85
-
a umožňuje získání souřadnic, které dále využijeme po práci s knihovnou PySTAC. Pokud již známe souřadnice,
86
-
využijeme filtr `intersects` (protínání bodu), nebo `bbox` (ohraničená oblast). Následující příklady jsou
87
-
inspirovány [existujícím návodem v angličtině](https://carpentries-incubator.github.io/geospatial-python/instructor/05-access-data.html#search-a-stac-catalog).
91
+
The [Leafmap](https://leafmap.org/) library is used in Jupyter notebooks for geospatial analysis. It allows you to retrieve coordinates, which can then be utilized when working with the PySTAC library. Another option is to use some online tool such as a [bbox finder](http://bboxfinder.com).
92
+
93
+
If you already know the coordinates, you can use the `intersects` filter (for point intersection) or the `bbox` filter (for bounding box). The following examples are inspired by the [existing tutorial in English](https://carpentries-incubator.github.io/geospatial-python/instructor/05-access-data.html#search-a-stac-catalog).
88
94
89
95
```python
90
96
from shapely.geometry import Point
91
-
point = Point(16.6068, 49.1951) #souřadnice Brna
97
+
point = Point(16.6068, 49.1951) #coordinates of Brno
92
98
search = client.search(
93
99
collections=[s1_collection],
94
100
intersects=point,
95
-
max_items=10, #omezení na počet výsledků
96
-
method="GET"#výchozí metoda vyžaduje autentizaci, je nutné explicitně specifikovat GET
101
+
max_items=10, #limit on items of response
102
+
method="GET"#the default method requires authentication, so it is necessary to explicitly specify GET
97
103
)
98
104
print(search.matched())
99
105
```
100
106
101
-
Výsledek zobrazí, kolik itemů odpovídá zadání - příslušnost ke kolekci sentinel-1-grd a protínání Brna.
107
+
The result will display how many items match the query - specifically belonging to the sentinel-1-grd collection and intersecting with Brno.
102
108
103
109
```python
104
110
for item in (search.item_collection()):
105
111
print(item.properties)
106
112
```
107
113
108
-
Výsledek vyhledávání můžeme dále iterovat a zjistit podrobnosti o každém z 10 vrácených itemů. Výsledná
109
-
metadata mají podobný formát:
114
+
The search results can be iterated further to retrieve details about each of the 10 returned items. The resulting metadata will have a similar format:
110
115
111
116
```json
112
117
{
@@ -135,13 +140,15 @@ metadata mají podobný formát:
135
140
}
136
141
```
137
142
138
-
Pro přístup k odkazům ke stažení konkrétních snímků musíme přistoupit k assetům, které můžeme vylistovat.
143
+
To access the download links for specific images, we need to access the assets, which can be listed.
144
+
139
145
```python
140
146
assets = items[0].assets
141
147
print(assets.keys())
142
148
```
143
149
144
-
V nich pak můžeme vybírat odkazy na např. náhledový obrázek, který získáme z daného linku:
150
+
In these, we can then select links to, for example, the preview image, which we can obtain from the given link:
151
+
145
152
```python
146
153
import requests
147
154
from matplotlib import pyplot as plt
@@ -157,3 +164,7 @@ plt.show()
157
164
```
158
165
159
166

167
+
168
+
## Tutorial
169
+
170
+
A more complex tutorial for several use cases was prepared for the CSCALE project. You can follow the tutorial at [C-SCALE Data Discovery Notebook](related/notebooks/c-scale-notebooks/1-C-SCALE_Data_Discovery.ipynb).
0 commit comments