Download and Save BC Data to GPKG
rfp_source_bcdata.Rd
Downloads a layer from the BC Data Catalogue, optionally intersects with a mask, and writes it to a GeoPackage.
Usage
rfp_source_bcdata(
bcdata_record_id = NULL,
path_gpkg = NULL,
mask = NULL,
layer_name = NULL
)
Arguments
- bcdata_record_id
character A character string specifying the BC Data Catalogue record ID permanent id (7ecfafa6-5e18-48cd-8d9b-eae5b5ea2881), name of the record (pscis-assessments) or
object name
(ex. WHSE_FISH.PSCIS_ASSESSMENT_SVW). The name of the record can be found at https://catalogue.data.gov.bc.ca/. This does not need to be in capitals as we will convert to capitals within the function.- path_gpkg
character Path to the output GeoPackage file.
- mask
sf::sf Optional masking polygon to clip spatial extent. Can massively increase download speed as first queries only bbox from api.
- layer_name
character Optional layer name for writing to the GPKG. Defaults to
bcdata_record_id
.