read_stac(uri: str, extract_dir: Optional[str] = None, **kwargs) List[dict][source]#

Parse the contents of a STAC catalog.

The file is downloaded if needed. If it is a zip file, it is unzipped and the catalog.json inside is parsed.

  • uri (str) – Either a URI to a STAC catalog JSON file or a URI to a zip file containing a STAC catalog JSON file.

  • extract_dir (Optional[str]) – Dir to extract to, if URI is a zip file. If None, a temporary dir will be used. Defaults to None.

  • **kwargs – Extra args for parse_stac().

  • FileNotFoundError – If catalog.json is not found inside the zip file.

  • Exception – If multiple catalog.json’s are found inside the zip file.


A list of dicts with keys: “label_uri”, “image_uris”, “label_bbox”, “image_bbox”, “bboxes_intersect”, and “aoi_geometry”. Each dict corresponds to one label item and its associated image assets in the STAC catalog.

Return type