coincident.io.download.read_href#

async coincident.io.download.read_href(item, asset, config=None)#

Open and read a STAC asset href into local memory

Parameters:
  • item (pystac.Item) – The STAC item to be downloaded.

  • asset (str) – The asset name to open (e.g. “cloud-cover” for maxar).

  • config (dict, optional) – dictionary of options for Config

Returns:

Bytes read from file at corresponding href

Return type:

bytes

Examples

Read cloud-cover MultiPolygon estimate from Maxar API >>> bytes = asyncio.run(read_href(item, “cloud-cover” config=MAXAR_CONFIG))