Skip to contents

Connects to the version's SDM DuckDB, emits a Collection + model-surface Item per dataset, optionally adds NCCOS seasonal Items from nc_models.csv, and writes the tree (root Catalog -> version Collection -> dataset Collections -> Items) under dir_out.

Usage

stac_build(
  version = "v7",
  dir_out = NULL,
  cfg = NULL,
  nc_csv = NULL,
  con = NULL,
  model_asset = NULL,
  has_native_asset = NULL
)

Arguments

version

data version (default "v7")

dir_out

output directory for the catalog tree

cfg

config from stac_cfg() (defaults to stac_cfg(version))

nc_csv

optional path to nc_models.csv for seasonal Items

con

optional open DBI connection (else opens read-only via sdm_db_con())

model_asset

for a LEGACY release (model keyed by mdl_seq, v1–v7b): data frame with ds_key and cog_url (the release's tables/model_asset.parquet), used for each dataset's example tile links. NULL builds the catalog without those links. Ignored from v8 on.

has_native_asset

whether the release publishes tables/native_asset.parquet, so each raster / vector dataset Item links it (see stac_model_cell_item()). NULL (default) checks the connection for a native_asset table. A legacy release's local database has none even when the pointer table is published (v7, v7b since 2026-10-02): pass TRUE there and its Items link it beside model_asset.parquet.

Value

invisibly, the path to the root catalog.json