8.3 Geographic Web Services
Open Geospatial Consortium (OGC) specifications, or OWS provide for a standardized
- Web Feature Service
- Web Map Service
- Web Map Tile Service
- Web Coverage Service
- Web Processing Service
Map servers such as PostGIS have adopted these uniform protocols.
The format is generally a ‘base URL’, an ‘endpoint’ and ‘URL query arguments’ following a ?
library(httr)
<- "http://www.fao.org"
base_url <- "/figis/geoserver/wfs"
endpoint <- list(request = "GetCapabilities")
q <- GET(url = modify_url(base_url, path = endpoint), query = q)
res $url res
#> [1] "https://www.fao.org/figis/geoserver/wfs?request=GetCapabilities"
Available names differ depending on the accessed web feature service.
One way of extracting the contents of the request is
<- content(res, "text")
txt <- xml2::read_xml(txt) xml
The package ows4R
was developed for working with OWS services.