Skip to contents

Assembles a complete QGIS project directory with background layers, field forms, methods documentation, and provincial templates. Ready to deploy to Mergin Maps for mobile field collection via rfp_mergin_create().

Usage

rfp_project_create(
  name,
  watershed_groups,
  template = c("bcfishpass_mobile", "bcrestoration_mobile"),
  path_out = "~/Projects/gis",
  layer_config = NULL,
  forms = c("pscis", "fiss_site")
)

Arguments

name

Character. Project name. Used for the directory and .qgs file.

watershed_groups

Character vector of BC watershed group codes (e.g., c("ELKR")).

template

Character. QGIS project template. One of "bcfishpass_mobile" or "bcrestoration_mobile".

path_out

Character. Parent directory for the project. The project will be created at file.path(path_out, name). Defaults to ~/Projects/gis/.

layer_config

A data.frame of layers to download (e.g., from rfp_project_layers()). If NULL (default), reads from the gq registry for the selected template. Must have columns source_layer and source_type.

forms

Character vector of form types to include. Must match files in inst/extdata/forms/. Defaults to c("pscis", "fiss_site").

Value

Invisible path to the created project directory.

Details

The output directory contains:

  • {name}.qgs — QGIS project file (from the selected template)

  • background_layers.gpkg — spatial data downloaded via rfp_source()

  • habitat_lateral.tif — lateral habitat raster (if aws source included)

  • form_*.gpkg — field data collection forms

  • ignore_mobile/photos/ — directory for field photos

  • ignore_mobile/methods/ — provincial methods PDFs

  • ignore_mobile/templates/ — provincial form templates

Examples

if (FALSE) { # \dontrun{
rfp_project_create(
  name = "elk_river_2026",
  watershed_groups = c("ELKR"),
  template = "bcfishpass_mobile",
  forms = c("pscis", "fiss_site")
)
} # }