eomatch.mu_stac.MatchupCatalogue.save

eomatch.mu_stac.MatchupCatalogue.save#

MatchupCatalogue.save(path: str | None = None, catalog_type: CatalogType = 'SELF_CONTAINED') → None[source]#

Normalise hrefs and write the catalogue to disk.

Items are laid out as {collection}/{YYYY}/{M}/{D}/{item-id}.json with no per-item subdirectory.

Only items already resolved in memory (freshly added/looked-up this run – see skip_unresolved=True below) get their hrefs (re)normalised and get written out; pystac.Catalog.save() itself already only writes resolved item/child links (see its own is_resolved() checks), so nothing already correctly saved from a previous run is touched. Without skip_unresolved, normalize_hrefs walks and resolves every item in every collection in the whole tree – on a catalogue shared across many runs (see the class docstring), that means a single missing/corrupted item anywhere, even one totally unrelated to anything this run touched, would raise and abort every future save() call, not just reads.

Parameters:

path – root directory to save to. Defaults to the path set at construction.

Raises:

ValueError – if no path is available.