Constructs the appropriate GDAL connection string from a base URL, auto-detecting the service type (WFS, OAPIF, ArcGIS REST) or using an explicit driver hint.

wfs_connection(
  base_url,
  driver = c("auto", "WFS", "OAPIF", "ESRIJSON"),
  version = NULL,
  srs = NULL
)

Arguments

base_url

Character. The service endpoint URL.

driver

Character. One of "auto", "WFS", "OAPIF", "ESRIJSON". When "auto", the driver is inferred from the URL pattern.

version

Character or NULL. WFS version (e.g. "2.0.0"). Ignored for non-WFS drivers.

srs

Character or NULL. Target SRS as "EPSG:XXXX". Passed as srsName for WFS.

Value

A list with dsn (GDAL connection string) and driver (resolved driver name).