Writes every supplied relation, including unresolved draft evidence. This first binding supports GEOPACKAGE/CREATE only: existing destinations are never overwritten. A staged sibling file must pass an exact value/geometry round trip before publication by a non-replacing hard link. A filesystem without hard-link support fails safely. File-geodatabase and UPDATE modes are reserved for future bindings, not silently emulated.

write_stream_network_geodatabase(
  relations,
  dsn,
  format = c("GEOPACKAGE", "FILE_GEODATABASE"),
  mode = c("CREATE", "UPDATE"),
  overwrite = FALSE,
  reaches = NULL
)

Arguments

relations

Named list of Stream Network relations.

dsn

Path to a new local .gpkg file in an existing directory.

format

GEOPACKAGE (implemented) or FILE_GEODATABASE (reserved).

mode

CREATE (implemented) or UPDATE (reserved).

overwrite

Must be FALSE; replacing existing data is not implemented.

reaches

Optional governed Reach-Stream mappings for acceptance checks.

Value

The normalized destination path, invisibly.

Details

UUIDs remain text, geometry remains in the native CRS, and a versioned `fluvgeo_network_fields` table records scalar types and column order. UTC timestamps are ISO-8601 text with nine fractional digits, avoiding GDAL timestamp rounding. Readers restore POSIXct/Date/logical types, including empty tables. Unsupported columns fail instead of being silently dropped. Accepted observations are revalidated before writing; draft readiness is not required. This is local persistence, not FGDB enterprise loading.