Migration
stacrs.migrate
Migrates a STAC dictionary to another version.
Migration can be as simple as updating the stac_version
attribute, but
sometimes can be more complicated. For example, when migrating to v1.1.0,
eo:bands and raster:bands should be consolidated to the new bands
structure.
See the stac-rs documentation for supported versions.
Parameters:
-
value
(dict[str, Any]
) –The STAC value to migrate
-
version
(str | None
, default:None
) –The version to migrate to. If not provided, the value will be migrated to the latest stable version.
Returns:
-
dict[str, Any]
–dict[str, Any]: The migrated dictionary
Examples:
stacrs.migrate_href
Migrates a STAC dictionary at the given href to another version.
Migration can be as simple as updating the stac_version
attribute, but
sometimes can be more complicated. For example, when migrating to v1.1.0,
eo:bands and raster:bands should be consolidated to the new bands
structure.
See the stac-rs documentation for supported versions.
Parameters:
-
href
(str
) –The href to read the STAC object from
-
version
(str | None
, default:None
) –The version to migrate to. If not provided, the value will be migrated to the latest stable version.
Examples: