-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2025-03-05-DSE-stac.html
276 lines (247 loc) · 8.89 KB
/
2025-03-05-DSE-stac.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>STAC stuff</title>
<link rel="stylesheet" href="dist/reset.css" />
<link rel="stylesheet" href="dist/reveal.css" />
<link rel="stylesheet" href="dist/theme/devseed.css" />
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css" />
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h2>STAC stuff</h2>
<p>
<img src="img/STAC-04.png" height="128px" />
</p>
<p style="font-size: x-large">Pete Gadomski<br />2025-03-05</p>
</section>
<section>
<section>
<h2>STAC</h2>
<img
src="./img/open-specifications.excalidraw.png"
class="r-stretch"
/>
</section>
<section>
<h2>STAC</h2>
<img
src="./img/open-specifications-expanded.excalidraw.png"
class="r-stretch"
/>
</section>
<section>
<h2>STAC entities</h2>
<img class="r-stretch" src="img/stac-entities.excalidraw.png" />
</section>
<section>
<h2>Usage</h2>
<img class="r-stretch" src="img/stac-usage.excalidraw.png" />
</section>
<section>
<blockquote>STAC is the map to your data</blockquote>
<p style="margin-bottom: 3em">— Howard Butler</p>
<blockquote>STAC's sweet spot is L1 to L2</blockquote>
<p>— me</p>
</section>
</section>
<section>
<section>
<h2>In the wild</h2>
</section>
<section>
<img src="./img/landsat-stac.png" class="r-stretch" />
<p>
<a href="https://landsatlook.usgs.gov/stac-server">Landsat</a>
</p>
</section>
<section>
<img src="./img/esa-stac.png" class="r-stretch" />
<p>
<a href="https://browser.stac.dataspace.copernicus.eu"
>Copernicus</a
>
</p>
</section>
<section>
<img src="./img/planetary-computer.png" class="r-stretch" />
<p>
<a href="https://planetarycomputer.microsoft.com/"
>Microsoft Planetary Computer</a
>
</p>
</section>
<section>
<img src="./img/earth-search.png" class="r-stretch" />
<p>
<a href="https://console.earth-search.aws.element84.com/"
>AWS Earth Search</a
>
</p>
</section>
<section>
<img src="./img/umbra-stac.png" class="r-stretch" />
<p>
<a href="https://registry.opendata.aws/umbra-open-data/"
>Umbra Open Data</a
>
</p>
</section>
<section>
<h2>VEDA notebooks</h2>
<img src="./img/veda-notebook.png" class="r-stretch" />
<p>
<a
href="https://docs.openveda.cloud/user-guide/notebooks/datasets/ocean-npp-timeseries-analysis.html"
>open</a
>
</p>
</section>
</section>
<section>
<section>
<h2>Python STAC ecosystem</h2>
</section>
<section>
<h2>PySTAC</h2>
<pre><code data-trim data-noescape class="language-python" style="font-size: x-large;">
from pystac import Catalog
root_catalog = Catalog.from_file("./example-catalog/catalog.json")
collections = list(root_catalog.get_collections())
for collection in collections:
print(f"- {collection.id}")
items = list(root_catalog.get_items(recursive=True))
for item in items:
print(f"- {item.id}")
</code></pre>
<p>
<a href="https://github.com/stac-utils/pystac"
>stac-utils/pystac</a
>
</p>
</section>
<section>
<h2>pystac-client</h2>
<pre><code data-trim data-noescape class="language-python" style="font-size: x-large;">
from pystac_client import Client
client = Client.open("https://earth-search.aws.element84.com/v1")
search = client.search(
max_items=10,
collections=['sentinel-2-l2a'],
bbox=[-72.5,40.5,-72,41]
)
for item in search.items():
print(item.id)
</code></pre>
<p>
<a href="https://github.com/stac-utils/pystac-client"
>stac-utils/pystac-client</a
>
</p>
</section>
<section>
<h2>odc-stac and stackstac</h2>
<pre><code data-trim data-noescape class="language-python" style="font-size: large;">
import odc.stac
catalog = pystac_client.Client.open(...)
query = catalog.search(...)
xx = odc.stac.load(...)
</code></pre>
<pre><code data-trim data-noescape class="language-python" style="font-size: large;">
import stackstac
catalog = pystac_client.Client.open(...)
items = catalog.search(...).item_collection()
stack = stackstac.stack(items)
</code></pre>
<p>
<a href="https://github.com/opendatacube/odc-stac"
>opendatacube/odc-stac</a
>
<br />
<a href="https://github.com/gjoseph92/stackstac"
>gjoseph92/stackstac</a
>
</p>
</section>
<section>
<h2>stacrs (🤫 rustac)</h2>
<pre><code data-trim data-noescape class="language-python" style="font-size: x-large;">
import stacrs # soon to be import rustac
from geopandas import GeoDataFrame
table = await stacrs.search_to_arrow(...)
data_frame = GeoDataFrame.from_arrow(table)
items = stacrs.from_arrow(data_frame.to_arrow())
item_collection = await stacrs.search("s3://bucket/items.parquet", ...)
</code></pre>
<p>
<a href="https://github.com/stac-utils/stacrs"
>stac-utils/stacrs</a
>
</p>
</section>
</section>
<section>
<h2>rstac</h2>
<pre><code data-trim data-noescape class="language-r" style="font-size: x-large;">
nasa_stac <- stac("https://cmr.earthdata.nasa.gov/stac/LPCLOUD")
bbox = c( -123.824405, 39.485343, -123.748531, 39.556319)
extent = ext(c(bbox[1],bbox[3],bbox[2],bbox[4]))
search_hls <- stac_search(
q = nasa_stac, # The STAC API connection we made earlier
collections = "HLSS30.v2.0", # https://lpdaac.usgs.gov/products/hlss30v002/
bbox = bbox, #bounding box that we made eariler
datetime = "2023-06-01T00:00:00Z/2023-07-30T00:00:00Z", # A closed interval: e.g. "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z"
limit = 100 #limits how many results we see
)
</code></pre>
<p>
<a href="https://github.com/brazil-data-cube/rstac"
>brazil-data-cube/rstac</a
>
</p>
</section>
<section>
<h2>Looking forward</h2>
<img src="./img/mountain.jpg" class="r-stretch" />
</section>
<section>
<h2>Fin</h2>
<p>Thank you for your time</p>
<ul style="font-size: x-large">
<li>
<a
href="https://www.gadom.ski/presentations/2025-03-05-DSE-stac.html"
>slides</a
>
</li>
<li>
<a href="https://github.com/gadomski/presentations">repo</a>
</li>
</ul>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes],
});
</script>
</body>
</html>