Skip to contents

Creates a copy of a pre-built form GeoPackage for the specified type. The form is ready for deployment to a QGIS project and Mergin Maps for mobile field collection.

Usage

rfp_form_create(type, path_out)

Arguments

type

Character. Form type (e.g., "pscis", "fiss_site", "edna"). See rfp_form_types() for available types.

path_out

Character. Output path for the form GPKG. If the parent directory doesn't exist, it will be created.

Value

Invisible character - the path to the created form GPKG. Any .qml sidecar is written beside it with the same basename, and any child table's .qml beside it under the child's table name.

Details

Where the form ships with a .qml sidecar - every form generated by rfp_form_build() does - the sidecar is copied alongside it. That file carries the field aliases, edit widgets, tab layout and symbology, so the GeoPackage on its own would deploy a bare table. A form that owns child tables (e.g. edna owns edna_sample) also gets each child's form_<child>.qml, named for its table.

Use rfp_form_types() to see available form types and their descriptions.

See also

Examples

if (FALSE) { # \dontrun{
# Create a PSCIS form
rfp_form_create("pscis", "~/Projects/gis/my_project/form_pscis.gpkg")

# See available types
rfp_form_types()
} # }