{ "cells": [ { "cell_type": "markdown", "id": "a1433e0d", "metadata": {}, "source": [ "# Query and Stack Imagery into a GIF Using stackstac and Dask\n", "\n", "**Attribution**: This tutorial is developed based on the [example](https://stackstac.readthedocs.io/en/latest/examples/gif.html) provided in the stackstac documentation. \n", "\n", "We'll load all the [Landsat-8 (Collection 2, Level 2)](https://planetarycomputer.microsoft.com/dataset/landsat-8-c2-l2) data that's available from [Microsoft's Planetary Computer](https://planetarycomputer.microsoft.com/) over a small region on the coast of [Cape Cod](https://www.google.com/maps/place/Chatham,+MA/@41.7498076,-70.2026227,10.73z/data=!4m13!1m7!3m6!1s0x89fb15440149e94d:0x1f9c0efa001cb20b!2sCape+Cod!3b1!8m2!3d41.6687897!4d-70.2962408!3m4!1s0x89fb142168afbe53:0x714436ec7d485a53!8m2!3d41.6821432!4d-69.9597359), Massachusetts, USA.\n", "\n", "Using nothing but standard xarray syntax, we'll mask cloudy pixels with the Landsat QA band and reduce the data down to biannual median composites. We will use Dask to make this much faster. \n", "\n", "[Animated](https://geogif.readthedocs.io/en/latest/) as a GIF, we can watch the coastline move over the years due to [longshore drift](https://en.wikipedia.org/wiki/Longshore_drift)." ] }, { "cell_type": "markdown", "id": "12713e89", "metadata": {}, "source": [ "You can access this notebook (in a Docker image) on this [GitHub repo](https://github.com/HamedAlemo/dask-tutorial)." ] }, { "cell_type": "code", "execution_count": 1, "id": "1f282b25-b790-4c33-bab1-6f479e51d305", "metadata": { "tags": [] }, "outputs": [], "source": [ "import dask\n", "import pystac_client\n", "import planetary_computer\n", "import leafmap\n", "import geogif\n", "import stackstac" ] }, { "cell_type": "markdown", "id": "56105e54-1f0d-4ba2-97a5-b8de15d778eb", "metadata": {}, "source": [ "Start your Dask cluster:" ] }, { "cell_type": "code", "execution_count": 2, "id": "779d87e1-e10b-4b05-a3ec-04882781a0db", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "
\n", "
\n", "

Client

\n", "

Client-6607a032-8729-11ef-80fe-0242ac110002

\n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "
Connection method: Cluster objectCluster type: distributed.LocalCluster
\n", " Dashboard: http://127.0.0.1:8787/status\n", "
\n", "\n", " \n", " \n", " \n", "\n", " \n", "
\n", "

Cluster Info

\n", "
\n", "
\n", "
\n", "
\n", "

LocalCluster

\n", "

f5532b7f

\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", "\n", " \n", "
\n", " Dashboard: http://127.0.0.1:8787/status\n", " \n", " Workers: 5\n", "
\n", " Total threads: 5\n", " \n", " Total memory: 7.67 GiB\n", "
Status: runningUsing processes: True
\n", "\n", "
\n", " \n", "

Scheduler Info

\n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", "

Scheduler

\n", "

Scheduler-00953ed9-9f76-4f5c-8a21-f27ca5f46b48

\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
\n", " Comm: tcp://127.0.0.1:40851\n", " \n", " Workers: 5\n", "
\n", " Dashboard: http://127.0.0.1:8787/status\n", " \n", " Total threads: 5\n", "
\n", " Started: Just now\n", " \n", " Total memory: 7.67 GiB\n", "
\n", "
\n", "
\n", "\n", "
\n", " \n", "

Workers

\n", "
\n", "\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "

Worker: 0

\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", " \n", "\n", "
\n", " Comm: tcp://127.0.0.1:45323\n", " \n", " Total threads: 1\n", "
\n", " Dashboard: http://127.0.0.1:39459/status\n", " \n", " Memory: 1.53 GiB\n", "
\n", " Nanny: tcp://127.0.0.1:33483\n", "
\n", " Local directory: /tmp/dask-worker-space/worker-0sm5aun5\n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "

Worker: 1

\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", " \n", "\n", "
\n", " Comm: tcp://127.0.0.1:39923\n", " \n", " Total threads: 1\n", "
\n", " Dashboard: http://127.0.0.1:42603/status\n", " \n", " Memory: 1.53 GiB\n", "
\n", " Nanny: tcp://127.0.0.1:35887\n", "
\n", " Local directory: /tmp/dask-worker-space/worker-m5hkut_g\n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "

Worker: 2

\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", " \n", "\n", "
\n", " Comm: tcp://127.0.0.1:35045\n", " \n", " Total threads: 1\n", "
\n", " Dashboard: http://127.0.0.1:42285/status\n", " \n", " Memory: 1.53 GiB\n", "
\n", " Nanny: tcp://127.0.0.1:35307\n", "
\n", " Local directory: /tmp/dask-worker-space/worker-uk_b1erf\n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "

Worker: 3

\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", " \n", "\n", "
\n", " Comm: tcp://127.0.0.1:38185\n", " \n", " Total threads: 1\n", "
\n", " Dashboard: http://127.0.0.1:42747/status\n", " \n", " Memory: 1.53 GiB\n", "
\n", " Nanny: tcp://127.0.0.1:46121\n", "
\n", " Local directory: /tmp/dask-worker-space/worker-1j__7a1l\n", "
\n", "
\n", "
\n", "
\n", " \n", "
\n", "
\n", "
\n", "
\n", " \n", "

Worker: 4

\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " \n", "\n", " \n", "\n", "
\n", " Comm: tcp://127.0.0.1:46875\n", " \n", " Total threads: 1\n", "
\n", " Dashboard: http://127.0.0.1:43369/status\n", " \n", " Memory: 1.53 GiB\n", "
\n", " Nanny: tcp://127.0.0.1:46023\n", "
\n", " Local directory: /tmp/dask-worker-space/worker-pm6377o2\n", "
\n", "
\n", "
\n", "
\n", " \n", "\n", "
\n", "
\n", "\n", "
\n", "
\n", "
\n", "
\n", " \n", "\n", "
\n", "
" ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from dask.distributed import Client, LocalCluster\n", "cluster = LocalCluster()\n", "client = Client(cluster)\n", "client" ] }, { "cell_type": "markdown", "id": "5c493e73-52eb-4ba5-b1df-ad057fdf42c5", "metadata": {}, "source": [ "Interactively pick the area of interest from a map. Just move the map around and re-run all cells to generate the timeseries somewhere else!" ] }, { "cell_type": "code", "execution_count": 3, "id": "2b9cbced-693f-4c14-a1e9-5d00509f9e4f", "metadata": { "tags": [] }, "outputs": [], "source": [ "import leafmap" ] }, { "cell_type": "code", "execution_count": 4, "id": "e8489395-a3da-4ea8-adb3-01462d5b5feb", "metadata": { "tags": [] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6c29ee8be5e64de390f0e4bf26c267f8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Map(center=[41.64933994767867, -69.94438630063088], controls=(ZoomControl(options=['position', 'zoom_in_text',…" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m = leafmap.Map(center=[41.64933994767867, -69.94438630063088], zoom=12, height=\"800px\")\n", "m" ] }, { "cell_type": "code", "execution_count": 5, "id": "64a8d51d-3eae-4839-a34f-0d91b43cd4ef", "metadata": { "tags": [] }, "outputs": [], "source": [ "bbox = (m.west, m.south, m.east, m.north)" ] }, { "cell_type": "markdown", "id": "3e7c17dc-7a70-4fdd-bbe9-149fac625559", "metadata": {}, "source": [ "## Search for STAC items\n", "\n", "Use [pystac-client](https://github.com/stac-utils/pystac-client) to connect to Microsoft's STAC API endpoint and search for Landsat-8 scenes." ] }, { "cell_type": "code", "execution_count": 6, "id": "c0f5cbed-74fb-4110-abf0-311edf6432a8", "metadata": { "tags": [] }, "outputs": [], "source": [ "catalog = pystac_client.Client.open(\n", " \"https://planetarycomputer.microsoft.com/api/stac/v1\",\n", " modifier=planetary_computer.sign_inplace,\n", ")" ] }, { "cell_type": "code", "execution_count": 7, "id": "81cd0d2e-58d5-4734-bd32-71d818233a51", "metadata": { "tags": [] }, "outputs": [], "source": [ "search = catalog.search(\n", " collections=['landsat-8-c2-l2'],\n", " bbox=bbox,\n", ")" ] }, { "cell_type": "markdown", "id": "6650815b-9745-40ba-9775-e1d33cf5ee94", "metadata": {}, "source": [ "Load all the STAC items:" ] }, { "cell_type": "code", "execution_count": 8, "id": "c96a7a55-b962-4460-97fd-84c2ddb458e2", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "201" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "items = search.get_all_items()\n", "len(items)" ] }, { "cell_type": "markdown", "id": "046d1b98-f5eb-481d-957b-32a7e1ee7484", "metadata": {}, "source": [ "These are the footprints of all the items we'll use:" ] }, { "cell_type": "code", "execution_count": 9, "id": "b27d491c-3391-4eaf-ac94-3955f97b8ed6", "metadata": { "tags": [] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6c29ee8be5e64de390f0e4bf26c267f8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Map(bottom=391020.0, center=[41.64933994767867, -69.94438630063088], controls=(ZoomControl(options=['position'…" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m.add_geojson(items.to_dict(), zoom=12)\n", "m" ] }, { "cell_type": "markdown", "id": "c0cdf4fa-88d8-40ec-83b5-ddeaba95b6e1", "metadata": {}, "source": [ "## Create an xarray with stacksatc\n", "\n", "Set `bounds_latlon=bbox` to automatically clip to our area of interest (instead of using the full footprints of the scenes)." ] }, { "cell_type": "code", "execution_count": 10, "id": "62e0380d-364c-4012-9cba-d43d7ab73519", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CPU times: user 104 ms, sys: 4.8 ms, total: 109 ms\n", "Wall time: 106 ms\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'stackstac-0bffcf6778474275db65519a313c614c' (time: 201,\n",
       "                                                                band: 19,\n",
       "                                                                y: 768, x: 747)>\n",
       "dask.array<fetch_raster_window, shape=(201, 19, 768, 747), dtype=float64, chunksize=(1, 1, 768, 747), chunktype=numpy.ndarray>\n",
       "Coordinates: (12/27)\n",
       "  * time                         (time) datetime64[ns] 2013-03-22T15:19:00.54...\n",
       "    id                           (time) <U31 'LC08_L2SP_011031_20130322_02_T1...\n",
       "  * band                         (band) <U13 'SR_B1' 'SR_B2' ... 'SR_QA_AEROSOL'\n",
       "  * x                            (x) float64 4.101e+05 4.102e+05 ... 4.325e+05\n",
       "  * y                            (y) float64 4.623e+06 4.623e+06 ... 4.6e+06\n",
       "    view:off_nadir               int64 0\n",
       "    ...                           ...\n",
       "    title                        (band) <U46 'Coastal/Aerosol Band (B1)' ... ...\n",
       "    gsd                          (band) float64 30.0 30.0 30.0 ... 30.0 30.0\n",
       "    common_name                  (band) object 'coastal' 'blue' ... None None\n",
       "    center_wavelength            (band) object 0.44 0.48 0.56 ... None None None\n",
       "    full_width_half_max          (band) object 0.02 0.06 0.06 ... None None None\n",
       "    epsg                         int64 32619\n",
       "Attributes:\n",
       "    spec:        RasterSpec(epsg=32619, bounds=(410130.0, 4599750.0, 432540.0...\n",
       "    crs:         epsg:32619\n",
       "    transform:   | 30.00, 0.00, 410130.00|\\n| 0.00,-30.00, 4622790.00|\\n| 0.0...\n",
       "    resolution:  30.0
" ], "text/plain": [ "\n", "dask.array\n", "Coordinates: (12/27)\n", " * time (time) datetime64[ns] 2013-03-22T15:19:00.54...\n", " id (time) \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'band' (band: 19)>\n",
       "array(['SR_B1', 'SR_B2', 'SR_B3', 'SR_B4', 'SR_B5', 'SR_B6', 'SR_B7', 'ST_QA',\n",
       "       'ST_B10', 'ST_DRAD', 'ST_EMIS', 'ST_EMSD', 'ST_TRAD', 'ST_URAD',\n",
       "       'QA_PIXEL', 'ST_ATRAN', 'ST_CDIST', 'QA_RADSAT', 'SR_QA_AEROSOL'],\n",
       "      dtype='<U13')\n",
       "Coordinates: (12/16)\n",
       "  * band                       (band) <U13 'SR_B1' 'SR_B2' ... 'SR_QA_AEROSOL'\n",
       "    view:off_nadir             int64 0\n",
       "    instruments                object {'oli', 'tirs'}\n",
       "    landsat:collection_number  <U2 '02'\n",
       "    platform                   <U9 'landsat-8'\n",
       "    description                (band) <U91 'Collection 2 Level-2 Coastal/Aero...\n",
       "    ...                         ...\n",
       "    title                      (band) <U46 'Coastal/Aerosol Band (B1)' ... 'A...\n",
       "    gsd                        (band) float64 30.0 30.0 30.0 ... 30.0 30.0 30.0\n",
       "    common_name                (band) object 'coastal' 'blue' ... None None\n",
       "    center_wavelength          (band) object 0.44 0.48 0.56 ... None None None\n",
       "    full_width_half_max        (band) object 0.02 0.06 0.06 ... None None None\n",
       "    epsg                       int64 32619
" ], "text/plain": [ "\n", "array(['SR_B1', 'SR_B2', 'SR_B3', 'SR_B4', 'SR_B5', 'SR_B6', 'SR_B7', 'ST_QA',\n", " 'ST_B10', 'ST_DRAD', 'ST_EMIS', 'ST_EMSD', 'ST_TRAD', 'ST_URAD',\n", " 'QA_PIXEL', 'ST_ATRAN', 'ST_CDIST', 'QA_RADSAT', 'SR_QA_AEROSOL'],\n", " dtype='\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'band' (band: 19)>\n",
       "array(['coastal', 'blue', 'green', 'red', 'nir08', 'swir16', 'swir22', 'ST_QA',\n",
       "       'lwir11', 'ST_DRAD', 'ST_EMIS', 'ST_EMSD', 'ST_TRAD', 'ST_URAD',\n",
       "       'QA_PIXEL', 'ST_ATRAN', 'ST_CDIST', 'QA_RADSAT', 'SR_QA_AEROSOL'],\n",
       "      dtype=object)\n",
       "Coordinates: (12/16)\n",
       "    view:off_nadir             int64 0\n",
       "    instruments                object {'oli', 'tirs'}\n",
       "    landsat:collection_number  <U2 '02'\n",
       "    platform                   <U9 'landsat-8'\n",
       "    description                (band) <U91 'Collection 2 Level-2 Coastal/Aero...\n",
       "    landsat:processing_level   <U4 'L2SP'\n",
       "    ...                         ...\n",
       "    gsd                        (band) float64 30.0 30.0 30.0 ... 30.0 30.0 30.0\n",
       "    common_name                (band) object 'coastal' 'blue' ... None None\n",
       "    center_wavelength          (band) object 0.44 0.48 0.56 ... None None None\n",
       "    full_width_half_max        (band) object 0.02 0.06 0.06 ... None None None\n",
       "    epsg                       int64 32619\n",
       "  * band                       (band) object 'coastal' ... 'SR_QA_AEROSOL'
" ], "text/plain": [ "\n", "array(['coastal', 'blue', 'green', 'red', 'nir08', 'swir16', 'swir22', 'ST_QA',\n", " 'lwir11', 'ST_DRAD', 'ST_EMIS', 'ST_EMSD', 'ST_TRAD', 'ST_URAD',\n", " 'QA_PIXEL', 'ST_ATRAN', 'ST_CDIST', 'QA_RADSAT', 'SR_QA_AEROSOL'],\n", " dtype=object)\n", "Coordinates: (12/16)\n", " view:off_nadir int64 0\n", " instruments object {'oli', 'tirs'}\n", " landsat:collection_number \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'stackstac-0bffcf6778474275db65519a313c614c' (time: 201,\n",
       "                                                                band: 3,\n",
       "                                                                y: 768, x: 747)>\n",
       "dask.array<getitem, shape=(201, 3, 768, 747), dtype=float64, chunksize=(1, 1, 768, 747), chunktype=numpy.ndarray>\n",
       "Coordinates: (12/27)\n",
       "  * time                         (time) datetime64[ns] 2013-03-22T15:19:00.54...\n",
       "    id                           (time) <U31 'LC08_L2SP_011031_20130322_02_T1...\n",
       "  * x                            (x) float64 4.101e+05 4.102e+05 ... 4.325e+05\n",
       "  * y                            (y) float64 4.623e+06 4.623e+06 ... 4.6e+06\n",
       "    view:off_nadir               int64 0\n",
       "    instruments                  object {'oli', 'tirs'}\n",
       "    ...                           ...\n",
       "    gsd                          (band) float64 30.0 30.0 30.0\n",
       "    common_name                  (band) object 'red' 'green' 'blue'\n",
       "    center_wavelength            (band) object 0.65 0.56 0.48\n",
       "    full_width_half_max          (band) object 0.04 0.06 0.06\n",
       "    epsg                         int64 32619\n",
       "  * band                         (band) object 'red' 'green' 'blue'\n",
       "Attributes:\n",
       "    spec:        RasterSpec(epsg=32619, bounds=(410130.0, 4599750.0, 432540.0...\n",
       "    crs:         epsg:32619\n",
       "    transform:   | 30.00, 0.00, 410130.00|\\n| 0.00,-30.00, 4622790.00|\\n| 0.0...\n",
       "    resolution:  30.0
" ], "text/plain": [ "\n", "dask.array\n", "Coordinates: (12/27)\n", " * time (time) datetime64[ns] 2013-03-22T15:19:00.54...\n", " id (time) " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# What's the typical interval between scenes?\n", "cloud_free_stack.time.diff(\"time\").dt.days.plot.hist();" ] }, { "cell_type": "markdown", "id": "7edb78de-adf3-41a5-9fb7-e2d90065cea7", "metadata": {}, "source": [ "## Make biannual median composites\n", "\n", "The Landsat-8 scenes appear to typically be 5-15 days apart. Let's composite that down to a 6-month interval.\n", "\n", "Since the cloudy pixels we masked with NaNs will be ignored in the `median`, this should give us a decent cloud-free-ish image for each." ] }, { "cell_type": "code", "execution_count": 17, "id": "850986d1-d704-43d4-a910-6ea4fe7c9dad", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'stackstac-0bffcf6778474275db65519a313c614c' (time: 19,\n",
       "                                                                band: 19,\n",
       "                                                                y: 768, x: 747)>\n",
       "dask.array<stack, shape=(19, 19, 768, 747), dtype=float64, chunksize=(1, 1, 768, 747), chunktype=numpy.ndarray>\n",
       "Coordinates: (12/13)\n",
       "  * x                          (x) float64 4.101e+05 4.102e+05 ... 4.325e+05\n",
       "  * y                          (y) float64 4.623e+06 4.623e+06 ... 4.6e+06\n",
       "    view:off_nadir             int64 0\n",
       "    instruments                object {'oli', 'tirs'}\n",
       "    landsat:collection_number  <U2 '02'\n",
       "    platform                   <U9 'landsat-8'\n",
       "    ...                         ...\n",
       "    proj:epsg                  int64 32619\n",
       "    landsat:wrs_type           <U1 '2'\n",
       "    landsat:wrs_row            <U3 '031'\n",
       "    epsg                       int64 32619\n",
       "  * band                       (band) object 'coastal' ... 'SR_QA_AEROSOL'\n",
       "  * time                       (time) datetime64[ns] 2013-03-31 ... 2022-03-31\n",
       "Attributes:\n",
       "    spec:        RasterSpec(epsg=32619, bounds=(410130.0, 4599750.0, 432540.0...\n",
       "    crs:         epsg:32619\n",
       "    transform:   | 30.00, 0.00, 410130.00|\\n| 0.00,-30.00, 4622790.00|\\n| 0.0...\n",
       "    resolution:  30.0
" ], "text/plain": [ "\n", "dask.array\n", "Coordinates: (12/13)\n", " * x (x) float64 4.101e+05 4.102e+05 ... 4.325e+05\n", " * y (y) float64 4.623e+06 4.623e+06 ... 4.6e+06\n", " view:off_nadir int64 0\n", " instruments object {'oli', 'tirs'}\n", " landsat:collection_number \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray 'stackstac-0bffcf6778474275db65519a313c614c' (time: 19,\n",
       "                                                                band: 3,\n",
       "                                                                y: 768, x: 747)>\n",
       "dask.array<getitem, shape=(19, 3, 768, 747), dtype=float64, chunksize=(1, 1, 768, 747), chunktype=numpy.ndarray>\n",
       "Coordinates: (12/13)\n",
       "  * x                          (x) float64 4.101e+05 4.102e+05 ... 4.325e+05\n",
       "  * y                          (y) float64 4.623e+06 4.623e+06 ... 4.6e+06\n",
       "    view:off_nadir             int64 0\n",
       "    instruments                object {'oli', 'tirs'}\n",
       "    landsat:collection_number  <U2 '02'\n",
       "    platform                   <U9 'landsat-8'\n",
       "    ...                         ...\n",
       "    proj:epsg                  int64 32619\n",
       "    landsat:wrs_type           <U1 '2'\n",
       "    landsat:wrs_row            <U3 '031'\n",
       "    epsg                       int64 32619\n",
       "  * band                       (band) object 'red' 'green' 'blue'\n",
       "  * time                       (time) datetime64[ns] 2013-03-31 ... 2022-03-31\n",
       "Attributes:\n",
       "    spec:        RasterSpec(epsg=32619, bounds=(410130.0, 4599750.0, 432540.0...\n",
       "    crs:         epsg:32619\n",
       "    transform:   | 30.00, 0.00, 410130.00|\\n| 0.00,-30.00, 4622790.00|\\n| 0.0...\n",
       "    resolution:  30.0
" ], "text/plain": [ "\n", "dask.array\n", "Coordinates: (12/13)\n", " * x (x) float64 4.101e+05 4.102e+05 ... 4.325e+05\n", " * y (y) float64 4.623e+06 4.623e+06 ... 4.6e+06\n", " view:off_nadir int64 0\n", " instruments object {'oli', 'tirs'}\n", " landsat:collection_number " ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gif_img" ] }, { "cell_type": "code", "execution_count": null, "id": "07f4c769-130b-401f-8cda-e54fbdf0a3fd", "metadata": {}, "outputs": [], "source": [] } ], "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.10.8" }, "vscode": { "interpreter": { "hash": "327a3064184c72cf2315f340faf7cd6d38902e235df73e5f8747aa73527562c0" } } }, "nbformat": 4, "nbformat_minor": 5 }