Skip to contents

Folds the content hash with the family's encoding tag (asset_enc()) and lays the object out under the family's store: cog/{grid_id}/{hash}.tif for the cog_* families, native/{ds_key}/{hash}.tif for native_am / native_ax, native/{ds_key}/{hash}.pmtiles for native_pmtiles. This is the only way a publisher names an object, and the key is known before the file is built - so a surface already in the catalog costs neither a build nor an upload.

Usage

asset_store_key(family, scope, content_hash)

Arguments

family

one of names(asset_enc())

scope

grid_id (cog families) or ds_key (native families); length 1 or length(content_hash)

content_hash

16-hex payload hash(es): pixel_hashes() for a raster on a grid, native_vector_hash() for a vector range, content_hashes_df() for decoded pixels

Value

data frame content_hash, hash (the key's 16 hex), enc, store, key; zero rows for a zero-length content_hash

Examples

asset_store_key("cog_model", "global05", "0123456789abcdef")
#>       content_hash             hash           enc store
#> 1 0123456789abcdef 5d66e411ce42ee88 int1u-nd0-ovr   cog
#>                                 key
#> 1 cog/global05/5d66e411ce42ee88.tif