Download and Convert Files to GeoPackage Layers with Optional Filtering
rfp_source_url.Rd
This function downloads files from specified URLs and converts them into layers
within a GeoPackage using the ogr2ogr
command-line tool from GDAL. It optionally
applies an SQL filter to the data during conversion if a query is specified.
See also
Other source ogr2ogr gpkg:
rfp_source_csv()
Examples
if (FALSE) { # \dontrun{
path_gpkg <- "background_layers.gpkg"
urls <- c(
"https://newgraph.s3.us-west-2.amazonaws.com/bcfishpass.crossings_vw.fgb",
"https://raw.githubusercontent.com/smnorris/bcfishpass/main/parameters/example_newgraph/parameters_habitat_thresholds.csv"
)
query <- "watershed_group_code in ('ADMS', 'KLUM')"
rfp_source_url(path_gpkg, urls, query)
} # }