Learn R Programming

ows4R (version 0.1-1)

WFSClient: WFSClient

Description

WFSClient

Usage

WFSClient

Arguments

Value

Object of R6Class with methods for interfacing an OGC Web Feature Service.

Format

R6Class object.

Methods

new(url, serviceVersion, user, pwd, logger)

This method is used to instantiate a WFSClient with the url of the OGC service. Authentication (user/pwd) is not yet supported and will be added with the support of service transactional modes. By default, the logger argument will be set to NULL (no logger). This argument accepts two possible values: INFO: to print only ows4R logs, DEBUG: to print more verbose logs

getCapabilities()

Get service capabilities. Inherited from OWS Client

reloadCapabilities()

Reload service capabilities

describeFeatureType(typeName)

Get the description of a given featureType

getFeatures(typeName, ...)

Retrieves the features for a given feature type.

Examples

Run this code
# NOT RUN {
   #example based on a WFS endpoint responding at http://localhost:8080/geoserver/wfs
   wfs <- WFSClient$new("http://localhost:8080/geoserver/wfs", serviceVersion = "1.1.1")
   
   #get capabilities
   caps <- wfs$getCapabilities()
   
   #find feature type
   ft <- wfs$findFeatureTypeByName("mylayer", exact = TRUE)
   data <- ft$getFeatures()
   data_with_filter <- ft$getFeatures(cql_filter = "somefilter")
   
   #Advanced examples at https://github.com/eblondel/ows4R/wiki#wfs
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab