Migration
stacrs.migrate
builtin
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:
Name | Type | Description | Default |
---|---|---|---|
value |
dict[str, Any]
|
The STAC value to migrate |
required |
version |
str | None
|
The version to migrate to. If not provided, the value will be migrated to the latest stable version. |
None
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: The migrated dictionary |
Examples:
stacrs.migrate_href
builtin
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:
Name | Type | Description | Default |
---|---|---|---|
href |
str
|
The href to read the STAC object from |
required |
version |
str | None
|
The version to migrate to. If not provided, the value will be migrated to the latest stable version. |
None
|
Examples: