Product Item and Product Item Set

Product Item and Product Item Set#

Product Item#

   # Try to build a shapely Polygon if available; otherwise use a simple tuple
In [1]: try:
   ...:       from shapely.geometry import Polygon
   ...:       s2_polygon = Polygon(
   ...:                (
   ...:                   (148.1127268619, -36.227897298303),
   ...:                   (149.3338263627, -36.210306946434),
   ...:                   (149.30514540706, -35.22112283106),
   ...:                   (148.11635294039, -35.23784402863),
   ...:                   (148.09975983609, -35.290089152181),
   ...:                   (148.1127268619, -36.227897298303),
   ...:                )
   ...:             )
   ...:    except Exception:
   ...:       s2_polygon = (
   ...:          (148.1127268619, -36.227897298303),
   ...:          (149.3338263627, -36.210306946434),
   ...:          (149.30514540706, -35.22112283106),
   ...:          (148.11635294039, -35.23784402863),
   ...:          (148.09975983609, -35.290089152181),
   ...:          (148.1127268619, -36.227897298303),
   ...:       )
   ...: 
  File <string>:13
    except Exception:
                     ^
IndentationError: unindent does not match any outer indentation level

Items from product catalogues can be represented with ProductItem objects. They are built with a set of metadata that uniquely defines the product item. There are also attributes for the api and filesystem of the ProductItem object, which are used to define the path and allow for easy downloads (see below):

These product metadata are then accessible as attributes of the ProductItem object.

ProductItem objects allow you to very easily plot the product geometry with the plot_geometry() method.

There are also helper functions for easily getting the path where the product should be stored, and for downloading the products to this path.

The above functions for getting the path use the file system (see Filesystems for defining paths) to generate these paths. The file system associated with a given ProductItem can be updated using the set_fs() function:

It is also possible to move a ProductItem from the current file system (to which the product has been previously downloaded) to a new filesystem.

Product Item Sets#

Several ProductItem objects can be stored together as a ProductItemSet.