|
8 | 8 | "The goal of this tutorial is to provide an overview to the STAC specification, a breakdown of each STAC component, and how they are integrated together." |
9 | 9 | ] |
10 | 10 | }, |
| 11 | + { |
| 12 | + "cell_type": "markdown", |
| 13 | + "id": "b579302e", |
| 14 | + "metadata": {}, |
| 15 | + "source": [ |
| 16 | + "Open this notebook in Colab below:" |
| 17 | + ] |
| 18 | + }, |
| 19 | + { |
| 20 | + "cell_type": "markdown", |
| 21 | + "id": "a50c8006", |
| 22 | + "metadata": {}, |
| 23 | + "source": [ |
| 24 | + "<a target=\"_blank\" href=\"https://colab.research.google.com/github/planetlabs/notebooks/blob/master/jupyter-notebooks/cloud-native-geospatial/intro-to-stac/introduction-to-stac-part1.ipynb\">\n", |
| 25 | + " <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n", |
| 26 | + "</a>" |
| 27 | + ] |
| 28 | + }, |
11 | 29 | { |
12 | 30 | "cell_type": "markdown", |
13 | 31 | "id": "6f1ce5f6", |
|
29 | 47 | "id": "ac334cc8", |
30 | 48 | "metadata": {}, |
31 | 49 | "source": [ |
32 | | - "The Spatial Temporal Asset Catalog specification was designed to establish a standard, unified language to talk about geospatial data, allowing it to more easily searchable and queryable." |
| 50 | + "The [Spatial Temporal Asset Catalog](https://github.com/radiantearth/stac-api-spec) specification was designed to establish a standard, unified language to talk about geospatial data, allowing it to more easily searchable and queryable." |
33 | 51 | ] |
34 | 52 | }, |
35 | 53 | { |
|
45 | 63 | "id": "3e89b8dc", |
46 | 64 | "metadata": {}, |
47 | 65 | "source": [ |
48 | | - "STAC is simple and extensible in its design due to how it is structured. STAC is a network of json files that reference other json files, with each json file adhering to a specific core specification depending on what STAC component it is describing. This core json format can also be customized to fit differing needs, making the STAC specification highly flexible and adaptable." |
| 66 | + "STAC is simple and extensible in its design due to how it is structured. STAC is a network of JSON files that reference other JSON files, with each JSON file adhering to a specific core specification depending on what STAC component it is describing. This core JSON format can also be customized to fit differing needs, making the STAC specification highly flexible and adaptable." |
49 | 67 | ] |
50 | 68 | }, |
51 | 69 | { |
|
114 | 132 | "" |
115 | 133 | ] |
116 | 134 | }, |
| 135 | + { |
| 136 | + "cell_type": "markdown", |
| 137 | + "id": "7e78927b", |
| 138 | + "metadata": {}, |
| 139 | + "source": [ |
| 140 | + "#### Import pystac package" |
| 141 | + ] |
| 142 | + }, |
117 | 143 | { |
118 | 144 | "cell_type": "code", |
119 | 145 | "execution_count": 1, |
|
139 | 165 | " satellite imagery, derived data, DEM's, etc.\n", |
140 | 166 | "\n", |
141 | 167 | " Args:\n", |
142 | | - " id (str): Provider identifier. Must be unique within the STAC.\n", |
143 | | - " geometry (dict): Defines the full footprint of the asset represented by this item,\n", |
144 | | - " formatted according to `RFC 7946, section 3.1 (GeoJSON)\n", |
145 | | - " <https://tools.ietf.org/html/rfc7946>`_.\n", |
146 | | - " bbox (List[float] or None): Bounding Box of the asset represented by this item using\n", |
147 | | - " either 2D or 3D geometries. The length of the array must be 2*n where n is the\n", |
148 | | - " number of dimensions. Could also be None in the case of a null geometry.\n", |
149 | | - " datetime (datetime or None): Datetime associated with this item. If None,\n", |
150 | | - " a start_datetime and end_datetime must be supplied in the properties.\n", |
151 | | - " properties (dict): A dictionary of additional metadata for the item.\n", |
152 | | - " stac_extensions (List[str]): Optional list of extensions the Item implements.\n", |
153 | | - " href (str or None): Optional HREF for this item, which be set as the item's\n", |
| 168 | + " id : Provider identifier. Must be unique within the STAC.\n", |
| 169 | + " geometry : Defines the full footprint of the asset represented by this\n", |
| 170 | + " item, formatted according to\n", |
| 171 | + " `RFC 7946, section 3.1 (GeoJSON) <https://tools.ietf.org/html/rfc7946>`_.\n", |
| 172 | + " bbox : Bounding Box of the asset represented by this item\n", |
| 173 | + " using either 2D or 3D geometries. The length of the array must be 2*n\n", |
| 174 | + " where n is the number of dimensions. Could also be None in the case of a\n", |
| 175 | + " null geometry.\n", |
| 176 | + " datetime : datetime associated with this item. If None,\n", |
| 177 | + " a start_datetime and end_datetime must be supplied.\n", |
| 178 | + " properties : A dictionary of additional metadata for the item.\n", |
| 179 | + " start_datetime : Optional start datetime, part of common metadata. This value\n", |
| 180 | + " will override any `start_datetime` key in properties.\n", |
| 181 | + " end_datetime : Optional end datetime, part of common metadata. This value\n", |
| 182 | + " will override any `end_datetime` key in properties.\n", |
| 183 | + " stac_extensions : Optional list of extensions the Item implements.\n", |
| 184 | + " href : Optional HREF for this item, which be set as the item's\n", |
154 | 185 | " self link's HREF.\n", |
155 | | - " collection (Collection or str): The Collection or Collection ID that this item\n", |
| 186 | + " collection : The Collection or Collection ID that this item\n", |
156 | 187 | " belongs to.\n", |
157 | | - " extra_fields (dict or None): Extra fields that are part of the top-level JSON properties\n", |
158 | | - " of the Item.\n", |
159 | | - "\n", |
160 | | - " Attributes:\n", |
161 | | - " id (str): Provider identifier. Unique within the STAC.\n", |
162 | | - " geometry (dict): Defines the full footprint of the asset represented by this item,\n", |
163 | | - " formatted according to `RFC 7946, section 3.1 (GeoJSON)\n", |
164 | | - " <https://tools.ietf.org/html/rfc7946>`_.\n", |
165 | | - " bbox (List[float] or None): Bounding Box of the asset represented by this item using\n", |
166 | | - " either 2D or 3D geometries. The length of the array is 2*n where n is the\n", |
167 | | - " number of dimensions. Could also be None in the case of a null geometry.\n", |
168 | | - " datetime (datetime or None): Datetime associated with this item. If None,\n", |
169 | | - " the start_datetime and end_datetime in the common_metadata\n", |
170 | | - " will supply the datetime range of the Item.\n", |
171 | | - " properties (dict): A dictionary of additional metadata for the item.\n", |
172 | | - " stac_extensions (List[str] or None): Optional list of extensions the Item implements.\n", |
173 | | - " collection (Collection or None): Collection that this item is a part of.\n", |
174 | | - " links (List[Link]): A list of :class:`~pystac.Link` objects representing\n", |
175 | | - " all links associated with this STACObject.\n", |
176 | | - " assets (Dict[str, Asset]): Dictionary of asset objects that can be downloaded,\n", |
177 | | - " each with a unique key.\n", |
178 | | - " collection_id (str or None): The Collection ID that this item belongs to, if any.\n", |
179 | | - " extra_fields (dict or None): Extra fields that are part of the top-level JSON properties\n", |
180 | | - " of the Item.\n", |
| 188 | + " extra_fields : Extra fields that are part of the top-level JSON\n", |
| 189 | + " properties of the Item.\n", |
| 190 | + " assets : A dictionary mapping string keys to :class:`~pystac.Asset` objects. All\n", |
| 191 | + " :class:`~pystac.Asset` values in the dictionary will have their\n", |
| 192 | + " :attr:`~pystac.Asset.owner` attribute set to the created Item.\n", |
181 | 193 | " \n" |
182 | 194 | ] |
183 | 195 | } |
|
294 | 306 | }, |
295 | 307 | { |
296 | 308 | "cell_type": "code", |
297 | | - "execution_count": 4, |
| 309 | + "execution_count": 3, |
298 | 310 | "id": "1014b1a4", |
299 | 311 | "metadata": {}, |
300 | 312 | "outputs": [ |
|
309 | 321 | " as well as :class:`~pystac.Item` s.\n", |
310 | 322 | "\n", |
311 | 323 | " Args:\n", |
312 | | - " id (str): Identifier for the catalog. Must be unique within the STAC.\n", |
313 | | - " description (str): Detailed multi-line description to fully explain the catalog.\n", |
314 | | - " `CommonMark 0.28 syntax <http://commonmark.org/>`_ MAY be used for rich text\n", |
315 | | - " representation.\n", |
316 | | - " title (str or None): Optional short descriptive one-line title for the catalog.\n", |
317 | | - " stac_extensions (List[str]): Optional list of extensions the Catalog implements.\n", |
318 | | - " href (str or None): Optional HREF for this catalog, which be set as the catalog's\n", |
319 | | - " self link's HREF.\n", |
320 | | - " catalog_type (str or None): Optional catalog type for this catalog. Must\n", |
321 | | - " be one of the values in :class`~pystac.CatalogType`.\n", |
322 | | - "\n", |
323 | | - " Attributes:\n", |
324 | | - " id (str): Identifier for the catalog.\n", |
325 | | - " description (str): Detailed multi-line description to fully explain the catalog.\n", |
326 | | - " title (str or None): Optional short descriptive one-line title for the catalog.\n", |
327 | | - " stac_extensions (List[str] or None): Optional list of extensions the Catalog implements.\n", |
328 | | - " extra_fields (dict or None): Extra fields that are part of the top-level JSON properties\n", |
329 | | - " of the Catalog.\n", |
330 | | - " links (List[Link]): A list of :class:`~pystac.Link` objects representing\n", |
331 | | - " all links associated with this Catalog.\n", |
332 | | - " catalog_type (str or None): The catalog type, or None if not known.\n", |
| 324 | + " id : Identifier for the catalog. Must be unique within the STAC.\n", |
| 325 | + " description : Detailed multi-line description to fully explain the catalog.\n", |
| 326 | + " `CommonMark 0.29 syntax <https://commonmark.org/>`_ MAY be used for rich\n", |
| 327 | + " text representation.\n", |
| 328 | + " title : Optional short descriptive one-line title for the catalog.\n", |
| 329 | + " stac_extensions : Optional list of extensions the Catalog implements.\n", |
| 330 | + " href : Optional HREF for this catalog, which be set as the\n", |
| 331 | + " catalog's self link's HREF.\n", |
| 332 | + " catalog_type : Optional catalog type for this catalog. Must\n", |
| 333 | + " be one of the values in :class:`~pystac.CatalogType`.\n", |
333 | 334 | " \n" |
334 | 335 | ] |
335 | 336 | } |
|
385 | 386 | }, |
386 | 387 | { |
387 | 388 | "cell_type": "code", |
388 | | - "execution_count": 5, |
| 389 | + "execution_count": 4, |
389 | 390 | "id": "f6fa8b00", |
390 | 391 | "metadata": {}, |
391 | 392 | "outputs": [ |
|
397 | 398 | " enable discovery.\n", |
398 | 399 | "\n", |
399 | 400 | " Args:\n", |
400 | | - " id (str): Identifier for the collection. Must be unique within the STAC.\n", |
401 | | - " description (str): Detailed multi-line description to fully explain the collection.\n", |
402 | | - " `CommonMark 0.28 syntax <http://commonmark.org/>`_ MAY be used for rich text\n", |
403 | | - " representation.\n", |
404 | | - " extent (Extent): Spatial and temporal extents that describe the bounds of\n", |
| 401 | + " id : Identifier for the collection. Must be unique within the STAC.\n", |
| 402 | + " description : Detailed multi-line description to fully explain the\n", |
| 403 | + " collection. `CommonMark 0.29 syntax <https://commonmark.org/>`_ MAY\n", |
| 404 | + " be used for rich text representation.\n", |
| 405 | + " extent : Spatial and temporal extents that describe the bounds of\n", |
405 | 406 | " all items contained within this Collection.\n", |
406 | | - " title (str or None): Optional short descriptive one-line title for the collection.\n", |
407 | | - " stac_extensions (List[str]): Optional list of extensions the Collection implements.\n", |
408 | | - " href (str or None): Optional HREF for this collection, which be set as the collection's\n", |
409 | | - " self link's HREF.\n", |
410 | | - " catalog_type (str or None): Optional catalog type for this catalog. Must\n", |
| 407 | + " title : Optional short descriptive one-line title for the\n", |
| 408 | + " collection.\n", |
| 409 | + " stac_extensions : Optional list of extensions the Collection\n", |
| 410 | + " implements.\n", |
| 411 | + " href : Optional HREF for this collection, which be set as the\n", |
| 412 | + " collection's self link's HREF.\n", |
| 413 | + " catalog_type : Optional catalog type for this catalog. Must\n", |
411 | 414 | " be one of the values in :class`~pystac.CatalogType`.\n", |
412 | | - " license (str): Collection's license(s) as a `SPDX License identifier\n", |
413 | | - " <https://spdx.org/licenses/>`_, `various`, or `proprietary`. If collection includes\n", |
414 | | - " data with multiple different licenses, use `various` and add a link for each.\n", |
415 | | - " Defaults to 'proprietary'.\n", |
416 | | - " keywords (List[str]): Optional list of keywords describing the collection.\n", |
417 | | - " providers (List[Provider]): Optional list of providers of this Collection.\n", |
418 | | - " properties (dict): Optional dict of common fields across referenced items.\n", |
419 | | - " summaries (dict): An optional map of property summaries,\n", |
420 | | - " either a set of values or statistics such as a range.\n", |
421 | | - " extra_fields (dict or None): Extra fields that are part of the top-level JSON properties\n", |
422 | | - " of the Collection.\n", |
423 | | - "\n", |
424 | | - " Attributes:\n", |
425 | | - " id (str): Identifier for the collection.\n", |
426 | | - " description (str): Detailed multi-line description to fully explain the collection.\n", |
427 | | - " extent (Extent): Spatial and temporal extents that describe the bounds of\n", |
428 | | - " all items contained within this Collection.\n", |
429 | | - " title (str or None): Optional short descriptive one-line title for the collection.\n", |
430 | | - " stac_extensions (List[str]): Optional list of extensions the Collection implements.\n", |
431 | | - " keywords (List[str] or None): Optional list of keywords describing the collection.\n", |
432 | | - " providers (List[Provider] or None): Optional list of providers of this Collection.\n", |
433 | | - " properties (dict or None): Optional dict of common fields across referenced items.\n", |
434 | | - " summaries (dict or None): An optional map of property summaries,\n", |
| 415 | + " license : Collection's license(s) as a\n", |
| 416 | + " `SPDX License identifier <https://spdx.org/licenses/>`_,\n", |
| 417 | + " `various`, or `proprietary`. If collection includes\n", |
| 418 | + " data with multiple different licenses, use `various` and add a link for\n", |
| 419 | + " each. Defaults to 'proprietary'.\n", |
| 420 | + " keywords : Optional list of keywords describing the collection.\n", |
| 421 | + " providers : Optional list of providers of this Collection.\n", |
| 422 | + " summaries : An optional map of property summaries,\n", |
435 | 423 | " either a set of values or statistics such as a range.\n", |
436 | | - " links (List[Link]): A list of :class:`~pystac.Link` objects representing\n", |
437 | | - " all links associated with this Collection.\n", |
438 | | - " extra_fields (dict or None): Extra fields that are part of the top-level JSON properties\n", |
439 | | - " of the Catalog.\n", |
| 424 | + " extra_fields : Extra fields that are part of the top-level\n", |
| 425 | + " JSON properties of the Collection.\n", |
| 426 | + " assets : A dictionary mapping string keys to :class:`~pystac.Asset` objects. All\n", |
| 427 | + " :class:`~pystac.Asset` values in the dictionary will have their\n", |
| 428 | + " :attr:`~pystac.Asset.owner` attribute set to the created Collection.\n", |
440 | 429 | " \n" |
441 | 430 | ] |
442 | 431 | } |
|
550 | 539 | "name": "python", |
551 | 540 | "nbconvert_exporter": "python", |
552 | 541 | "pygments_lexer": "ipython3", |
553 | | - "version": "3.8.10" |
| 542 | + "version": "3.9.12" |
554 | 543 | } |
555 | 544 | }, |
556 | 545 | "nbformat": 4, |
|
0 commit comments