Downloads one feature type of a WFS service and reads it into an sf
object. This is the data counterpart to read_metadata(), which only
describes where a dataset lives.
Usage
read_wfs(
service,
layer = NULL,
srs = "EPSG:25833",
version = c("2.0.0", "1.1.0", "1.0.0"),
output_format = "application/json",
count = NULL,
start_index = NULL,
host = "https://gdi.berlin.de/services/wfs",
quiet = FALSE
)Arguments
- service
service name, see
wfs_base_url(), or a full endpoint URL.- layer
feature type to request. Either the fully qualified name (e.g.
"wsg:wsg") or the bare layer name, in which case the service name is used as the namespace prefix. IfNULL(default) the service is asked for its feature types vialist_wfs_layers(); this only succeeds when the service offers exactly one.- srs
coordinate reference system of the response (default:
"EPSG:25833", the ETRS89 / UTM 33N used by the Berlin services).- version
WFS version, one of
"2.0.0"(default),"1.1.0","1.0.0".- output_format
value of
OUTPUTFORMAT(default:"application/json", i.e. GeoJSON). PassNULLto let the server choose, which usually yields GML.- count
maximum number of features to return, or
NULL(default) for all of them. Sent asCOUNTfor WFS 2.0.0 and asMAXFEATURESotherwise.- start_index
index of the first feature to return, or
NULL(default). Together withcountthis allows paging through layers that exceed the server's response limit. WFS 2.0.0 only.- host
see
wfs_base_url().- quiet
suppress the progress messages of
sf::read_sf()and of this function (default:FALSE).