coincident.io.download.read_href#

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

Open and read a STAC asset href into local memory

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

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

  • config (dict[str, Any] | None) – dictionary of options for Config

Return type:

Item

Returns:

Bytes read from file at corresponding href

Examples

Read cloud-cover MultiPolygon estimate from Vantor API:

bytes = asyncio.run(read_href(item, "cloud-cover"))
gf_clouds = gpd.read_file(bytes)