From b728832ac51f5cbc93c6ca1417574ade00665d6d Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Tue, 19 Sep 2023 13:38:48 -0600 Subject: [PATCH] Add simple example notebook (#87) * docs: add simple example notebook * Update docs/example.ipynb Co-authored-by: Julia Signell --------- Co-authored-by: Julia Signell --- README-template.md | 1 + docs/example.ipynb | 1627 ++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 3 files changed, 1629 insertions(+) create mode 100644 docs/example.ipynb diff --git a/README-template.md b/README-template.md index c3c1f31..13459f4 100644 --- a/README-template.md +++ b/README-template.md @@ -13,6 +13,7 @@ - Extra fields: - `ephemeral:custom`: A custom attribute - [Browse the example in human-readable form](https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/stactools-packages/ephemeral/main/examples/collection.json) +- [Browse a notebook demonstrating the example item and collection](https://github.com/stactools-packages/ephemeral/tree/main/docs/example.ipynb) A short description of the package and its usage. diff --git a/docs/example.ipynb b/docs/example.ipynb new file mode 100644 index 0000000..1b3024b --- /dev/null +++ b/docs/example.ipynb @@ -0,0 +1,1627 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# stactools-ephemeral\n", + "\n", + "This is a small notebook demonstrating use of this package and its generated items and collections.\n", + "It is intended to be executed from the root of this repository, since it relies on files that have been checked into this repo." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example items and collections\n", + "\n", + "This package provides some example data, in the `examples/` directory.\n", + "You can load them with [pystac](https://github.com/stac-utils/pystac).\n", + "The item includes a custom attribute that is specific to this package." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "
    \n", + " \n", + " \n", + " \n", + "
  • \n", + " type\n", + " \"Collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " id\n", + " \"example-collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " stac_version\n", + " \"1.0.0\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " description\n", + " \"An example collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " \n", + " links\n", + " [] 3 items\n", + " \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 0\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"self\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"/Users/gadomski/Code/stactools-packages/template/examples/collection.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 1\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"root\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"/Users/gadomski/Code/stactools-packages/template/examples/collection.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " title\n", + " \"Example collection\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 2\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"item\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"./example-item/example-item.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " custom_attribute\n", + " \"foo\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " title\n", + " \"Example collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " extent\n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " spatial\n", + "
        \n", + " \n", + " \n", + "
      • \n", + " \n", + " bbox\n", + " [] 1 items\n", + " \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 0\n", + " [] 4 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -61.287624\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 72.229798\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 2\n", + " -52.301599\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 3\n", + " 74.622043\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
      • \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    • \n", + " temporal\n", + "
        \n", + " \n", + " \n", + "
      • \n", + " \n", + " interval\n", + " [] 1 items\n", + " \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 0\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " \"2023-09-12T11:48:03.199913Z\"\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " \"2023-09-12T11:48:03.199913Z\"\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
      • \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " license\n", + " \"proprietary\"\n", + "
  • \n", + " \n", + " \n", + " \n", + "
\n", + "
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "
    \n", + " \n", + " \n", + " \n", + "
  • \n", + " type\n", + " \"Feature\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " stac_version\n", + " \"1.0.0\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " id\n", + " \"example-item\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " properties\n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " proj:epsg\n", + " 32621\n", + "
    • \n", + " \n", + " \n", + " \n", + " \n", + "
    • \n", + " \n", + " proj:transform\n", + " [] 6 items\n", + " \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 0\n", + " 100.01126757344893\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 1\n", + " 0.0\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 2\n", + " 373185.0\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 3\n", + " 0.0\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 4\n", + " -100.01126757344893\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 5\n", + " 8286015.0\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    • \n", + " \n", + " proj:shape\n", + " [] 2 items\n", + " \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 0\n", + " 2667\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " 1\n", + " 2658\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + " \n", + "
    • \n", + " \n", + " \n", + " \n", + " \n", + "
    • \n", + " custom_attribute\n", + " \"foo\"\n", + "
    • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    • \n", + " datetime\n", + " \"2023-09-12T11:48:03.199913Z\"\n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " geometry\n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " type\n", + " \"Polygon\"\n", + "
    • \n", + " \n", + " \n", + " \n", + " \n", + "
    • \n", + " \n", + " coordinates\n", + " [] 1 items\n", + " \n", + " \n", + "
        \n", + " \n", + " \n", + "
      • \n", + " \n", + " 0\n", + " [] 5 items\n", + " \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 0\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -52.916275\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 72.229798\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 1\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -52.301599\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 74.613784\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 2\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -61.287624\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 74.622043\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 3\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -60.726346\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 72.236891\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 4\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -52.916275\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 72.229798\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
      • \n", + " \n", + " \n", + "
      \n", + " \n", + "
    • \n", + " \n", + " \n", + "
    \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " \n", + " links\n", + " [] 4 items\n", + " \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 0\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"root\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"/Users/gadomski/Code/stactools-packages/template/examples/collection.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " title\n", + " \"Example collection\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 1\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"collection\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"../collection.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " title\n", + " \"Example collection\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 2\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"self\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"/Users/gadomski/Code/stactools-packages/template/examples/example-item/example-item.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 3\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"parent\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"/Users/gadomski/Code/stactools-packages/template/examples/collection.json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " title\n", + " \"Example collection\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " assets\n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " data\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " \"../../tests/data/asset.tif\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " \n", + " roles\n", + " [] 1 items\n", + " \n", + " \n", + "
          \n", + " \n", + " \n", + " \n", + "
        • \n", + " 0\n", + " \"data\"\n", + "
        • \n", + " \n", + " \n", + " \n", + "
        \n", + " \n", + "
      • \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " \n", + " bbox\n", + " [] 4 items\n", + " \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 0\n", + " -61.287624\n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 1\n", + " 72.229798\n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 2\n", + " -52.301599\n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 3\n", + " 74.622043\n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
  • \n", + " \n", + " \n", + " \n", + "
  • \n", + " \n", + " stac_extensions\n", + " [] 1 items\n", + " \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 0\n", + " \"https://stac-extensions.github.io/projection/v1.1.0/schema.json\"\n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " collection\n", + " \"example-collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + "
\n", + "
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "This is the custom attribute: foo\n" + ] + } + ], + "source": [ + "from pathlib import Path\n", + "from pystac import Collection, Item\n", + "from IPython.display import display\n", + "import stactools.ephemeral.stac\n", + "\n", + "root = Path().cwd().parent\n", + "collection = Collection.from_file(str(root / \"examples\" / \"collection.json\"))\n", + "display(collection)\n", + "item = next(collection.get_items())\n", + "display(item)\n", + "print(f\"This is the custom attribute: {item.properties['custom_attribute']}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Creating items and collections\n", + "\n", + "Items can be created from an href to a single tif file.\n", + "Items are added to collections using the standard pystac interface." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "
    \n", + " \n", + " \n", + " \n", + "
  • \n", + " type\n", + " \"Collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " id\n", + " \"example-collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " stac_version\n", + " \"1.0.0\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " description\n", + " \"An example collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " \n", + " links\n", + " [] 1 items\n", + " \n", + " \n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " 0\n", + "
        \n", + " \n", + " \n", + " \n", + "
      • \n", + " rel\n", + " \"item\"\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " href\n", + " None\n", + "
      • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
      • \n", + " type\n", + " \"application/json\"\n", + "
      • \n", + " \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + " \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " custom_attribute\n", + " \"foo\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " title\n", + " \"Example collection\"\n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " extent\n", + "
      \n", + " \n", + " \n", + " \n", + "
    • \n", + " spatial\n", + "
        \n", + " \n", + " \n", + "
      • \n", + " \n", + " bbox\n", + " [] 1 items\n", + " \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 0\n", + " [] 4 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " -180.0\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " 90.0\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 2\n", + " 180.0\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 3\n", + " -90.0\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
      • \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    • \n", + " temporal\n", + "
        \n", + " \n", + " \n", + "
      • \n", + " \n", + " interval\n", + " [] 1 items\n", + " \n", + " \n", + "
          \n", + " \n", + " \n", + "
        • \n", + " \n", + " 0\n", + " [] 2 items\n", + " \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 0\n", + " \"2023-09-18T21:35:51.039996Z\"\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
            \n", + " \n", + " \n", + " \n", + "
          • \n", + " 1\n", + " None\n", + "
          • \n", + " \n", + " \n", + " \n", + "
          \n", + " \n", + "
        • \n", + " \n", + " \n", + "
        \n", + " \n", + "
      • \n", + " \n", + " \n", + "
      \n", + "
    • \n", + " \n", + " \n", + " \n", + "
    \n", + "
  • \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
  • \n", + " license\n", + " \"proprietary\"\n", + "
  • \n", + " \n", + " \n", + " \n", + "
\n", + "
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "tif_path = root / \"tests\" / \"data\" / \"asset.tif\"\n", + "item = stactools.ephemeral.stac.create_item(str(tif_path))\n", + "collection = stactools.ephemeral.stac.create_collection()\n", + "collection.add_item(item)\n", + "display(collection)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.2" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/pyproject.toml b/pyproject.toml index eaf2f0d..b71978d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ dev = [ "pytest~=7.4", "ruff==0.0.288", ] +docs = ["pystac~=1.8", "ipykernel~=6.25", "jinja2~=3.1"] [project.urls] Github = "https://github.com/stactools-packges/ephemeral"