|
35 | 35 | "\n", |
36 | 36 | "**Data Credit**:\n", |
37 | 37 | "- NASA Shuttle Radar Topography Mission Global 1 arc second provided by The Land Processes Distributed Active Archive Center (LP DAAC). Downloaded using the [30-Meter SRTM Tile Downloader](https://dwtkns.com/srtm30m/).\n", |
38 | | - "- Made with Natural Earth. Free vector and raster map data @ naturalearthdata.com." |
| 38 | + "- Made with Natural Earth. Free vector and raster map data @ naturalearthdata.com.\n", |
| 39 | + "\n", |
| 40 | + "\n", |
| 41 | + "**Watch Video Walkthrough** <a href='https://www.youtube.com/watch?v=Ff9ctKNlku0' target='_blank'><img src='https://github.com/spatialthoughts/geopython-tutorials/blob/main/images/yt_logo.png?raw=1'></a>" |
39 | 42 | ] |
40 | 43 | }, |
41 | 44 | { |
|
53 | 56 | }, |
54 | 57 | { |
55 | 58 | "cell_type": "code", |
56 | | - "execution_count": 3, |
| 59 | + "execution_count": null, |
57 | 60 | "id": "27ab242e-e140-4afe-a6e8-c9f044bec425", |
58 | 61 | "metadata": { |
59 | 62 | "id": "27ab242e-e140-4afe-a6e8-c9f044bec425" |
|
67 | 70 | }, |
68 | 71 | { |
69 | 72 | "cell_type": "code", |
70 | | - "execution_count": 17, |
| 73 | + "execution_count": null, |
71 | 74 | "id": "3decd0de-ae44-4d80-80b6-51223cc36ffe", |
72 | 75 | "metadata": { |
73 | 76 | "id": "3decd0de-ae44-4d80-80b6-51223cc36ffe" |
|
85 | 88 | }, |
86 | 89 | { |
87 | 90 | "cell_type": "code", |
88 | | - "execution_count": 4, |
| 91 | + "execution_count": null, |
89 | 92 | "id": "e1c0ed63-39db-4689-9a65-f6eb7de98f19", |
90 | 93 | "metadata": { |
91 | 94 | "id": "e1c0ed63-39db-4689-9a65-f6eb7de98f19" |
|
103 | 106 | }, |
104 | 107 | { |
105 | 108 | "cell_type": "code", |
106 | | - "execution_count": 5, |
| 109 | + "execution_count": null, |
107 | 110 | "id": "782466e6-1f57-437f-a564-dda8caeb87db", |
108 | 111 | "metadata": { |
109 | 112 | "id": "782466e6-1f57-437f-a564-dda8caeb87db" |
|
165 | 168 | }, |
166 | 169 | { |
167 | 170 | "cell_type": "code", |
168 | | - "execution_count": 6, |
| 171 | + "execution_count": null, |
169 | 172 | "id": "HbDnBfLpGH4Q", |
170 | 173 | "metadata": { |
171 | 174 | "id": "HbDnBfLpGH4Q" |
|
212 | 215 | }, |
213 | 216 | { |
214 | 217 | "cell_type": "code", |
215 | | - "execution_count": 8, |
| 218 | + "execution_count": null, |
216 | 219 | "id": "e6428cb4-0d19-4ffd-bea4-e3109dae33d3", |
217 | 220 | "metadata": { |
218 | 221 | "id": "e6428cb4-0d19-4ffd-bea4-e3109dae33d3" |
|
251 | 254 | "id": "kXbQ-J5o7PmN" |
252 | 255 | }, |
253 | 256 | "id": "kXbQ-J5o7PmN", |
254 | | - "execution_count": 10, |
| 257 | + "execution_count": null, |
255 | 258 | "outputs": [] |
256 | 259 | }, |
257 | 260 | { |
|
292 | 295 | "outputId": "dbf93e5a-ae27-4e40-a5d9-a2e050da1ff9" |
293 | 296 | }, |
294 | 297 | "id": "3EfywFl39UFt", |
295 | | - "execution_count": 11, |
| 298 | + "execution_count": null, |
296 | 299 | "outputs": [ |
297 | 300 | { |
298 | 301 | "output_type": "display_data", |
|
341 | 344 | }, |
342 | 345 | { |
343 | 346 | "cell_type": "code", |
344 | | - "execution_count": 19, |
| 347 | + "execution_count": null, |
345 | 348 | "id": "ioN2PJdyG4ow", |
346 | 349 | "metadata": { |
347 | 350 | "id": "ioN2PJdyG4ow" |
348 | 351 | }, |
349 | 352 | "outputs": [], |
350 | 353 | "source": [ |
351 | | - "clipped = merged.rio.clip(filtered_gdf.geometry)\n" |
352 | | - ] |
353 | | - }, |
354 | | - { |
355 | | - "cell_type": "markdown", |
356 | | - "id": "R9Mk5hdbd9eX", |
357 | | - "metadata": { |
358 | | - "id": "R9Mk5hdbd9eX" |
359 | | - }, |
360 | | - "source": [ |
361 | | - "Our clipped data has -32768 as nodata. We mask these and [encode the correct nodata](https://corteva.github.io/rioxarray/stable/getting_started/nodata_management.html#Manually-masking-data) value." |
362 | | - ] |
363 | | - }, |
364 | | - { |
365 | | - "cell_type": "code", |
366 | | - "execution_count": null, |
367 | | - "id": "rrYhsQEUutls", |
368 | | - "metadata": { |
369 | | - "id": "rrYhsQEUutls" |
370 | | - }, |
371 | | - "outputs": [], |
372 | | - "source": [ |
373 | | - "clipped = clipped.where(clipped != clipped.rio.nodata)\n", |
374 | | - "clipped.rio.write_nodata(clipped.rio.nodata, encoded=True, inplace=True)\n", |
375 | | - "clipped" |
| 354 | + "clipped = merged.rio.clip(filtered_gdf.geometry)" |
376 | 355 | ] |
377 | 356 | }, |
378 | 357 | { |
|
387 | 366 | }, |
388 | 367 | { |
389 | 368 | "cell_type": "code", |
390 | | - "execution_count": 21, |
| 369 | + "execution_count": null, |
391 | 370 | "id": "UQk5MB6JMsuH", |
392 | 371 | "metadata": { |
393 | 372 | "id": "UQk5MB6JMsuH" |
|
0 commit comments