Skip to content

Relocate selected assets

Start with a local STAC GeoParquet selection. The test uses the downloaded OpenAerialMap thumbnails.

Copy the selected thumbnails

The command checks destination contents, then writes the package with new primary hrefs and original alternates.

stacpkg items from-parquet openaerialmap.items.parquet \
  | stacpkg relocate verified.pkg --target copied-assets/ --asset-keys thumbnail

Check the package again

Validation prints asset results and a summary. It saves the checked lock only after every asset passes.

stacpkg validate verified.pkg > validation.jsonl
tail -n 1 validation.jsonl
stacpkg inspect verified.pkg --format markdown

Output

{"assets": 3, "checksum": "sha256", "package": "verified.pkg"}
{"baseline": 0, "checked": 3, "checksum": "calculate-if-needed", "excluded": 0, "failed": 0, "items_digest": "sha256:36b8987d8b96177124b71c64f71bac8cb2c5d6dc2cf70d75962c4bb3209f6dc3", "lock_written": true, "methods": ["bytes-sha256"], "passed": 3, "type": "summary", "valid": true}
# stacpkg Inspect

- Package: `verified.pkg`
- Items: 3
- Collections: openaerialmap
- STAC GeoParquet metadata version: 1.0.0
- Embedded Collection count: 0
- Embedded Collections: none
- Assets: 3
- Asset keys: thumbnail
- Known asset bytes: 1822023
- Assets with checksums: 3

## Files

- `assets.lock.parquet` (application/vnd.apache.parquet, 4465 bytes)
- `items.parquet` (application/vnd.apache.parquet, 16704 bytes)