|
27 | 27 | "id": "3a06tk9sxuh", |
28 | 28 | "metadata": { |
29 | 29 | "execution": { |
30 | | - "iopub.execute_input": "2026-03-09T15:24:35.820959Z", |
31 | | - "iopub.status.busy": "2026-03-09T15:24:35.820856Z", |
32 | | - "iopub.status.idle": "2026-03-09T15:24:36.961690Z", |
33 | | - "shell.execute_reply": "2026-03-09T15:24:36.960684Z" |
| 30 | + "iopub.execute_input": "2026-03-09T15:30:49.123715Z", |
| 31 | + "iopub.status.busy": "2026-03-09T15:30:49.123629Z", |
| 32 | + "iopub.status.idle": "2026-03-09T15:30:50.272830Z", |
| 33 | + "shell.execute_reply": "2026-03-09T15:30:50.272259Z" |
34 | 34 | } |
35 | 35 | }, |
36 | 36 | "outputs": [], |
|
57 | 57 | "id": "mqtgqmsnvlp", |
58 | 58 | "metadata": { |
59 | 59 | "execution": { |
60 | | - "iopub.execute_input": "2026-03-09T15:24:36.963072Z", |
61 | | - "iopub.status.busy": "2026-03-09T15:24:36.962807Z", |
62 | | - "iopub.status.idle": "2026-03-09T15:24:37.032462Z", |
63 | | - "shell.execute_reply": "2026-03-09T15:24:37.031655Z" |
| 60 | + "iopub.execute_input": "2026-03-09T15:30:50.274712Z", |
| 61 | + "iopub.status.busy": "2026-03-09T15:30:50.274450Z", |
| 62 | + "iopub.status.idle": "2026-03-09T15:30:50.338586Z", |
| 63 | + "shell.execute_reply": "2026-03-09T15:30:50.338001Z" |
64 | 64 | } |
65 | 65 | }, |
66 | 66 | "outputs": [], |
|
109 | 109 | "id": "2fgm4xz3uwj", |
110 | 110 | "metadata": { |
111 | 111 | "execution": { |
112 | | - "iopub.execute_input": "2026-03-09T15:24:37.033546Z", |
113 | | - "iopub.status.busy": "2026-03-09T15:24:37.033449Z", |
114 | | - "iopub.status.idle": "2026-03-09T15:24:37.759309Z", |
115 | | - "shell.execute_reply": "2026-03-09T15:24:37.758777Z" |
| 112 | + "iopub.execute_input": "2026-03-09T15:30:50.339809Z", |
| 113 | + "iopub.status.busy": "2026-03-09T15:30:50.339694Z", |
| 114 | + "iopub.status.idle": "2026-03-09T15:30:51.046768Z", |
| 115 | + "shell.execute_reply": "2026-03-09T15:30:51.046259Z" |
116 | 116 | } |
117 | 117 | }, |
118 | 118 | "outputs": [], |
|
145 | 145 | "id": "7ah4bm6v5ut", |
146 | 146 | "metadata": { |
147 | 147 | "execution": { |
148 | | - "iopub.execute_input": "2026-03-09T15:24:37.760483Z", |
149 | | - "iopub.status.busy": "2026-03-09T15:24:37.760378Z", |
150 | | - "iopub.status.idle": "2026-03-09T15:24:38.303162Z", |
151 | | - "shell.execute_reply": "2026-03-09T15:24:38.302527Z" |
| 148 | + "iopub.execute_input": "2026-03-09T15:30:51.047924Z", |
| 149 | + "iopub.status.busy": "2026-03-09T15:30:51.047834Z", |
| 150 | + "iopub.status.idle": "2026-03-09T15:30:51.568614Z", |
| 151 | + "shell.execute_reply": "2026-03-09T15:30:51.567915Z" |
152 | 152 | } |
153 | 153 | }, |
154 | 154 | "outputs": [], |
|
190 | 190 | "id": "nkzw9wmyxio", |
191 | 191 | "metadata": { |
192 | 192 | "execution": { |
193 | | - "iopub.execute_input": "2026-03-09T15:24:38.304357Z", |
194 | | - "iopub.status.busy": "2026-03-09T15:24:38.304247Z", |
195 | | - "iopub.status.idle": "2026-03-09T15:24:38.663836Z", |
196 | | - "shell.execute_reply": "2026-03-09T15:24:38.663308Z" |
| 193 | + "iopub.execute_input": "2026-03-09T15:30:51.570036Z", |
| 194 | + "iopub.status.busy": "2026-03-09T15:30:51.569932Z", |
| 195 | + "iopub.status.idle": "2026-03-09T15:30:51.920501Z", |
| 196 | + "shell.execute_reply": "2026-03-09T15:30:51.919825Z" |
197 | 197 | } |
198 | 198 | }, |
199 | 199 | "outputs": [], |
|
225 | 225 | "id": "keurc3dmugs", |
226 | 226 | "metadata": { |
227 | 227 | "execution": { |
228 | | - "iopub.execute_input": "2026-03-09T15:24:38.664895Z", |
229 | | - "iopub.status.busy": "2026-03-09T15:24:38.664788Z", |
230 | | - "iopub.status.idle": "2026-03-09T15:24:38.792508Z", |
231 | | - "shell.execute_reply": "2026-03-09T15:24:38.791940Z" |
| 228 | + "iopub.execute_input": "2026-03-09T15:30:51.921620Z", |
| 229 | + "iopub.status.busy": "2026-03-09T15:30:51.921522Z", |
| 230 | + "iopub.status.idle": "2026-03-09T15:30:52.045363Z", |
| 231 | + "shell.execute_reply": "2026-03-09T15:30:52.044567Z" |
232 | 232 | } |
233 | 233 | }, |
234 | 234 | "outputs": [], |
|
303 | 303 | "cell_type": "code", |
304 | 304 | "id": "2hogpjtllw7", |
305 | 305 | "source": [ |
306 | | - "import os, rasterio\n", |
307 | | - "from rasterio.windows import Window\n", |
| 306 | + "import os\n", |
| 307 | + "import rioxarray\n", |
308 | 308 | "\n", |
309 | 309 | "os.environ['AWS_NO_SIGN_REQUEST'] = 'YES'\n", |
310 | 310 | "os.environ['GDAL_DISABLE_READDIR_ON_OPEN'] = 'EMPTY_DIR'\n", |
|
316 | 316 | ")\n", |
317 | 317 | "\n", |
318 | 318 | "try:\n", |
319 | | - " with rasterio.open(COG_URL) as src:\n", |
320 | | - " nir = src.read(1, window=Window(5300, 2100, 500, 500)).astype(np.float64)\n", |
| 319 | + " nir_da = rioxarray.open_rasterio(COG_URL).isel(band=0, y=slice(2100, 2600), x=slice(5300, 5800))\n", |
| 320 | + " nir = nir_da.load().values.astype(np.float64)\n", |
321 | 321 | " print(f'Downloaded NIR band: {nir.shape}, range {nir.min():.0f}\u2013{nir.max():.0f}')\n", |
322 | 322 | "except Exception as exc:\n", |
323 | 323 | " print(f'Remote read failed ({exc}), using synthetic fallback')\n", |
|
338 | 338 | ], |
339 | 339 | "metadata": { |
340 | 340 | "execution": { |
341 | | - "iopub.execute_input": "2026-03-09T15:24:38.793620Z", |
342 | | - "iopub.status.busy": "2026-03-09T15:24:38.793519Z", |
343 | | - "iopub.status.idle": "2026-03-09T15:24:40.121299Z", |
344 | | - "shell.execute_reply": "2026-03-09T15:24:40.120560Z" |
| 341 | + "iopub.execute_input": "2026-03-09T15:30:52.046807Z", |
| 342 | + "iopub.status.busy": "2026-03-09T15:30:52.046700Z", |
| 343 | + "iopub.status.idle": "2026-03-09T15:30:53.261434Z", |
| 344 | + "shell.execute_reply": "2026-03-09T15:30:53.260895Z" |
345 | 345 | } |
346 | 346 | }, |
347 | 347 | "execution_count": null, |
|
385 | 385 | ], |
386 | 386 | "metadata": { |
387 | 387 | "execution": { |
388 | | - "iopub.execute_input": "2026-03-09T15:24:40.122870Z", |
389 | | - "iopub.status.busy": "2026-03-09T15:24:40.122512Z", |
390 | | - "iopub.status.idle": "2026-03-09T15:24:45.554736Z", |
391 | | - "shell.execute_reply": "2026-03-09T15:24:45.554227Z" |
| 388 | + "iopub.execute_input": "2026-03-09T15:30:53.262766Z", |
| 389 | + "iopub.status.busy": "2026-03-09T15:30:53.262453Z", |
| 390 | + "iopub.status.idle": "2026-03-09T15:30:58.515207Z", |
| 391 | + "shell.execute_reply": "2026-03-09T15:30:58.514628Z" |
392 | 392 | } |
393 | 393 | }, |
394 | 394 | "execution_count": null, |
|
445 | 445 | ], |
446 | 446 | "metadata": { |
447 | 447 | "execution": { |
448 | | - "iopub.execute_input": "2026-03-09T15:24:45.556433Z", |
449 | | - "iopub.status.busy": "2026-03-09T15:24:45.556320Z", |
450 | | - "iopub.status.idle": "2026-03-09T15:24:46.981187Z", |
451 | | - "shell.execute_reply": "2026-03-09T15:24:46.980549Z" |
| 448 | + "iopub.execute_input": "2026-03-09T15:30:58.517250Z", |
| 449 | + "iopub.status.busy": "2026-03-09T15:30:58.517125Z", |
| 450 | + "iopub.status.idle": "2026-03-09T15:30:59.860739Z", |
| 451 | + "shell.execute_reply": "2026-03-09T15:30:59.860156Z" |
452 | 452 | } |
453 | 453 | }, |
454 | 454 | "execution_count": null, |
|
497 | 497 | ], |
498 | 498 | "metadata": { |
499 | 499 | "execution": { |
500 | | - "iopub.execute_input": "2026-03-09T15:24:46.982646Z", |
501 | | - "iopub.status.busy": "2026-03-09T15:24:46.982318Z", |
502 | | - "iopub.status.idle": "2026-03-09T15:24:47.183340Z", |
503 | | - "shell.execute_reply": "2026-03-09T15:24:47.182726Z" |
| 500 | + "iopub.execute_input": "2026-03-09T15:30:59.862223Z", |
| 501 | + "iopub.status.busy": "2026-03-09T15:30:59.861896Z", |
| 502 | + "iopub.status.idle": "2026-03-09T15:31:00.062349Z", |
| 503 | + "shell.execute_reply": "2026-03-09T15:31:00.061769Z" |
504 | 504 | } |
505 | 505 | }, |
506 | 506 | "execution_count": null, |
|
0 commit comments