The source_type domain for per-project layer manifests (see
rfp_manifest_read()). Every type but "frozen" is refreshable - the layer
name doubles as the download identifier for the matching rfp_source()
pass. "frozen" layers are wanted but never
refreshed and never flagged by rfp_project_audit(); they have no
re-downloadable source, so a frozen layer missing from the GeoPackage is
unrecoverable.
Details
Designed for extension: future tiers (e.g. "tiles") are added here and
every manifest consumer picks them up. "osm" (#168) is the first tier
added this way and needed no per-type branch anywhere downstream; "url"
(#266) is the second, and reached rtj's drivers with zero lines changed
there because they derive this list rather than keeping a copy; "stac"
(rtj#275) is the third.
"url" covers a layer fetched from a documented address - federal open data,
a provincial WFS, any file ogr2ogr opens over /vsicurl/. Its parameters
live in inst/lookups/rfp_source_url.csv, keyed by source_layer, for the
same reason the osm selector does: a manifest row is two columns.
"stac" covers a layer assembled from a STAC catalogue - N items matched by
watershed group and an item filter, one asset each, merged into a single
layer. Its parameters live in inst/lookups/rfp_source_stac.csv. It sits
after "url" because it depends on nothing the other passes produce, and
before "frozen" so existing manifests keep their order on disk.
The osm, url and stac lookups are rfp's DEFAULT parameters, not the
only ones a run can use: rfp_source()'s lookups argument merges a
caller's rows over them (rfp#285). What stays fixed is that a manifest row
is two columns, so the parameters live in a lookup either way.
The ORDER is load-bearing, in two places. rfp_manifest_create() sorts a
manifest by match(source_type, rfp_manifest_types()), and
rfp_project_create() derives its download order from
intersect(setdiff(rfp_manifest_types(), "frozen"), ...) - which is how the
aws pass is guaranteed to run after the bcdata pass it depends on. A new
tier therefore goes in at the position its dependencies require, and before
"frozen" so existing manifests keep the order they already have on disk.
