Skip to contents

Import WFS Layer

Usage

argentum_import_wfs_layer(wfs_url, layer_name)

Arguments

wfs_url

The URL of the WFS service

layer_name

The name of the layer to import

Value

An sf object

Examples

# \donttest{
tryCatch({
  sf_layer <- argentum_import_wfs_layer("http://example.com/wfs", "example_layer")
  print(sf_layer)
}, error = function(e) {
  message("Error occurred: ", e$message)
})
#> Requesting WFS feature from: http://example.com/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=example_layer&outputFormat=application%2Fjson
#> Warning: GDAL Error 1: Could not resolve host: example.com
#> Error occurred: Error importing WFS layer: Cannot open "http://example.com/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=example_layer&outputFormat=application%2Fjson"; The file doesn't seem to exist.
# }