From 37c1dc3cc54da350fba30ba490aaa8f55dceef76 Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Thu, 11 Sep 2025 12:57:43 -0400 Subject: [PATCH 1/3] Store a plain repr for when a notebook is untrusted (github) --- pystac/asset.py | 2 +- pystac/html/JSON.jinja2 | 16 ++++++++++++++-- pystac/item_collection.py | 2 +- pystac/link.py | 6 +++++- pystac/provider.py | 2 +- pystac/stac_object.py | 6 +++++- 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/pystac/asset.py b/pystac/asset.py index 7fbafead9..46d034bf7 100644 --- a/pystac/asset.py +++ b/pystac/asset.py @@ -185,7 +185,7 @@ def _repr_html_(self) -> str: jinja_env = get_jinja_env() if jinja_env: template = jinja_env.get_template("JSON.jinja2") - return str(template.render(dict=self.to_dict())) + return str(template.render(dict=self.to_dict(), plain=escape(repr(self)))) else: return escape(repr(self)) diff --git a/pystac/html/JSON.jinja2 b/pystac/html/JSON.jinja2 index 077d5985d..c2130f92e 100644 --- a/pystac/html/JSON.jinja2 +++ b/pystac/html/JSON.jinja2 @@ -29,8 +29,19 @@ color: rgb(0, 128, 0); font-weight: 700; } +.pystac-wrap { + display: block !important; +} +.pystac-text-repr-fallback { + /* fallback to plain text repr when CSS is not injected (untrusted notebook) */ + display: none; +} -
+
+
+ {{ plain }} +
+ \ No newline at end of file +
+
diff --git a/pystac/item_collection.py b/pystac/item_collection.py index 5d0abe96b..5bf82c649 100644 --- a/pystac/item_collection.py +++ b/pystac/item_collection.py @@ -150,7 +150,7 @@ def _repr_html_(self) -> str: jinja_env = get_jinja_env() if jinja_env: template = jinja_env.get_template("JSON.jinja2") - return str(template.render(dict=self.to_dict())) + return str(template.render(dict=self.to_dict(), plain=escape(repr(self)))) else: return escape(repr(self)) diff --git a/pystac/link.py b/pystac/link.py index e82ddad5a..7b1cc4a0d 100644 --- a/pystac/link.py +++ b/pystac/link.py @@ -275,7 +275,11 @@ def _repr_html_(self) -> str: jinja_env = get_jinja_env() if jinja_env: template = jinja_env.get_template("JSON.jinja2") - return str(template.render(dict=self.to_dict())) + return str( + template.render( + dict=self.to_dict(transform_href=False), plain=escape(repr(self)) + ) + ) else: return escape(repr(self)) diff --git a/pystac/provider.py b/pystac/provider.py index 06a38ea66..4152a28be 100644 --- a/pystac/provider.py +++ b/pystac/provider.py @@ -76,7 +76,7 @@ def _repr_html_(self) -> str: jinja_env = get_jinja_env() if jinja_env: template = jinja_env.get_template("JSON.jinja2") - return str(template.render(dict=self.to_dict())) + return str(template.render(dict=self.to_dict(), plain=escape(repr(self)))) else: return escape(repr(self)) diff --git a/pystac/stac_object.py b/pystac/stac_object.py index ad83ebe9c..c95c83948 100644 --- a/pystac/stac_object.py +++ b/pystac/stac_object.py @@ -587,7 +587,11 @@ def _repr_html_(self) -> str: jinja_env = get_jinja_env() if jinja_env: template = jinja_env.get_template("JSON.jinja2") - return str(template.render(dict=self.to_dict(transform_hrefs=False))) + return str( + template.render( + dict=self.to_dict(transform_hrefs=False), plain=escape(repr(self)) + ) + ) else: return escape(repr(self)) From c60e7cf416790bdbcc61cba82c9a65d654ea71ac Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Thu, 11 Sep 2025 12:58:12 -0400 Subject: [PATCH 2/3] Run quickstart notebook --- docs/quickstart.ipynb | 999 ++++++++++++++++++++++++++---------------- 1 file changed, 621 insertions(+), 378 deletions(-) diff --git a/docs/quickstart.ipynb b/docs/quickstart.ipynb index 5645f4b83..430411d2c 100644 --- a/docs/quickstart.ipynb +++ b/docs/quickstart.ipynb @@ -29,7 +29,15 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:53.360681Z", + "iopub.status.busy": "2025-09-11T16:53:53.360397Z", + "iopub.status.idle": "2025-09-11T16:53:54.333411Z", + "shell.execute_reply": "2025-09-11T16:53:54.332865Z", + "shell.execute_reply.started": "2025-09-11T16:53:53.360653Z" + } + }, "outputs": [], "source": [ "import shutil\n", @@ -49,7 +57,15 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:54.334813Z", + "iopub.status.busy": "2025-09-11T16:53:54.334715Z", + "iopub.status.idle": "2025-09-11T16:53:54.337619Z", + "shell.execute_reply": "2025-09-11T16:53:54.337301Z", + "shell.execute_reply.started": "2025-09-11T16:53:54.334802Z" + } + }, "outputs": [ { "name": "stdout", @@ -80,13 +96,21 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:54.338227Z", + "iopub.status.busy": "2025-09-11T16:53:54.338113Z", + "iopub.status.idle": "2025-09-11T16:53:54.355305Z", + "shell.execute_reply": "2025-09-11T16:53:54.354458Z", + "shell.execute_reply.started": "2025-09-11T16:53:54.338215Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "1.0.0\n" + "1.1.0\n" ] } ], @@ -108,7 +132,15 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:54.355878Z", + "iopub.status.busy": "2025-09-11T16:53:54.355747Z", + "iopub.status.idle": "2025-09-11T16:53:54.359285Z", + "shell.execute_reply": "2025-09-11T16:53:54.358889Z", + "shell.execute_reply.started": "2025-09-11T16:53:54.355865Z" + } + }, "outputs": [ { "name": "stdout", @@ -139,7 +171,15 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:54.885476Z", + "iopub.status.busy": "2025-09-11T16:53:54.885235Z", + "iopub.status.idle": "2025-09-11T16:53:54.888030Z", + "shell.execute_reply": "2025-09-11T16:53:54.887496Z", + "shell.execute_reply.started": "2025-09-11T16:53:54.885463Z" + } + }, "outputs": [], "source": [ "collection = root_catalog.get_child(\"landsat-8-l1\")\n", @@ -161,7 +201,15 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:55.501459Z", + "iopub.status.busy": "2025-09-11T16:53:55.500987Z", + "iopub.status.idle": "2025-09-11T16:53:55.512529Z", + "shell.execute_reply": "2025-09-11T16:53:55.511976Z", + "shell.execute_reply.started": "2025-09-11T16:53:55.501423Z" + } + }, "outputs": [ { "name": "stdout", @@ -211,7 +259,15 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:56.581966Z", + "iopub.status.busy": "2025-09-11T16:53:56.581591Z", + "iopub.status.idle": "2025-09-11T16:53:56.586208Z", + "shell.execute_reply": "2025-09-11T16:53:56.585346Z", + "shell.execute_reply.started": "2025-09-11T16:53:56.581933Z" + } + }, "outputs": [], "source": [ "item = next(root_catalog.get_items(\"LC80140332018166LGN00\", recursive=True))" @@ -229,7 +285,15 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:57.893519Z", + "iopub.status.busy": "2025-09-11T16:53:57.893024Z", + "iopub.status.idle": "2025-09-11T16:53:57.902625Z", + "shell.execute_reply": "2025-09-11T16:53:57.901939Z", + "shell.execute_reply.started": "2025-09-11T16:53:57.893480Z" + } + }, "outputs": [ { "data": { @@ -254,7 +318,15 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:58.207488Z", + "iopub.status.busy": "2025-09-11T16:53:58.207041Z", + "iopub.status.idle": "2025-09-11T16:53:58.213346Z", + "shell.execute_reply": "2025-09-11T16:53:58.212399Z", + "shell.execute_reply.started": "2025-09-11T16:53:58.207451Z" + } + }, "outputs": [ { "data": { @@ -274,7 +346,15 @@ { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:58.485290Z", + "iopub.status.busy": "2025-09-11T16:53:58.484894Z", + "iopub.status.idle": "2025-09-11T16:53:58.489053Z", + "shell.execute_reply": "2025-09-11T16:53:58.488573Z", + "shell.execute_reply.started": "2025-09-11T16:53:58.485269Z" + } + }, "outputs": [ { "data": { @@ -294,7 +374,15 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:58.703103Z", + "iopub.status.busy": "2025-09-11T16:53:58.702620Z", + "iopub.status.idle": "2025-09-11T16:53:58.709779Z", + "shell.execute_reply": "2025-09-11T16:53:58.708528Z", + "shell.execute_reply.started": "2025-09-11T16:53:58.703063Z" + } + }, "outputs": [ { "data": { @@ -321,7 +409,15 @@ { "cell_type": "code", "execution_count": 12, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:53:59.325563Z", + "iopub.status.busy": "2025-09-11T16:53:59.325121Z", + "iopub.status.idle": "2025-09-11T16:53:59.354690Z", + "shell.execute_reply": "2025-09-11T16:53:59.354062Z", + "shell.execute_reply.started": "2025-09-11T16:53:59.325525Z" + } + }, "outputs": [ { "data": { @@ -331,104 +427,128 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Collection id=landsat-8-l1>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -1680,7 +1771,15 @@ { "cell_type": "code", "execution_count": 13, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:12.242671Z", + "iopub.status.busy": "2025-09-11T16:54:12.241943Z", + "iopub.status.idle": "2025-09-11T16:54:12.249301Z", + "shell.execute_reply": "2025-09-11T16:54:12.248687Z", + "shell.execute_reply.started": "2025-09-11T16:54:12.242599Z" + } + }, "outputs": [ { "data": { @@ -1700,7 +1799,15 @@ { "cell_type": "code", "execution_count": 14, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:12.740988Z", + "iopub.status.busy": "2025-09-11T16:54:12.740804Z", + "iopub.status.idle": "2025-09-11T16:54:12.744503Z", + "shell.execute_reply": "2025-09-11T16:54:12.744071Z", + "shell.execute_reply.started": "2025-09-11T16:54:12.740974Z" + } + }, "outputs": [ { "data": { @@ -1720,7 +1827,15 @@ { "cell_type": "code", "execution_count": 15, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:13.012531Z", + "iopub.status.busy": "2025-09-11T16:54:13.012152Z", + "iopub.status.idle": "2025-09-11T16:54:13.018730Z", + "shell.execute_reply": "2025-09-11T16:54:13.017766Z", + "shell.execute_reply.started": "2025-09-11T16:54:13.012500Z" + } + }, "outputs": [ { "data": { @@ -1750,14 +1865,22 @@ { "cell_type": "code", "execution_count": 16, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:13.867162Z", + "iopub.status.busy": "2025-09-11T16:54:13.866693Z", + "iopub.status.idle": "2025-09-11T16:54:13.874348Z", + "shell.execute_reply": "2025-09-11T16:54:13.872895Z", + "shell.execute_reply.started": "2025-09-11T16:54:13.867127Z" + } + }, "outputs": [ { "data": { "text/plain": [ "['https://stac-extensions.github.io/eo/v1.1.0/schema.json',\n", " 'https://stac-extensions.github.io/view/v1.0.0/schema.json',\n", - " 'https://stac-extensions.github.io/projection/v1.1.0/schema.json']" + " 'https://stac-extensions.github.io/projection/v2.0.0/schema.json']" ] }, "execution_count": 16, @@ -1781,7 +1904,15 @@ { "cell_type": "code", "execution_count": 17, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:14.391585Z", + "iopub.status.busy": "2025-09-11T16:54:14.391134Z", + "iopub.status.idle": "2025-09-11T16:54:14.404483Z", + "shell.execute_reply": "2025-09-11T16:54:14.403721Z", + "shell.execute_reply.started": "2025-09-11T16:54:14.391548Z" + } + }, "outputs": [ { "data": { @@ -1801,7 +1932,15 @@ { "cell_type": "code", "execution_count": 18, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:14.648775Z", + "iopub.status.busy": "2025-09-11T16:54:14.648176Z", + "iopub.status.idle": "2025-09-11T16:54:14.656069Z", + "shell.execute_reply": "2025-09-11T16:54:14.654806Z", + "shell.execute_reply.started": "2025-09-11T16:54:14.648726Z" + } + }, "outputs": [ { "data": { @@ -1828,7 +1967,15 @@ { "cell_type": "code", "execution_count": 19, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:15.194408Z", + "iopub.status.busy": "2025-09-11T16:54:15.193992Z", + "iopub.status.idle": "2025-09-11T16:54:15.198657Z", + "shell.execute_reply": "2025-09-11T16:54:15.198163Z", + "shell.execute_reply.started": "2025-09-11T16:54:15.194374Z" + } + }, "outputs": [ { "data": { @@ -1855,7 +2002,15 @@ { "cell_type": "code", "execution_count": 20, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:15.791443Z", + "iopub.status.busy": "2025-09-11T16:54:15.791262Z", + "iopub.status.idle": "2025-09-11T16:54:15.795077Z", + "shell.execute_reply": "2025-09-11T16:54:15.794406Z", + "shell.execute_reply.started": "2025-09-11T16:54:15.791428Z" + } + }, "outputs": [ { "data": { @@ -1882,7 +2037,15 @@ { "cell_type": "code", "execution_count": 21, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:16.454670Z", + "iopub.status.busy": "2025-09-11T16:54:16.454490Z", + "iopub.status.idle": "2025-09-11T16:54:16.458930Z", + "shell.execute_reply": "2025-09-11T16:54:16.457847Z", + "shell.execute_reply.started": "2025-09-11T16:54:16.454656Z" + } + }, "outputs": [ { "name": "stdout", @@ -1923,7 +2086,15 @@ { "cell_type": "code", "execution_count": 22, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:17.378612Z", + "iopub.status.busy": "2025-09-11T16:54:17.378438Z", + "iopub.status.idle": "2025-09-11T16:54:17.382463Z", + "shell.execute_reply": "2025-09-11T16:54:17.382127Z", + "shell.execute_reply.started": "2025-09-11T16:54:17.378598Z" + } + }, "outputs": [ { "data": { @@ -1958,7 +2129,15 @@ { "cell_type": "code", "execution_count": 23, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:17.948428Z", + "iopub.status.busy": "2025-09-11T16:54:17.948185Z", + "iopub.status.idle": "2025-09-11T16:54:17.951893Z", + "shell.execute_reply": "2025-09-11T16:54:17.951535Z", + "shell.execute_reply.started": "2025-09-11T16:54:17.948409Z" + } + }, "outputs": [ { "data": { @@ -1979,7 +2158,15 @@ { "cell_type": "code", "execution_count": 24, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:18.228225Z", + "iopub.status.busy": "2025-09-11T16:54:18.227811Z", + "iopub.status.idle": "2025-09-11T16:54:18.234103Z", + "shell.execute_reply": "2025-09-11T16:54:18.233361Z", + "shell.execute_reply.started": "2025-09-11T16:54:18.228191Z" + } + }, "outputs": [ { "data": { @@ -2013,7 +2200,15 @@ { "cell_type": "code", "execution_count": 25, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:18.881422Z", + "iopub.status.busy": "2025-09-11T16:54:18.880964Z", + "iopub.status.idle": "2025-09-11T16:54:18.885045Z", + "shell.execute_reply": "2025-09-11T16:54:18.884240Z", + "shell.execute_reply.started": "2025-09-11T16:54:18.881397Z" + } + }, "outputs": [], "source": [ "new_catalog = root_catalog.clone()" @@ -2022,7 +2217,15 @@ { "cell_type": "code", "execution_count": 26, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:19.363337Z", + "iopub.status.busy": "2025-09-11T16:54:19.362517Z", + "iopub.status.idle": "2025-09-11T16:54:19.370157Z", + "shell.execute_reply": "2025-09-11T16:54:19.368415Z", + "shell.execute_reply.started": "2025-09-11T16:54:19.363224Z" + } + }, "outputs": [], "source": [ "item_to_update = next(root_catalog.get_items(\"LC80140332018166LGN00\", recursive=True))\n", @@ -2044,7 +2247,15 @@ { "cell_type": "code", "execution_count": 27, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:20.012978Z", + "iopub.status.busy": "2025-09-11T16:54:20.012710Z", + "iopub.status.idle": "2025-09-11T16:54:20.016632Z", + "shell.execute_reply": "2025-09-11T16:54:20.015924Z", + "shell.execute_reply.started": "2025-09-11T16:54:20.012957Z" + } + }, "outputs": [ { "name": "stdout", @@ -2070,7 +2281,15 @@ { "cell_type": "code", "execution_count": 28, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:20.831120Z", + "iopub.status.busy": "2025-09-11T16:54:20.830559Z", + "iopub.status.idle": "2025-09-11T16:54:20.837226Z", + "shell.execute_reply": "2025-09-11T16:54:20.835531Z", + "shell.execute_reply.started": "2025-09-11T16:54:20.831076Z" + } + }, "outputs": [], "source": [ "# Create a temporary directory\n", @@ -2080,13 +2299,21 @@ { "cell_type": "code", "execution_count": 29, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:21.086173Z", + "iopub.status.busy": "2025-09-11T16:54:21.085645Z", + "iopub.status.idle": "2025-09-11T16:54:21.095138Z", + "shell.execute_reply": "2025-09-11T16:54:21.094659Z", + "shell.execute_reply.started": "2025-09-11T16:54:21.086132Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Catalog saved to: /tmp/tmp9bmp70k9/catalog.json\n" + "Catalog saved to: /tmp/tmpmj8y75bk/catalog.json\n" ] } ], @@ -2106,7 +2333,15 @@ { "cell_type": "code", "execution_count": 30, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:22.007363Z", + "iopub.status.busy": "2025-09-11T16:54:22.006940Z", + "iopub.status.idle": "2025-09-11T16:54:22.009943Z", + "shell.execute_reply": "2025-09-11T16:54:22.009436Z", + "shell.execute_reply.started": "2025-09-11T16:54:22.007328Z" + } + }, "outputs": [], "source": [ "item_path = Path(tmp_dir) / \"landsat-8-l1\" / \"LC80140332018166LGN00\" / \"\"" @@ -2122,7 +2357,15 @@ { "cell_type": "code", "execution_count": 31, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T16:54:25.139751Z", + "iopub.status.busy": "2025-09-11T16:54:25.139555Z", + "iopub.status.idle": "2025-09-11T16:54:25.143090Z", + "shell.execute_reply": "2025-09-11T16:54:25.141941Z", + "shell.execute_reply.started": "2025-09-11T16:54:25.139737Z" + } + }, "outputs": [], "source": [ "shutil.rmtree(tmp_dir, ignore_errors=True)" @@ -2145,7 +2388,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.6" + "version": "3.10.12" }, "vscode": { "interpreter": { From 9e8ed9ffbe58eb765d5c3619a61d13434bbea048 Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Thu, 11 Sep 2025 13:38:45 -0400 Subject: [PATCH 3/3] Run tutorial notebooks that have reprs --- .../how-to-create-stac-catalogs.ipynb | 2488 ++++++++---- docs/tutorials/pystac-introduction.ipynb | 3538 +++++++++-------- 2 files changed, 3528 insertions(+), 2498 deletions(-) diff --git a/docs/tutorials/how-to-create-stac-catalogs.ipynb b/docs/tutorials/how-to-create-stac-catalogs.ipynb index 18fb87a74..97523f4aa 100644 --- a/docs/tutorials/how-to-create-stac-catalogs.ipynb +++ b/docs/tutorials/how-to-create-stac-catalogs.ipynb @@ -25,12 +25,21 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:34.023332Z", + "iopub.status.busy": "2025-09-11T17:34:34.021839Z", + "iopub.status.idle": "2025-09-11T17:34:34.786566Z", + "shell.execute_reply": "2025-09-11T17:34:34.781537Z", + "shell.execute_reply.started": "2025-09-11T17:34:34.023279Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "/home/jsignell/pystac/.venv/bin/python: No module named pip\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -49,7 +58,15 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:34.789047Z", + "iopub.status.busy": "2025-09-11T17:34:34.788742Z", + "iopub.status.idle": "2025-09-11T17:34:37.682573Z", + "shell.execute_reply": "2025-09-11T17:34:37.681902Z", + "shell.execute_reply.started": "2025-09-11T17:34:34.789020Z" + } + }, "outputs": [], "source": [ "import pystac" @@ -72,7 +89,15 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:37.683455Z", + "iopub.status.busy": "2025-09-11T17:34:37.683245Z", + "iopub.status.idle": "2025-09-11T17:34:37.692742Z", + "shell.execute_reply": "2025-09-11T17:34:37.689106Z", + "shell.execute_reply.started": "2025-09-11T17:34:37.683430Z" + } + }, "outputs": [], "source": [ "import os\n", @@ -86,12 +111,20 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:37.695556Z", + "iopub.status.busy": "2025-09-11T17:34:37.695277Z", + "iopub.status.idle": "2025-09-11T17:34:38.289508Z", + "shell.execute_reply": "2025-09-11T17:34:38.288573Z", + "shell.execute_reply.started": "2025-09-11T17:34:37.695525Z" + } + }, "outputs": [ { "data": { "text/plain": [ - "('/tmp/tmpdsdpun_y/image.tif', )" + "('/tmp/tmpjzy2xbol/image.tif', )" ] }, "execution_count": 4, @@ -118,44 +151,59 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:38.291556Z", + "iopub.status.busy": "2025-09-11T17:34:38.291249Z", + "iopub.status.idle": "2025-09-11T17:34:38.347577Z", + "shell.execute_reply": "2025-09-11T17:34:38.345637Z", + "shell.execute_reply.started": "2025-09-11T17:34:38.291519Z" + } + }, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[0;31mInit signature:\u001b[0m\n", - "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCatalog\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mstac_extensions\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[str]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Any]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mcatalog_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'CatalogType'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mABSOLUTE_PUBLISHED\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m \n", - "A PySTAC Catalog represents a STAC catalog in memory.\n", - "\n", - "A Catalog is a :class:`~pystac.STACObject` that may contain children,\n", - "which are instances of :class:`~pystac.Catalog` or :class:`~pystac.Collection`,\n", - "as well as :class:`~pystac.Item` s.\n", - "\n", - "Args:\n", - " id : Identifier for the catalog. Must be unique within the STAC.\n", - " description : Detailed multi-line description to fully explain the catalog.\n", - " `CommonMark 0.29 syntax `_ MAY be used for rich\n", - " text representation.\n", - " title : Optional short descriptive one-line title for the catalog.\n", - " stac_extensions : Optional list of extensions the Catalog implements.\n", - " href : Optional HREF for this catalog, which be set as the\n", - " catalog's self link's HREF.\n", - " catalog_type : Optional catalog type for this catalog. Must\n", - " be one of the values in :class:`~pystac.CatalogType`.\n", - "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/catalog.py\n", - "\u001b[0;31mType:\u001b[0m ABCMeta\n", - "\u001b[0;31mSubclasses:\u001b[0m Collection" - ] + "data": { + "text/plain": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCatalog\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mstac_extensions\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[str] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mcatalog_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'CatalogType'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'ABSOLUTE_PUBLISHED'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mstrategy\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'HrefLayoutStrategy | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "A PySTAC Catalog represents a STAC catalog in memory.\n", + "\n", + "A Catalog is a :class:`~pystac.STACObject` that may contain children,\n", + "which are instances of :class:`~pystac.Catalog` or :class:`~pystac.Collection`,\n", + "as well as :class:`~pystac.Item` s.\n", + "\n", + "Args:\n", + " id : Identifier for the catalog. Must be unique within the STAC.\n", + " description : Detailed multi-line description to fully explain the catalog.\n", + " `CommonMark 0.29 syntax `_ MAY be used for rich\n", + " text representation.\n", + " title : Optional short descriptive one-line title for the catalog.\n", + " stac_extensions : Optional list of extensions the Catalog implements.\n", + " href : Optional HREF for this catalog, which be set as the\n", + " catalog's self link's HREF.\n", + " catalog_type : Optional catalog type for this catalog. Must\n", + " be one of the values in :class:`~pystac.CatalogType`.\n", + " strategy : The layout strategy to use for setting the\n", + " HREFs of the catalog child objects and items.\n", + " If not provided, it will default to the strategy of the root and fallback to\n", + " :class:`~pystac.layout.BestPracticesLayoutStrategy`.\n", + "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/catalog.py\n", + "\u001b[0;31mType:\u001b[0m ABCMeta\n", + "\u001b[0;31mSubclasses:\u001b[0m Collection" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -172,7 +220,15 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:38.348654Z", + "iopub.status.busy": "2025-09-11T17:34:38.348454Z", + "iopub.status.idle": "2025-09-11T17:34:38.356583Z", + "shell.execute_reply": "2025-09-11T17:34:38.355631Z", + "shell.execute_reply.started": "2025-09-11T17:34:38.348634Z" + } + }, "outputs": [], "source": [ "catalog = pystac.Catalog(id=\"test-catalog\", description=\"Tutorial catalog.\")" @@ -188,7 +244,15 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:38.360126Z", + "iopub.status.busy": "2025-09-11T17:34:38.358977Z", + "iopub.status.idle": "2025-09-11T17:34:38.370844Z", + "shell.execute_reply": "2025-09-11T17:34:38.366059Z", + "shell.execute_reply.started": "2025-09-11T17:34:38.360096Z" + } + }, "outputs": [ { "name": "stdout", @@ -214,62 +278,72 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:38.372631Z", + "iopub.status.busy": "2025-09-11T17:34:38.371828Z", + "iopub.status.idle": "2025-09-11T17:34:38.383667Z", + "shell.execute_reply": "2025-09-11T17:34:38.380181Z", + "shell.execute_reply.started": "2025-09-11T17:34:38.372599Z" + } + }, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[0;31mInit signature:\u001b[0m\n", - "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mItem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mgeometry\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Any]]'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mbbox\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[float]]'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Datetime]'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mproperties\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Dict[str, Any]'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mstart_datetime\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Datetime]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mend_datetime\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Datetime]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mstac_extensions\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[str]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mcollection\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Union[str, Collection]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Any]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0massets\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Asset]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m \n", - "An Item is the core granular entity in a STAC, containing the core metadata\n", - "that enables any client to search or crawl online catalogs of spatial 'assets' -\n", - "satellite imagery, derived data, DEM's, etc.\n", - "\n", - "Args:\n", - " id : Provider identifier. Must be unique within the STAC.\n", - " geometry : Defines the full footprint of the asset represented by this\n", - " item, formatted according to\n", - " `RFC 7946, section 3.1 (GeoJSON) `_.\n", - " bbox : Bounding Box of the asset represented by this item\n", - " using either 2D or 3D geometries. The length of the array must be 2*n\n", - " where n is the number of dimensions. Could also be None in the case of a\n", - " null geometry.\n", - " datetime : datetime associated with this item. If None,\n", - " a start_datetime and end_datetime must be supplied.\n", - " properties : A dictionary of additional metadata for the item.\n", - " start_datetime : Optional start datetime, part of common metadata. This value\n", - " will override any `start_datetime` key in properties.\n", - " end_datetime : Optional end datetime, part of common metadata. This value\n", - " will override any `end_datetime` key in properties.\n", - " stac_extensions : Optional list of extensions the Item implements.\n", - " href : Optional HREF for this item, which be set as the item's\n", - " self link's HREF.\n", - " collection : The Collection or Collection ID that this item\n", - " belongs to.\n", - " extra_fields : Extra fields that are part of the top-level JSON\n", - " properties of the Item.\n", - " assets : A dictionary mapping string keys to :class:`~pystac.Asset` objects. All\n", - " :class:`~pystac.Asset` values in the dictionary will have their\n", - " :attr:`~pystac.Asset.owner` attribute set to the created Item.\n", - "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/item.py\n", - "\u001b[0;31mType:\u001b[0m ABCMeta\n", - "\u001b[0;31mSubclasses:\u001b[0m " - ] + "data": { + "text/plain": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mItem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mgeometry\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any] | None'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mbbox\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[float] | None'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Datetime | None'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mproperties\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any]'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mstart_datetime\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Datetime | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mend_datetime\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Datetime | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mstac_extensions\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[str] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mcollection\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | Collection | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0massets\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Asset] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "An Item is the core granular entity in a STAC, containing the core metadata\n", + "that enables any client to search or crawl online catalogs of spatial 'assets' -\n", + "satellite imagery, derived data, DEM's, etc.\n", + "\n", + "Args:\n", + " id : Provider identifier. Must be unique within the STAC.\n", + " geometry : Defines the full footprint of the asset represented by this\n", + " item, formatted according to\n", + " `RFC 7946, section 3.1 (GeoJSON) `_.\n", + " bbox : Bounding Box of the asset represented by this item\n", + " using either 2D or 3D geometries. The length of the array must be 2*n\n", + " where n is the number of dimensions. Could also be None in the case of a\n", + " null geometry.\n", + " datetime : datetime associated with this item. If None,\n", + " a start_datetime and end_datetime must be supplied.\n", + " properties : A dictionary of additional metadata for the item.\n", + " start_datetime : Optional inclusive start datetime, part of common metadata.\n", + " This value will override any `start_datetime` key in properties.\n", + " end_datetime : Optional inclusive end datetime, part of common metadata.\n", + " This value will override any `end_datetime` key in properties.\n", + " stac_extensions : Optional list of extensions the Item implements.\n", + " href : Optional HREF for this item, which be set as the item's\n", + " self link's HREF.\n", + " collection : The Collection or Collection ID that this item\n", + " belongs to.\n", + " extra_fields : Extra fields that are part of the top-level JSON\n", + " properties of the Item.\n", + " assets : A dictionary mapping string keys to :class:`~pystac.Asset` objects. All\n", + " :class:`~pystac.Asset` values in the dictionary will have their\n", + " :attr:`~pystac.Asset.owner` attribute set to the created Item.\n", + "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/item.py\n", + "\u001b[0;31mType:\u001b[0m _ProtocolMeta\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -286,7 +360,15 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:38.388240Z", + "iopub.status.busy": "2025-09-11T17:34:38.386541Z", + "iopub.status.idle": "2025-09-11T17:34:39.087296Z", + "shell.execute_reply": "2025-09-11T17:34:39.083512Z", + "shell.execute_reply.started": "2025-09-11T17:34:38.388077Z" + } + }, "outputs": [], "source": [ "import rasterio\n", @@ -312,7 +394,15 @@ { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.091178Z", + "iopub.status.busy": "2025-09-11T17:34:39.090715Z", + "iopub.status.idle": "2025-09-11T17:34:39.223785Z", + "shell.execute_reply": "2025-09-11T17:34:39.218544Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.091145Z" + } + }, "outputs": [ { "name": "stdout", @@ -339,7 +429,15 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.231210Z", + "iopub.status.busy": "2025-09-11T17:34:39.229462Z", + "iopub.status.idle": "2025-09-11T17:34:39.250212Z", + "shell.execute_reply": "2025-09-11T17:34:39.245522Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.231016Z" + } + }, "outputs": [], "source": [ "from datetime import datetime\n", @@ -363,7 +461,15 @@ { "cell_type": "code", "execution_count": 12, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.254710Z", + "iopub.status.busy": "2025-09-11T17:34:39.254243Z", + "iopub.status.idle": "2025-09-11T17:34:39.264605Z", + "shell.execute_reply": "2025-09-11T17:34:39.260741Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.254672Z" + } + }, "outputs": [], "source": [ "assert item.get_parent() is None" @@ -372,7 +478,15 @@ { "cell_type": "code", "execution_count": 13, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.269432Z", + "iopub.status.busy": "2025-09-11T17:34:39.267610Z", + "iopub.status.idle": "2025-09-11T17:34:39.337330Z", + "shell.execute_reply": "2025-09-11T17:34:39.336596Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.269272Z" + } + }, "outputs": [ { "data": { @@ -382,50 +496,78 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=item target=<Item id=local-image>>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -444,7 +586,15 @@ { "cell_type": "code", "execution_count": 14, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.340406Z", + "iopub.status.busy": "2025-09-11T17:34:39.340122Z", + "iopub.status.idle": "2025-09-11T17:34:39.345974Z", + "shell.execute_reply": "2025-09-11T17:34:39.345064Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.340384Z" + } + }, "outputs": [ { "data": { @@ -454,95 +604,119 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Catalog id=test-catalog>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -584,7 +759,15 @@ { "cell_type": "code", "execution_count": 15, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.346688Z", + "iopub.status.busy": "2025-09-11T17:34:39.346487Z", + "iopub.status.idle": "2025-09-11T17:34:39.351538Z", + "shell.execute_reply": "2025-09-11T17:34:39.350797Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.346669Z" + } + }, "outputs": [ { "name": "stdout", @@ -611,43 +794,53 @@ { "cell_type": "code", "execution_count": 16, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.352797Z", + "iopub.status.busy": "2025-09-11T17:34:39.352545Z", + "iopub.status.idle": "2025-09-11T17:34:39.359463Z", + "shell.execute_reply": "2025-09-11T17:34:39.358442Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.352773Z" + } + }, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[0;31mInit signature:\u001b[0m\n", - "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAsset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mmedia_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mroles\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[str]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Any]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;34m'None'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m \n", - "An object that contains a link to data associated with an Item or Collection that\n", - "can be downloaded or streamed.\n", - "\n", - "Args:\n", - " href : Link to the asset object. Relative and absolute links are both\n", - " allowed.\n", - " title : Optional displayed title for clients and users.\n", - " description : A description of the Asset providing additional details,\n", - " such as how it was processed or created. CommonMark 0.29 syntax MAY be used\n", - " for rich text representation.\n", - " media_type : Optional description of the media type. Registered Media Types\n", - " are preferred. See :class:`~pystac.MediaType` for common media types.\n", - " roles : Optional, Semantic roles (i.e. thumbnail, overview,\n", - " data, metadata) of the asset.\n", - " extra_fields : Optional, additional fields for this asset. This is used\n", - " by extensions as a way to serialize and deserialize properties on asset\n", - " object JSON.\n", - "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/asset.py\n", - "\u001b[0;31mType:\u001b[0m type\n", - "\u001b[0;31mSubclasses:\u001b[0m " - ] + "data": { + "text/plain": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAsset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mmedia_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mroles\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[str] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;34m'None'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "An object that contains a link to data associated with an Item or Collection that\n", + "can be downloaded or streamed.\n", + "\n", + "Args:\n", + " href : Link to the asset object. Relative and absolute links are both\n", + " allowed.\n", + " title : Optional displayed title for clients and users.\n", + " description : A description of the Asset providing additional details,\n", + " such as how it was processed or created. CommonMark 0.29 syntax MAY be used\n", + " for rich text representation.\n", + " media_type : Optional description of the media type. Registered Media Types\n", + " are preferred. See :class:`~pystac.MediaType` for common media types.\n", + " roles : Optional, Semantic roles (i.e. thumbnail, overview,\n", + " data, metadata) of the asset.\n", + " extra_fields : Optional, additional fields for this asset. This is used\n", + " by extensions as a way to serialize and deserialize properties on asset\n", + " object JSON.\n", + "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/asset.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -657,7 +850,15 @@ { "cell_type": "code", "execution_count": 17, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.360281Z", + "iopub.status.busy": "2025-09-11T17:34:39.360057Z", + "iopub.status.idle": "2025-09-11T17:34:39.363197Z", + "shell.execute_reply": "2025-09-11T17:34:39.362512Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.360259Z" + } + }, "outputs": [], "source": [ "item.add_asset(\n", @@ -675,7 +876,15 @@ { "cell_type": "code", "execution_count": 18, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.364270Z", + "iopub.status.busy": "2025-09-11T17:34:39.364047Z", + "iopub.status.idle": "2025-09-11T17:34:39.377746Z", + "shell.execute_reply": "2025-09-11T17:34:39.374789Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.364244Z" + } + }, "outputs": [ { "name": "stdout", @@ -683,11 +892,9 @@ "text": [ "{\n", " \"type\": \"Feature\",\n", - " \"stac_version\": \"1.0.0\",\n", + " \"stac_version\": \"1.1.0\",\n", + " \"stac_extensions\": [],\n", " \"id\": \"local-image\",\n", - " \"properties\": {\n", - " \"datetime\": \"2023-10-12T15:35:17.290343Z\"\n", - " },\n", " \"geometry\": {\n", " \"type\": \"Polygon\",\n", " \"coordinates\": [\n", @@ -715,6 +922,15 @@ " ]\n", " ]\n", " },\n", + " \"bbox\": [\n", + " 37.6616853489879,\n", + " 55.73478197572927,\n", + " 37.66573047610874,\n", + " 55.73882710285011\n", + " ],\n", + " \"properties\": {\n", + " \"datetime\": \"2025-09-11T17:34:39.240259Z\"\n", + " },\n", " \"links\": [\n", " {\n", " \"rel\": \"root\",\n", @@ -729,17 +945,10 @@ " ],\n", " \"assets\": {\n", " \"image\": {\n", - " \"href\": \"/tmp/tmpdsdpun_y/image.tif\",\n", + " \"href\": \"/tmp/tmpjzy2xbol/image.tif\",\n", " \"type\": \"image/tiff; application=geotiff\"\n", " }\n", - " },\n", - " \"bbox\": [\n", - " 37.6616853489879,\n", - " 55.73478197572927,\n", - " 37.66573047610874,\n", - " 55.73882710285011\n", - " ],\n", - " \"stac_extensions\": []\n", + " }\n", "}\n" ] } @@ -774,7 +983,15 @@ { "cell_type": "code", "execution_count": 19, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.385246Z", + "iopub.status.busy": "2025-09-11T17:34:39.383246Z", + "iopub.status.idle": "2025-09-11T17:34:39.391640Z", + "shell.execute_reply": "2025-09-11T17:34:39.388897Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.385205Z" + } + }, "outputs": [ { "name": "stdout", @@ -800,7 +1017,15 @@ { "cell_type": "code", "execution_count": 20, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.395029Z", + "iopub.status.busy": "2025-09-11T17:34:39.394764Z", + "iopub.status.idle": "2025-09-11T17:34:39.400859Z", + "shell.execute_reply": "2025-09-11T17:34:39.400153Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.395006Z" + } + }, "outputs": [], "source": [ "catalog.normalize_hrefs(os.path.join(tmp_dir.name, \"stac\"))" @@ -816,14 +1041,22 @@ { "cell_type": "code", "execution_count": 21, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.402183Z", + "iopub.status.busy": "2025-09-11T17:34:39.401919Z", + "iopub.status.idle": "2025-09-11T17:34:39.408402Z", + "shell.execute_reply": "2025-09-11T17:34:39.407484Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.402159Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "/tmp/tmpdsdpun_y/stac/catalog.json\n", - "/tmp/tmpdsdpun_y/stac/local-image/local-image.json\n" + "/tmp/tmpjzy2xbol/stac/catalog.json\n", + "/tmp/tmpjzy2xbol/stac/local-image/local-image.json\n" ] } ], @@ -844,7 +1077,15 @@ { "cell_type": "code", "execution_count": 22, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.409703Z", + "iopub.status.busy": "2025-09-11T17:34:39.409361Z", + "iopub.status.idle": "2025-09-11T17:34:39.418646Z", + "shell.execute_reply": "2025-09-11T17:34:39.415257Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.409670Z" + } + }, "outputs": [], "source": [ "catalog.save(catalog_type=pystac.CatalogType.SELF_CONTAINED)" @@ -853,15 +1094,23 @@ { "cell_type": "code", "execution_count": 23, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.423656Z", + "iopub.status.busy": "2025-09-11T17:34:39.422133Z", + "iopub.status.idle": "2025-09-11T17:34:39.903665Z", + "shell.execute_reply": "2025-09-11T17:34:39.899167Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.423520Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "/tmp/tmpdsdpun_y/stac/catalog.json\n", + "/tmp/tmpjzy2xbol/stac/catalog.json\n", "\n", - "/tmp/tmpdsdpun_y/stac/local-image:\n", + "/tmp/tmpjzy2xbol/stac/local-image:\n", "local-image.json\n" ] } @@ -873,7 +1122,15 @@ { "cell_type": "code", "execution_count": 24, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.912197Z", + "iopub.status.busy": "2025-09-11T17:34:39.909380Z", + "iopub.status.idle": "2025-09-11T17:34:39.944091Z", + "shell.execute_reply": "2025-09-11T17:34:39.939296Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.911968Z" + } + }, "outputs": [ { "name": "stdout", @@ -882,7 +1139,7 @@ "{\n", " \"type\": \"Catalog\",\n", " \"id\": \"test-catalog\",\n", - " \"stac_version\": \"1.0.0\",\n", + " \"stac_version\": \"1.1.0\",\n", " \"description\": \"Tutorial catalog.\",\n", " \"links\": [\n", " {\n", @@ -893,7 +1150,7 @@ " {\n", " \"rel\": \"item\",\n", " \"href\": \"./local-image/local-image.json\",\n", - " \"type\": \"application/json\"\n", + " \"type\": \"application/geo+json\"\n", " }\n", " ]\n", "}\n" @@ -908,7 +1165,15 @@ { "cell_type": "code", "execution_count": 25, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.951241Z", + "iopub.status.busy": "2025-09-11T17:34:39.949644Z", + "iopub.status.idle": "2025-09-11T17:34:39.977350Z", + "shell.execute_reply": "2025-09-11T17:34:39.974102Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.951022Z" + } + }, "outputs": [ { "name": "stdout", @@ -916,11 +1181,9 @@ "text": [ "{\n", " \"type\": \"Feature\",\n", - " \"stac_version\": \"1.0.0\",\n", + " \"stac_version\": \"1.1.0\",\n", + " \"stac_extensions\": [],\n", " \"id\": \"local-image\",\n", - " \"properties\": {\n", - " \"datetime\": \"2023-10-12T15:35:17.290343Z\"\n", - " },\n", " \"geometry\": {\n", " \"type\": \"Polygon\",\n", " \"coordinates\": [\n", @@ -948,6 +1211,15 @@ " ]\n", " ]\n", " },\n", + " \"bbox\": [\n", + " 37.6616853489879,\n", + " 55.73478197572927,\n", + " 37.66573047610874,\n", + " 55.73882710285011\n", + " ],\n", + " \"properties\": {\n", + " \"datetime\": \"2025-09-11T17:34:39.240259Z\"\n", + " },\n", " \"links\": [\n", " {\n", " \"rel\": \"root\",\n", @@ -962,17 +1234,10 @@ " ],\n", " \"assets\": {\n", " \"image\": {\n", - " \"href\": \"/tmp/tmpdsdpun_y/image.tif\",\n", + " \"href\": \"/tmp/tmpjzy2xbol/image.tif\",\n", " \"type\": \"image/tiff; application=geotiff\"\n", " }\n", - " },\n", - " \"bbox\": [\n", - " 37.6616853489879,\n", - " 55.73478197572927,\n", - " 37.66573047610874,\n", - " 55.73882710285011\n", - " ],\n", - " \"stac_extensions\": []\n", + " }\n", "}\n" ] } @@ -992,7 +1257,15 @@ { "cell_type": "code", "execution_count": 26, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:39.982814Z", + "iopub.status.busy": "2025-09-11T17:34:39.980791Z", + "iopub.status.idle": "2025-09-11T17:34:40.024036Z", + "shell.execute_reply": "2025-09-11T17:34:40.014479Z", + "shell.execute_reply.started": "2025-09-11T17:34:39.982669Z" + } + }, "outputs": [], "source": [ "catalog.save(catalog_type=pystac.CatalogType.ABSOLUTE_PUBLISHED)" @@ -1008,7 +1281,15 @@ { "cell_type": "code", "execution_count": 27, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.026179Z", + "iopub.status.busy": "2025-09-11T17:34:40.025917Z", + "iopub.status.idle": "2025-09-11T17:34:40.038197Z", + "shell.execute_reply": "2025-09-11T17:34:40.036140Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.026156Z" + } + }, "outputs": [ { "name": "stdout", @@ -1016,11 +1297,9 @@ "text": [ "{\n", " \"type\": \"Feature\",\n", - " \"stac_version\": \"1.0.0\",\n", + " \"stac_version\": \"1.1.0\",\n", + " \"stac_extensions\": [],\n", " \"id\": \"local-image\",\n", - " \"properties\": {\n", - " \"datetime\": \"2023-10-12T15:35:17.290343Z\"\n", - " },\n", " \"geometry\": {\n", " \"type\": \"Polygon\",\n", " \"coordinates\": [\n", @@ -1048,36 +1327,38 @@ " ]\n", " ]\n", " },\n", + " \"bbox\": [\n", + " 37.6616853489879,\n", + " 55.73478197572927,\n", + " 37.66573047610874,\n", + " 55.73882710285011\n", + " ],\n", + " \"properties\": {\n", + " \"datetime\": \"2025-09-11T17:34:39.240259Z\"\n", + " },\n", " \"links\": [\n", " {\n", " \"rel\": \"root\",\n", - " \"href\": \"/tmp/tmpdsdpun_y/stac/catalog.json\",\n", + " \"href\": \"/tmp/tmpjzy2xbol/stac/catalog.json\",\n", " \"type\": \"application/json\"\n", " },\n", " {\n", " \"rel\": \"parent\",\n", - " \"href\": \"/tmp/tmpdsdpun_y/stac/catalog.json\",\n", + " \"href\": \"/tmp/tmpjzy2xbol/stac/catalog.json\",\n", " \"type\": \"application/json\"\n", " },\n", " {\n", " \"rel\": \"self\",\n", - " \"href\": \"/tmp/tmpdsdpun_y/stac/local-image/local-image.json\",\n", + " \"href\": \"/tmp/tmpjzy2xbol/stac/local-image/local-image.json\",\n", " \"type\": \"application/json\"\n", " }\n", " ],\n", " \"assets\": {\n", " \"image\": {\n", - " \"href\": \"/tmp/tmpdsdpun_y/image.tif\",\n", + " \"href\": \"/tmp/tmpjzy2xbol/image.tif\",\n", " \"type\": \"image/tiff; application=geotiff\"\n", " }\n", - " },\n", - " \"bbox\": [\n", - " 37.6616853489879,\n", - " 55.73478197572927,\n", - " 37.66573047610874,\n", - " 55.73882710285011\n", - " ],\n", - " \"stac_extensions\": []\n", + " }\n", "}\n" ] } @@ -1097,7 +1378,15 @@ { "cell_type": "code", "execution_count": 28, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.039260Z", + "iopub.status.busy": "2025-09-11T17:34:40.038939Z", + "iopub.status.idle": "2025-09-11T17:34:40.051146Z", + "shell.execute_reply": "2025-09-11T17:34:40.049037Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.039226Z" + } + }, "outputs": [], "source": [ "catalog.make_all_asset_hrefs_relative()\n", @@ -1107,7 +1396,15 @@ { "cell_type": "code", "execution_count": 29, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.056354Z", + "iopub.status.busy": "2025-09-11T17:34:40.054822Z", + "iopub.status.idle": "2025-09-11T17:34:40.067961Z", + "shell.execute_reply": "2025-09-11T17:34:40.064026Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.056213Z" + } + }, "outputs": [ { "name": "stdout", @@ -1115,11 +1412,9 @@ "text": [ "{\n", " \"type\": \"Feature\",\n", - " \"stac_version\": \"1.0.0\",\n", + " \"stac_version\": \"1.1.0\",\n", + " \"stac_extensions\": [],\n", " \"id\": \"local-image\",\n", - " \"properties\": {\n", - " \"datetime\": \"2023-10-12T15:35:17.290343Z\"\n", - " },\n", " \"geometry\": {\n", " \"type\": \"Polygon\",\n", " \"coordinates\": [\n", @@ -1147,6 +1442,15 @@ " ]\n", " ]\n", " },\n", + " \"bbox\": [\n", + " 37.6616853489879,\n", + " 55.73478197572927,\n", + " 37.66573047610874,\n", + " 55.73882710285011\n", + " ],\n", + " \"properties\": {\n", + " \"datetime\": \"2025-09-11T17:34:39.240259Z\"\n", + " },\n", " \"links\": [\n", " {\n", " \"rel\": \"root\",\n", @@ -1164,14 +1468,7 @@ " \"href\": \"../../image.tif\",\n", " \"type\": \"image/tiff; application=geotiff\"\n", " }\n", - " },\n", - " \"bbox\": [\n", - " 37.6616853489879,\n", - " 55.73478197572927,\n", - " 37.66573047610874,\n", - " 55.73882710285011\n", - " ],\n", - " \"stac_extensions\": []\n", + " }\n", "}\n" ] } @@ -1200,7 +1497,15 @@ { "cell_type": "code", "execution_count": 30, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.074454Z", + "iopub.status.busy": "2025-09-11T17:34:40.072859Z", + "iopub.status.idle": "2025-09-11T17:34:40.089077Z", + "shell.execute_reply": "2025-09-11T17:34:40.084569Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.074311Z" + } + }, "outputs": [], "source": [ "from pystac.extensions.eo import Band\n", @@ -1246,7 +1551,15 @@ { "cell_type": "code", "execution_count": 31, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.091982Z", + "iopub.status.busy": "2025-09-11T17:34:40.090896Z", + "iopub.status.idle": "2025-09-11T17:34:40.109370Z", + "shell.execute_reply": "2025-09-11T17:34:40.108494Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.091797Z" + } + }, "outputs": [], "source": [ "eo_item = pystac.Item(\n", @@ -1270,7 +1583,15 @@ { "cell_type": "code", "execution_count": 32, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.110474Z", + "iopub.status.busy": "2025-09-11T17:34:40.110247Z", + "iopub.status.idle": "2025-09-11T17:34:40.118516Z", + "shell.execute_reply": "2025-09-11T17:34:40.113515Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.110452Z" + } + }, "outputs": [], "source": [ "eo_item.common_metadata.platform = \"Maxar\"\n", @@ -1281,7 +1602,15 @@ { "cell_type": "code", "execution_count": 33, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.120144Z", + "iopub.status.busy": "2025-09-11T17:34:40.119873Z", + "iopub.status.idle": "2025-09-11T17:34:40.146749Z", + "shell.execute_reply": "2025-09-11T17:34:40.141220Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.120119Z" + } + }, "outputs": [ { "data": { @@ -1291,44 +1620,91 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Item id=local-image-eo>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -2117,7 +2438,15 @@ { "cell_type": "code", "execution_count": 34, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.151104Z", + "iopub.status.busy": "2025-09-11T17:34:40.150774Z", + "iopub.status.idle": "2025-09-11T17:34:40.159942Z", + "shell.execute_reply": "2025-09-11T17:34:40.156499Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.151079Z" + } + }, "outputs": [], "source": [ "asset = pystac.Asset(href=img_path, media_type=pystac.MediaType.GEOTIFF)\n", @@ -2135,7 +2464,15 @@ { "cell_type": "code", "execution_count": 35, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.161890Z", + "iopub.status.busy": "2025-09-11T17:34:40.161460Z", + "iopub.status.idle": "2025-09-11T17:34:40.168427Z", + "shell.execute_reply": "2025-09-11T17:34:40.167804Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.161856Z" + } + }, "outputs": [ { "data": { @@ -2145,77 +2482,101 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Asset href=/tmp/tmpjzy2xbol/image.tif>\n", + "
\n", + "\n", "
" ], "text/plain": [ - "" + "" ] }, "execution_count": 35, @@ -2551,7 +2913,15 @@ { "cell_type": "code", "execution_count": 36, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.169341Z", + "iopub.status.busy": "2025-09-11T17:34:40.169117Z", + "iopub.status.idle": "2025-09-11T17:34:40.175972Z", + "shell.execute_reply": "2025-09-11T17:34:40.175157Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.169320Z" + } + }, "outputs": [ { "data": { @@ -2572,7 +2942,15 @@ { "cell_type": "code", "execution_count": 37, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.176949Z", + "iopub.status.busy": "2025-09-11T17:34:40.176713Z", + "iopub.status.idle": "2025-09-11T17:34:40.182432Z", + "shell.execute_reply": "2025-09-11T17:34:40.181574Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.176928Z" + } + }, "outputs": [ { "data": { @@ -2593,7 +2971,15 @@ { "cell_type": "code", "execution_count": 38, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.183488Z", + "iopub.status.busy": "2025-09-11T17:34:40.183163Z", + "iopub.status.idle": "2025-09-11T17:34:40.191846Z", + "shell.execute_reply": "2025-09-11T17:34:40.189964Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.183452Z" + } + }, "outputs": [], "source": [ "catalog.normalize_and_save(\n", @@ -2612,7 +2998,15 @@ { "cell_type": "code", "execution_count": 39, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.193027Z", + "iopub.status.busy": "2025-09-11T17:34:40.192739Z", + "iopub.status.idle": "2025-09-11T17:34:40.200721Z", + "shell.execute_reply": "2025-09-11T17:34:40.200122Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.192999Z" + } + }, "outputs": [], "source": [ "catalog2 = pystac.read_file(os.path.join(tmp_dir.name, \"stac-eo\", \"catalog.json\"))" @@ -2621,7 +3015,15 @@ { "cell_type": "code", "execution_count": 40, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.204907Z", + "iopub.status.busy": "2025-09-11T17:34:40.203318Z", + "iopub.status.idle": "2025-09-11T17:34:40.222371Z", + "shell.execute_reply": "2025-09-11T17:34:40.219982Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.204765Z" + } + }, "outputs": [ { "data": { @@ -2642,7 +3044,15 @@ { "cell_type": "code", "execution_count": 41, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.239082Z", + "iopub.status.busy": "2025-09-11T17:34:40.238693Z", + "iopub.status.idle": "2025-09-11T17:34:40.246510Z", + "shell.execute_reply": "2025-09-11T17:34:40.243414Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.239036Z" + } + }, "outputs": [], "source": [ "item: pystac.Item = next(catalog2.get_items(recursive=True))" @@ -2651,7 +3061,15 @@ { "cell_type": "code", "execution_count": 42, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.249481Z", + "iopub.status.busy": "2025-09-11T17:34:40.249043Z", + "iopub.status.idle": "2025-09-11T17:34:40.253396Z", + "shell.execute_reply": "2025-09-11T17:34:40.252592Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.249431Z" + } + }, "outputs": [], "source": [ "assert item.ext.has(\"eo\")" @@ -2660,7 +3078,15 @@ { "cell_type": "code", "execution_count": 43, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.254625Z", + "iopub.status.busy": "2025-09-11T17:34:40.254329Z", + "iopub.status.idle": "2025-09-11T17:34:40.265308Z", + "shell.execute_reply": "2025-09-11T17:34:40.262693Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.254595Z" + } + }, "outputs": [ { "data": { @@ -2698,12 +3124,20 @@ { "cell_type": "code", "execution_count": 44, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.270138Z", + "iopub.status.busy": "2025-09-11T17:34:40.268568Z", + "iopub.status.idle": "2025-09-11T17:34:40.674409Z", + "shell.execute_reply": "2025-09-11T17:34:40.673622Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.269944Z" + } + }, "outputs": [ { "data": { "text/plain": [ - "('/tmp/tmpdsdpun_y/image.tif', )" + "('/tmp/tmpjzy2xbol/image.tif', )" ] }, "execution_count": 44, @@ -2724,7 +3158,15 @@ { "cell_type": "code", "execution_count": 45, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.675340Z", + "iopub.status.busy": "2025-09-11T17:34:40.675037Z", + "iopub.status.idle": "2025-09-11T17:34:40.684175Z", + "shell.execute_reply": "2025-09-11T17:34:40.682564Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.675308Z" + } + }, "outputs": [], "source": [ "bbox2, footprint2 = get_bbox_and_footprint(img_path2)" @@ -2740,65 +3182,81 @@ { "cell_type": "code", "execution_count": 46, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.687122Z", + "iopub.status.busy": "2025-09-11T17:34:40.686818Z", + "iopub.status.idle": "2025-09-11T17:34:40.699666Z", + "shell.execute_reply": "2025-09-11T17:34:40.695288Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.687088Z" + } + }, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[0;31mInit signature:\u001b[0m\n", - "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCollection\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mextent\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Extent'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mstac_extensions\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[str]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[str]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Any]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mcatalog_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[CatalogType]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mlicense\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'proprietary'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mkeywords\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[str]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mproviders\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[List[Provider]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0msummaries\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Summaries]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0massets\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Asset]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m \n", - "A Collection extends the Catalog spec with additional metadata that helps\n", - "enable discovery.\n", - "\n", - "Args:\n", - " id : Identifier for the collection. Must be unique within the STAC.\n", - " description : Detailed multi-line description to fully explain the\n", - " collection. `CommonMark 0.29 syntax `_ MAY\n", - " be used for rich text representation.\n", - " extent : Spatial and temporal extents that describe the bounds of\n", - " all items contained within this Collection.\n", - " title : Optional short descriptive one-line title for the\n", - " collection.\n", - " stac_extensions : Optional list of extensions the Collection\n", - " implements.\n", - " href : Optional HREF for this collection, which be set as the\n", - " collection's self link's HREF.\n", - " catalog_type : Optional catalog type for this catalog. Must\n", - " be one of the values in :class`~pystac.CatalogType`.\n", - " license : Collection's license(s) as a\n", - " `SPDX License identifier `_,\n", - " `various`, or `proprietary`. If collection includes\n", - " data with multiple different licenses, use `various` and add a link for\n", - " each. Defaults to 'proprietary'.\n", - " keywords : Optional list of keywords describing the collection.\n", - " providers : Optional list of providers of this Collection.\n", - " summaries : An optional map of property summaries,\n", - " either a set of values or statistics such as a range.\n", - " extra_fields : Extra fields that are part of the top-level\n", - " JSON properties of the Collection.\n", - " assets : A dictionary mapping string keys to :class:`~pystac.Asset` objects. All\n", - " :class:`~pystac.Asset` values in the dictionary will have their\n", - " :attr:`~pystac.Asset.owner` attribute set to the created Collection.\n", - "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/collection.py\n", - "\u001b[0;31mType:\u001b[0m ABCMeta\n", - "\u001b[0;31mSubclasses:\u001b[0m " - ] + "data": { + "text/plain": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCollection\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mextent\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Extent'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mstac_extensions\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[str] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mhref\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mcatalog_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'CatalogType | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mlicense\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'str'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'other'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mkeywords\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[str] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mproviders\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'list[Provider] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0msummaries\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Summaries | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0massets\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Asset] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mstrategy\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'HrefLayoutStrategy | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "A Collection extends the Catalog spec with additional metadata that helps\n", + "enable discovery.\n", + "\n", + "Args:\n", + " id : Identifier for the collection. Must be unique within the STAC.\n", + " description : Detailed multi-line description to fully explain the\n", + " collection. `CommonMark 0.29 syntax `_ MAY\n", + " be used for rich text representation.\n", + " extent : Spatial and temporal extents that describe the bounds of\n", + " all items contained within this Collection.\n", + " title : Optional short descriptive one-line title for the\n", + " collection.\n", + " stac_extensions : Optional list of extensions the Collection\n", + " implements.\n", + " href : Optional HREF for this collection, which be set as the\n", + " collection's self link's HREF.\n", + " catalog_type : Optional catalog type for this catalog. Must\n", + " be one of the values in :class`~pystac.CatalogType`.\n", + " license : Collection's license(s) as a\n", + " `SPDX License identifier `_,\n", + " or `other`. If collection includes data with multiple\n", + " different licenses, use `other` and add a link for\n", + " each. The licenses `various` and `proprietary` are deprecated.\n", + " Defaults to 'other'.\n", + " keywords : Optional list of keywords describing the collection.\n", + " providers : Optional list of providers of this Collection.\n", + " summaries : An optional map of property summaries,\n", + " either a set of values or statistics such as a range.\n", + " extra_fields : Extra fields that are part of the top-level\n", + " JSON properties of the Collection.\n", + " assets : A dictionary mapping string keys to :class:`~pystac.Asset` objects. All\n", + " :class:`~pystac.Asset` values in the dictionary will have their\n", + " :attr:`~pystac.Asset.owner` attribute set to the created Collection.\n", + " strategy : The layout strategy to use for setting the\n", + " HREFs of the catalog child objects and items.\n", + " If not provided, it will default to strategy of the parent and fallback to\n", + " :class:`~pystac.layout.BestPracticesLayoutStrategy`.\n", + "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/collection.py\n", + "\u001b[0;31mType:\u001b[0m _ProtocolMeta\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -2815,30 +3273,40 @@ { "cell_type": "code", "execution_count": 47, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.700661Z", + "iopub.status.busy": "2025-09-11T17:34:40.700439Z", + "iopub.status.idle": "2025-09-11T17:34:40.706589Z", + "shell.execute_reply": "2025-09-11T17:34:40.705603Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.700640Z" + } + }, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[0;31mInit signature:\u001b[0m\n", - "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mExtent\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mspatial\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'SpatialExtent'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mtemporal\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'TemporalExtent'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'Optional[Dict[str, Any]]'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", - "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m \n", - "Describes the spatiotemporal extents of a Collection.\n", - "\n", - "Args:\n", - " spatial : Potential spatial extent covered by the collection.\n", - " temporal : Potential temporal extent covered by the collection.\n", - " extra_fields : Dictionary containing additional top-level fields defined on the\n", - " Extent object.\n", - "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/collection.py\n", - "\u001b[0;31mType:\u001b[0m type\n", - "\u001b[0;31mSubclasses:\u001b[0m " - ] + "data": { + "text/plain": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mpystac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mExtent\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mspatial\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'SpatialExtent'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtemporal\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'TemporalExtent'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mextra_fields\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'dict[str, Any] | None'\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Describes the spatiotemporal extents of a Collection.\n", + "\n", + "Args:\n", + " spatial : Potential spatial extent covered by the collection.\n", + " temporal : Potential temporal extent covered by the collection.\n", + " extra_fields : Dictionary containing additional top-level fields defined on the\n", + " Extent object.\n", + "\u001b[0;31mFile:\u001b[0m ~/pystac/pystac/collection.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -2857,7 +3325,15 @@ { "cell_type": "code", "execution_count": 48, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.707924Z", + "iopub.status.busy": "2025-09-11T17:34:40.707538Z", + "iopub.status.idle": "2025-09-11T17:34:40.719902Z", + "shell.execute_reply": "2025-09-11T17:34:40.716919Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.707895Z" + } + }, "outputs": [], "source": [ "collection_item = pystac.Item(\n", @@ -2907,7 +3383,15 @@ { "cell_type": "code", "execution_count": 49, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.720929Z", + "iopub.status.busy": "2025-09-11T17:34:40.720675Z", + "iopub.status.idle": "2025-09-11T17:34:40.725156Z", + "shell.execute_reply": "2025-09-11T17:34:40.724438Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.720904Z" + } + }, "outputs": [], "source": [ "from shapely.geometry import shape\n", @@ -2920,7 +3404,15 @@ { "cell_type": "code", "execution_count": 50, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.726167Z", + "iopub.status.busy": "2025-09-11T17:34:40.725796Z", + "iopub.status.idle": "2025-09-11T17:34:40.730562Z", + "shell.execute_reply": "2025-09-11T17:34:40.728577Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.726140Z" + } + }, "outputs": [], "source": [ "collection_interval = sorted([collection_item.datetime, collection_item2.datetime])\n", @@ -2930,7 +3422,15 @@ { "cell_type": "code", "execution_count": 51, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.732100Z", + "iopub.status.busy": "2025-09-11T17:34:40.731809Z", + "iopub.status.idle": "2025-09-11T17:34:40.736376Z", + "shell.execute_reply": "2025-09-11T17:34:40.734729Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.732073Z" + } + }, "outputs": [], "source": [ "collection_extent = pystac.Extent(spatial=spatial_extent, temporal=temporal_extent)" @@ -2939,7 +3439,15 @@ { "cell_type": "code", "execution_count": 52, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.737721Z", + "iopub.status.busy": "2025-09-11T17:34:40.737479Z", + "iopub.status.idle": "2025-09-11T17:34:40.741105Z", + "shell.execute_reply": "2025-09-11T17:34:40.740424Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.737699Z" + } + }, "outputs": [], "source": [ "collection = pystac.Collection(\n", @@ -2960,7 +3468,15 @@ { "cell_type": "code", "execution_count": 53, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.744836Z", + "iopub.status.busy": "2025-09-11T17:34:40.742919Z", + "iopub.status.idle": "2025-09-11T17:34:40.760500Z", + "shell.execute_reply": "2025-09-11T17:34:40.759918Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.744674Z" + } + }, "outputs": [ { "data": { @@ -2981,7 +3497,15 @@ { "cell_type": "code", "execution_count": 54, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.761397Z", + "iopub.status.busy": "2025-09-11T17:34:40.761176Z", + "iopub.status.idle": "2025-09-11T17:34:40.768145Z", + "shell.execute_reply": "2025-09-11T17:34:40.765795Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.761377Z" + } + }, "outputs": [ { "data": { @@ -2991,50 +3515,78 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=child target=<Collection id=wv3-images>>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -3055,7 +3607,15 @@ { "cell_type": "code", "execution_count": 55, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.769946Z", + "iopub.status.busy": "2025-09-11T17:34:40.769691Z", + "iopub.status.idle": "2025-09-11T17:34:40.774752Z", + "shell.execute_reply": "2025-09-11T17:34:40.773922Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.769922Z" + } + }, "outputs": [ { "name": "stdout", @@ -3075,7 +3635,15 @@ { "cell_type": "code", "execution_count": 56, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.775801Z", + "iopub.status.busy": "2025-09-11T17:34:40.775544Z", + "iopub.status.idle": "2025-09-11T17:34:40.784824Z", + "shell.execute_reply": "2025-09-11T17:34:40.784015Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.775777Z" + } + }, "outputs": [], "source": [ "catalog.normalize_and_save(\n", @@ -3096,7 +3664,15 @@ { "cell_type": "code", "execution_count": 57, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.785964Z", + "iopub.status.busy": "2025-09-11T17:34:40.785696Z", + "iopub.status.idle": "2025-09-11T17:34:40.790373Z", + "shell.execute_reply": "2025-09-11T17:34:40.789749Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.785939Z" + } + }, "outputs": [], "source": [ "tmp_dir.cleanup()" @@ -3128,7 +3704,15 @@ { "cell_type": "code", "execution_count": 58, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.791263Z", + "iopub.status.busy": "2025-09-11T17:34:40.791013Z", + "iopub.status.idle": "2025-09-11T17:34:40.800283Z", + "shell.execute_reply": "2025-09-11T17:34:40.798485Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.791240Z" + } + }, "outputs": [], "source": [ "from typing import Any, Union\n", @@ -3178,7 +3762,15 @@ { "cell_type": "code", "execution_count": 59, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.805001Z", + "iopub.status.busy": "2025-09-11T17:34:40.803327Z", + "iopub.status.idle": "2025-09-11T17:34:40.812484Z", + "shell.execute_reply": "2025-09-11T17:34:40.810463Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.804855Z" + } + }, "outputs": [], "source": [ "# From https://alexwlchan.net/2017/07/listing-s3-keys/\n", @@ -3211,7 +3803,15 @@ { "cell_type": "code", "execution_count": 60, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:40.813459Z", + "iopub.status.busy": "2025-09-11T17:34:40.813221Z", + "iopub.status.idle": "2025-09-11T17:34:46.867759Z", + "shell.execute_reply": "2025-09-11T17:34:46.867159Z", + "shell.execute_reply.started": "2025-09-11T17:34:40.813436Z" + } + }, "outputs": [], "source": [ "moscow_training_chip_uris = list(\n", @@ -3224,7 +3824,15 @@ { "cell_type": "code", "execution_count": 61, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:46.868640Z", + "iopub.status.busy": "2025-09-11T17:34:46.868433Z", + "iopub.status.idle": "2025-09-11T17:34:46.879549Z", + "shell.execute_reply": "2025-09-11T17:34:46.878830Z", + "shell.execute_reply.started": "2025-09-11T17:34:46.868620Z" + } + }, "outputs": [], "source": [ "import re\n", @@ -3251,7 +3859,15 @@ { "cell_type": "code", "execution_count": 62, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:46.880764Z", + "iopub.status.busy": "2025-09-11T17:34:46.880497Z", + "iopub.status.idle": "2025-09-11T17:34:46.896891Z", + "shell.execute_reply": "2025-09-11T17:34:46.895894Z", + "shell.execute_reply.started": "2025-09-11T17:34:46.880741Z" + } + }, "outputs": [], "source": [ "chip_id_to_data = dict(list(chip_id_to_data.items())[:10])" @@ -3260,7 +3876,15 @@ { "cell_type": "code", "execution_count": 63, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:46.901454Z", + "iopub.status.busy": "2025-09-11T17:34:46.899631Z", + "iopub.status.idle": "2025-09-11T17:34:46.919356Z", + "shell.execute_reply": "2025-09-11T17:34:46.918698Z", + "shell.execute_reply.started": "2025-09-11T17:34:46.901291Z" + } + }, "outputs": [ { "data": { @@ -3296,7 +3920,15 @@ { "cell_type": "code", "execution_count": 64, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:46.920294Z", + "iopub.status.busy": "2025-09-11T17:34:46.920044Z", + "iopub.status.idle": "2025-09-11T17:34:46.925925Z", + "shell.execute_reply": "2025-09-11T17:34:46.923655Z", + "shell.execute_reply.started": "2025-09-11T17:34:46.920272Z" + } + }, "outputs": [], "source": [ "chip_id_to_items = {}" @@ -3316,7 +3948,15 @@ { "cell_type": "code", "execution_count": 65, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:46.927740Z", + "iopub.status.busy": "2025-09-11T17:34:46.927417Z", + "iopub.status.idle": "2025-09-11T17:34:51.498898Z", + "shell.execute_reply": "2025-09-11T17:34:51.495995Z", + "shell.execute_reply.started": "2025-09-11T17:34:46.927713Z" + } + }, "outputs": [ { "name": "stdout", @@ -3377,7 +4017,15 @@ { "cell_type": "code", "execution_count": 66, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.504759Z", + "iopub.status.busy": "2025-09-11T17:34:51.502523Z", + "iopub.status.idle": "2025-09-11T17:34:51.512282Z", + "shell.execute_reply": "2025-09-11T17:34:51.511530Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.504250Z" + } + }, "outputs": [], "source": [ "from shapely.geometry import MultiPolygon, shape\n", @@ -3390,7 +4038,15 @@ { "cell_type": "code", "execution_count": 67, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.513268Z", + "iopub.status.busy": "2025-09-11T17:34:51.513029Z", + "iopub.status.idle": "2025-09-11T17:34:51.537453Z", + "shell.execute_reply": "2025-09-11T17:34:51.533824Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.513247Z" + } + }, "outputs": [], "source": [ "datetimes = sorted(list(map(lambda i: i.datetime, chip_id_to_items.values())))\n", @@ -3400,7 +4056,15 @@ { "cell_type": "code", "execution_count": 68, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.538921Z", + "iopub.status.busy": "2025-09-11T17:34:51.538656Z", + "iopub.status.idle": "2025-09-11T17:34:51.544139Z", + "shell.execute_reply": "2025-09-11T17:34:51.542713Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.538896Z" + } + }, "outputs": [], "source": [ "collection_extent = pystac.Extent(spatial=spatial_extent, temporal=temporal_extent)" @@ -3409,7 +4073,15 @@ { "cell_type": "code", "execution_count": 69, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.546614Z", + "iopub.status.busy": "2025-09-11T17:34:51.546338Z", + "iopub.status.idle": "2025-09-11T17:34:51.550776Z", + "shell.execute_reply": "2025-09-11T17:34:51.549729Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.546590Z" + } + }, "outputs": [], "source": [ "collection = pystac.Collection(\n", @@ -3423,7 +4095,15 @@ { "cell_type": "code", "execution_count": 70, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.552351Z", + "iopub.status.busy": "2025-09-11T17:34:51.551710Z", + "iopub.status.idle": "2025-09-11T17:34:51.559532Z", + "shell.execute_reply": "2025-09-11T17:34:51.558758Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.552121Z" + } + }, "outputs": [ { "data": { @@ -3452,7 +4132,15 @@ { "cell_type": "code", "execution_count": 71, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.563283Z", + "iopub.status.busy": "2025-09-11T17:34:51.562799Z", + "iopub.status.idle": "2025-09-11T17:34:51.568210Z", + "shell.execute_reply": "2025-09-11T17:34:51.566752Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.563252Z" + } + }, "outputs": [ { "name": "stdout", @@ -3486,7 +4174,15 @@ { "cell_type": "code", "execution_count": 72, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.570857Z", + "iopub.status.busy": "2025-09-11T17:34:51.570555Z", + "iopub.status.idle": "2025-09-11T17:34:51.579217Z", + "shell.execute_reply": "2025-09-11T17:34:51.576538Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.570830Z" + } + }, "outputs": [ { "data": { @@ -3496,50 +4192,78 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=child target=<Collection id=wv3-images>>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -3559,7 +4283,15 @@ { "cell_type": "code", "execution_count": 73, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:51.582829Z", + "iopub.status.busy": "2025-09-11T17:34:51.582174Z", + "iopub.status.idle": "2025-09-11T17:34:51.588996Z", + "shell.execute_reply": "2025-09-11T17:34:51.588228Z", + "shell.execute_reply.started": "2025-09-11T17:34:51.582628Z" + } + }, "outputs": [ { "name": "stdout", @@ -3587,7 +4319,7 @@ ], "metadata": { "kernelspec": { - "display_name": "pystac", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -3601,7 +4333,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.6" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/docs/tutorials/pystac-introduction.ipynb b/docs/tutorials/pystac-introduction.ipynb index 0cdf06f86..f6f656725 100644 --- a/docs/tutorials/pystac-introduction.ipynb +++ b/docs/tutorials/pystac-introduction.ipynb @@ -35,7 +35,15 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:53.916701Z", + "iopub.status.busy": "2025-09-11T17:34:53.916377Z", + "iopub.status.idle": "2025-09-11T17:34:55.929815Z", + "shell.execute_reply": "2025-09-11T17:34:55.926407Z", + "shell.execute_reply.started": "2025-09-11T17:34:53.916674Z" + } + }, "outputs": [], "source": [ "import pystac" @@ -58,7 +66,15 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:55.931977Z", + "iopub.status.busy": "2025-09-11T17:34:55.931669Z", + "iopub.status.idle": "2025-09-11T17:34:55.939757Z", + "shell.execute_reply": "2025-09-11T17:34:55.939055Z", + "shell.execute_reply.started": "2025-09-11T17:34:55.931942Z" + } + }, "outputs": [], "source": [ "cat = pystac.Catalog.from_file(\"../example-catalog/catalog.json\")" @@ -74,7 +90,15 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:55.940651Z", + "iopub.status.busy": "2025-09-11T17:34:55.940428Z", + "iopub.status.idle": "2025-09-11T17:34:55.963983Z", + "shell.execute_reply": "2025-09-11T17:34:55.960476Z", + "shell.execute_reply.started": "2025-09-11T17:34:55.940630Z" + } + }, "outputs": [ { "name": "stdout", @@ -103,7 +127,15 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:55.969764Z", + "iopub.status.busy": "2025-09-11T17:34:55.967863Z", + "iopub.status.idle": "2025-09-11T17:34:55.976737Z", + "shell.execute_reply": "2025-09-11T17:34:55.976171Z", + "shell.execute_reply.started": "2025-09-11T17:34:55.969721Z" + } + }, "outputs": [ { "data": { @@ -132,7 +164,15 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:55.978253Z", + "iopub.status.busy": "2025-09-11T17:34:55.978017Z", + "iopub.status.idle": "2025-09-11T17:34:55.987054Z", + "shell.execute_reply": "2025-09-11T17:34:55.986426Z", + "shell.execute_reply.started": "2025-09-11T17:34:55.978232Z" + } + }, "outputs": [ { "data": { @@ -160,7 +200,15 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:55.987841Z", + "iopub.status.busy": "2025-09-11T17:34:55.987620Z", + "iopub.status.idle": "2025-09-11T17:34:55.992811Z", + "shell.execute_reply": "2025-09-11T17:34:55.992213Z", + "shell.execute_reply.started": "2025-09-11T17:34:55.987821Z" + } + }, "outputs": [ { "data": { @@ -180,7 +228,15 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:55.993642Z", + "iopub.status.busy": "2025-09-11T17:34:55.993427Z", + "iopub.status.idle": "2025-09-11T17:34:56.049234Z", + "shell.execute_reply": "2025-09-11T17:34:56.047339Z", + "shell.execute_reply.started": "2025-09-11T17:34:55.993621Z" + } + }, "outputs": [ { "data": { @@ -190,104 +246,128 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Collection id=landsat-8-l1>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -1531,7 +1582,15 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.050223Z", + "iopub.status.busy": "2025-09-11T17:34:56.049995Z", + "iopub.status.idle": "2025-09-11T17:34:56.054626Z", + "shell.execute_reply": "2025-09-11T17:34:56.054045Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.050201Z" + } + }, "outputs": [ { "data": { @@ -1541,50 +1600,78 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=self target=/home/jsignell/pystac/docs/example-catalog/catalog.json>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -1604,7 +1691,15 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.055429Z", + "iopub.status.busy": "2025-09-11T17:34:56.055221Z", + "iopub.status.idle": "2025-09-11T17:34:56.063587Z", + "shell.execute_reply": "2025-09-11T17:34:56.061222Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.055409Z" + } + }, "outputs": [ { "data": { @@ -1632,7 +1727,15 @@ { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.064607Z", + "iopub.status.busy": "2025-09-11T17:34:56.064322Z", + "iopub.status.idle": "2025-09-11T17:34:56.070842Z", + "shell.execute_reply": "2025-09-11T17:34:56.069267Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.064578Z" + } + }, "outputs": [ { "data": { @@ -1653,7 +1756,15 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.071984Z", + "iopub.status.busy": "2025-09-11T17:34:56.071747Z", + "iopub.status.idle": "2025-09-11T17:34:56.077495Z", + "shell.execute_reply": "2025-09-11T17:34:56.076770Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.071962Z" + } + }, "outputs": [ { "data": { @@ -1684,7 +1795,15 @@ { "cell_type": "code", "execution_count": 12, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.078735Z", + "iopub.status.busy": "2025-09-11T17:34:56.078490Z", + "iopub.status.idle": "2025-09-11T17:34:56.086510Z", + "shell.execute_reply": "2025-09-11T17:34:56.084230Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.078712Z" + } + }, "outputs": [ { "name": "stdout", @@ -1702,7 +1821,15 @@ { "cell_type": "code", "execution_count": 13, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.087287Z", + "iopub.status.busy": "2025-09-11T17:34:56.087076Z", + "iopub.status.idle": "2025-09-11T17:34:56.093043Z", + "shell.execute_reply": "2025-09-11T17:34:56.092303Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.087267Z" + } + }, "outputs": [ { "name": "stdout", @@ -1726,14 +1853,22 @@ { "cell_type": "code", "execution_count": 14, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.096152Z", + "iopub.status.busy": "2025-09-11T17:34:56.095881Z", + "iopub.status.idle": "2025-09-11T17:34:56.103324Z", + "shell.execute_reply": "2025-09-11T17:34:56.101132Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.096127Z" + } + }, "outputs": [ { "data": { "text/plain": [ "{'type': 'Catalog',\n", " 'id': 'landsat-stac-collection-catalog',\n", - " 'stac_version': '1.0.0',\n", + " 'stac_version': '1.1.0',\n", " 'description': 'STAC for Landsat data',\n", " 'links': [{'rel': 'root',\n", " 'href': './catalog.json',\n", @@ -1757,7 +1892,15 @@ { "cell_type": "code", "execution_count": 15, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.104964Z", + "iopub.status.busy": "2025-09-11T17:34:56.104626Z", + "iopub.status.idle": "2025-09-11T17:34:56.113491Z", + "shell.execute_reply": "2025-09-11T17:34:56.111517Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.104927Z" + } + }, "outputs": [], "source": [ "# get first (and only in this case) sub-catalog\n", @@ -1767,7 +1910,15 @@ { "cell_type": "code", "execution_count": 16, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.114990Z", + "iopub.status.busy": "2025-09-11T17:34:56.114699Z", + "iopub.status.idle": "2025-09-11T17:34:56.129738Z", + "shell.execute_reply": "2025-09-11T17:34:56.127763Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.114961Z" + } + }, "outputs": [ { "name": "stdout", @@ -1795,7 +1946,15 @@ { "cell_type": "code", "execution_count": 17, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.130807Z", + "iopub.status.busy": "2025-09-11T17:34:56.130481Z", + "iopub.status.idle": "2025-09-11T17:34:56.138253Z", + "shell.execute_reply": "2025-09-11T17:34:56.136570Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.130771Z" + } + }, "outputs": [ { "name": "stdout", @@ -1834,6 +1993,13 @@ "cell_type": "code", "execution_count": 18, "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.139204Z", + "iopub.status.busy": "2025-09-11T17:34:56.138960Z", + "iopub.status.idle": "2025-09-11T17:34:56.145229Z", + "shell.execute_reply": "2025-09-11T17:34:56.142675Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.139181Z" + }, "scrolled": true }, "outputs": [], @@ -1845,7 +2011,15 @@ { "cell_type": "code", "execution_count": 19, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.146216Z", + "iopub.status.busy": "2025-09-11T17:34:56.145970Z", + "iopub.status.idle": "2025-09-11T17:34:56.152561Z", + "shell.execute_reply": "2025-09-11T17:34:56.151741Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.146194Z" + } + }, "outputs": [ { "data": { @@ -1873,6 +2047,13 @@ "cell_type": "code", "execution_count": 20, "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.153760Z", + "iopub.status.busy": "2025-09-11T17:34:56.153409Z", + "iopub.status.idle": "2025-09-11T17:34:56.158861Z", + "shell.execute_reply": "2025-09-11T17:34:56.158231Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.153724Z" + }, "scrolled": true }, "outputs": [], @@ -1893,7 +2074,15 @@ { "cell_type": "code", "execution_count": 21, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.159902Z", + "iopub.status.busy": "2025-09-11T17:34:56.159578Z", + "iopub.status.idle": "2025-09-11T17:34:56.171683Z", + "shell.execute_reply": "2025-09-11T17:34:56.168429Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.159872Z" + } + }, "outputs": [ { "data": { @@ -1913,7 +2102,15 @@ { "cell_type": "code", "execution_count": 22, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.173473Z", + "iopub.status.busy": "2025-09-11T17:34:56.173193Z", + "iopub.status.idle": "2025-09-11T17:34:56.178246Z", + "shell.execute_reply": "2025-09-11T17:34:56.177623Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.173448Z" + } + }, "outputs": [ { "data": { @@ -1923,50 +2120,78 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=child target=<Catalog id=mykitten>>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -1985,7 +2210,15 @@ { "cell_type": "code", "execution_count": 23, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.179097Z", + "iopub.status.busy": "2025-09-11T17:34:56.178865Z", + "iopub.status.idle": "2025-09-11T17:34:56.183594Z", + "shell.execute_reply": "2025-09-11T17:34:56.182503Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.179071Z" + } + }, "outputs": [ { "data": { @@ -2006,7 +2239,15 @@ { "cell_type": "code", "execution_count": 24, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.184382Z", + "iopub.status.busy": "2025-09-11T17:34:56.184174Z", + "iopub.status.idle": "2025-09-11T17:34:56.188808Z", + "shell.execute_reply": "2025-09-11T17:34:56.188241Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.184363Z" + } + }, "outputs": [ { "data": { @@ -2027,7 +2268,15 @@ { "cell_type": "code", "execution_count": 25, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.189795Z", + "iopub.status.busy": "2025-09-11T17:34:56.189531Z", + "iopub.status.idle": "2025-09-11T17:34:56.195712Z", + "shell.execute_reply": "2025-09-11T17:34:56.194797Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.189767Z" + } + }, "outputs": [ { "name": "stdout", @@ -2066,7 +2315,15 @@ { "cell_type": "code", "execution_count": 26, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.197285Z", + "iopub.status.busy": "2025-09-11T17:34:56.197016Z", + "iopub.status.idle": "2025-09-11T17:34:56.205927Z", + "shell.execute_reply": "2025-09-11T17:34:56.204972Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.197263Z" + } + }, "outputs": [ { "data": { @@ -2076,95 +2333,119 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Collection id=landsat-8-l1>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -3391,7 +3643,15 @@ { "cell_type": "code", "execution_count": 27, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.208716Z", + "iopub.status.busy": "2025-09-11T17:34:56.206890Z", + "iopub.status.idle": "2025-09-11T17:34:56.221383Z", + "shell.execute_reply": "2025-09-11T17:34:56.220708Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.208548Z" + } + }, "outputs": [ { "data": { @@ -3412,7 +3672,15 @@ { "cell_type": "code", "execution_count": 28, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.223704Z", + "iopub.status.busy": "2025-09-11T17:34:56.223445Z", + "iopub.status.idle": "2025-09-11T17:34:56.239443Z", + "shell.execute_reply": "2025-09-11T17:34:56.234219Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.223681Z" + } + }, "outputs": [ { "data": { @@ -3439,6 +3707,13 @@ "cell_type": "code", "execution_count": 29, "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.241560Z", + "iopub.status.busy": "2025-09-11T17:34:56.241256Z", + "iopub.status.idle": "2025-09-11T17:34:56.252570Z", + "shell.execute_reply": "2025-09-11T17:34:56.251608Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.241528Z" + }, "scrolled": true }, "outputs": [ @@ -3450,59 +3725,87 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=child target=<Collection id=landsat-8-l1>>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -3522,7 +3825,15 @@ { "cell_type": "code", "execution_count": 30, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.253485Z", + "iopub.status.busy": "2025-09-11T17:34:56.253183Z", + "iopub.status.idle": "2025-09-11T17:34:56.266789Z", + "shell.execute_reply": "2025-09-11T17:34:56.264749Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.253441Z" + } + }, "outputs": [ { "data": { @@ -3562,7 +3873,15 @@ { "cell_type": "code", "execution_count": 31, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.268153Z", + "iopub.status.busy": "2025-09-11T17:34:56.267790Z", + "iopub.status.idle": "2025-09-11T17:34:56.293988Z", + "shell.execute_reply": "2025-09-11T17:34:56.290445Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.268120Z" + } + }, "outputs": [ { "data": { @@ -3572,172 +3891,196 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Item id=LC80150322018141LGN00>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -6099,7 +6305,15 @@ { "cell_type": "code", "execution_count": 32, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.295175Z", + "iopub.status.busy": "2025-09-11T17:34:56.294664Z", + "iopub.status.idle": "2025-09-11T17:34:56.311450Z", + "shell.execute_reply": "2025-09-11T17:34:56.310721Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.294899Z" + } + }, "outputs": [ { "data": { @@ -6122,7 +6336,15 @@ { "cell_type": "code", "execution_count": 33, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.314221Z", + "iopub.status.busy": "2025-09-11T17:34:56.312434Z", + "iopub.status.idle": "2025-09-11T17:34:56.331974Z", + "shell.execute_reply": "2025-09-11T17:34:56.331263Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.314000Z" + } + }, "outputs": [ { "data": { @@ -6157,7 +6379,15 @@ { "cell_type": "code", "execution_count": 34, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.332797Z", + "iopub.status.busy": "2025-09-11T17:34:56.332548Z", + "iopub.status.idle": "2025-09-11T17:34:56.341914Z", + "shell.execute_reply": "2025-09-11T17:34:56.341088Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.332773Z" + } + }, "outputs": [ { "data": { @@ -6167,50 +6397,78 @@ "\n", - "
\n", + "
\n", + "
\n", + " <Link rel=item target=<Item id=LC80150322018141LGN00>>\n", + "
\n", + "\n", "
" ], "text/plain": [ @@ -6230,7 +6488,15 @@ { "cell_type": "code", "execution_count": 35, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.342876Z", + "iopub.status.busy": "2025-09-11T17:34:56.342655Z", + "iopub.status.idle": "2025-09-11T17:34:56.364261Z", + "shell.execute_reply": "2025-09-11T17:34:56.361623Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.342856Z" + } + }, "outputs": [ { "name": "stdout", @@ -6262,7 +6528,15 @@ { "cell_type": "code", "execution_count": 36, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.369342Z", + "iopub.status.busy": "2025-09-11T17:34:56.367815Z", + "iopub.status.idle": "2025-09-11T17:34:56.380914Z", + "shell.execute_reply": "2025-09-11T17:34:56.380260Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.369195Z" + } + }, "outputs": [], "source": [ "mycat.normalize_and_save(\n", @@ -6280,7 +6554,15 @@ { "cell_type": "code", "execution_count": 37, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.381821Z", + "iopub.status.busy": "2025-09-11T17:34:56.381578Z", + "iopub.status.idle": "2025-09-11T17:34:56.396723Z", + "shell.execute_reply": "2025-09-11T17:34:56.395724Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.381800Z" + } + }, "outputs": [ { "data": { @@ -6308,7 +6590,15 @@ { "cell_type": "code", "execution_count": 38, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.402199Z", + "iopub.status.busy": "2025-09-11T17:34:56.400504Z", + "iopub.status.idle": "2025-09-11T17:34:56.419288Z", + "shell.execute_reply": "2025-09-11T17:34:56.418402Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.401994Z" + } + }, "outputs": [], "source": [ "mycat.normalize_and_save(\n", @@ -6319,7 +6609,15 @@ { "cell_type": "code", "execution_count": 39, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2025-09-11T17:34:56.420192Z", + "iopub.status.busy": "2025-09-11T17:34:56.419955Z", + "iopub.status.idle": "2025-09-11T17:34:56.425475Z", + "shell.execute_reply": "2025-09-11T17:34:56.424373Z", + "shell.execute_reply.started": "2025-09-11T17:34:56.420171Z" + } + }, "outputs": [ { "data": { @@ -6354,7 +6652,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.6" + "version": "3.10.12" } }, "nbformat": 4,