From 3a7283e5dfb39522e88e13e8e8cbf71b1b0ebfd6 Mon Sep 17 00:00:00 2001 From: eblondel Date: Thu, 3 Sep 2020 18:04:59 +0200 Subject: [PATCH] #43 WMSClient, WMSCapabilities, WMSLayer, WMSGetFeatureInfo --- DESCRIPTION | 4 +- NAMESPACE | 4 + R/OWSRequest.R | 2 +- R/WMSCapabilities.R | 103 +++++++++++++++++++ R/WMSClient.R | 105 +++++++++++++++++++ R/WMSGetFeatureInfo.R | 62 ++++++++++++ R/WMSLayer.R | 214 +++++++++++++++++++++++++++++++++++++++ R/ows4R.R | 4 +- README.md | 4 +- man/WMSCapabilities.Rd | 49 +++++++++ man/WMSClient.Rd | 55 ++++++++++ man/WMSGetFeatureInfo.Rd | 33 ++++++ man/WMSLayer.Rd | 45 ++++++++ man/ows4R.Rd | 4 +- test.json | 1 + 15 files changed, 681 insertions(+), 8 deletions(-) create mode 100644 R/WMSCapabilities.R create mode 100644 R/WMSClient.R create mode 100644 R/WMSGetFeatureInfo.R create mode 100644 R/WMSLayer.R create mode 100644 man/WMSCapabilities.Rd create mode 100644 man/WMSClient.Rd create mode 100644 man/WMSGetFeatureInfo.Rd create mode 100644 man/WMSLayer.Rd create mode 100644 test.json diff --git a/DESCRIPTION b/DESCRIPTION index 48af63e..b96c3ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ows4R -Version: 0.1-6 -Date: 2020-08-31 +Version: 0.2 +Date: 2020-09-03 Title: Interface to OGC Web-Services (OWS) Authors@R: c(person("Emmanuel", "Blondel", role = c("aut", "cre"), email = "emmanuel.blondel1@gmail.com", comment = c(ORCID = "0000-0002-5870-5762")), person("Norbert", "Billet", role = c("ctb"))) diff --git a/NAMESPACE b/NAMESPACE index 1a32528..a1f16f9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -44,6 +44,10 @@ export(WFSDescribeFeatureType) export(WFSFeatureType) export(WFSFeatureTypeElement) export(WFSGetFeature) +export(WMSCapabilities) +export(WMSClient) +export(WMSGetFeatureInfo) +export(WMSLayer) import(XML) import(geometa) import(httr) diff --git a/R/OWSRequest.R b/R/OWSRequest.R index c5656aa..ea288e5 100644 --- a/R/OWSRequest.R +++ b/R/OWSRequest.R @@ -90,7 +90,7 @@ OWSRequest <- R6Class("OWSRequest", text <- gsub("", "", text) responseContent <- xmlParse(text) }else{ - responseContent <- content(r, type = mimeType, encoding = "UTF-8") + responseContent <- content(r, type = "text", encoding = "UTF-8") } } response <- list(request = request, requestHeaders = headers(r), diff --git a/R/WMSCapabilities.R b/R/WMSCapabilities.R new file mode 100644 index 0000000..c440dec --- /dev/null +++ b/R/WMSCapabilities.R @@ -0,0 +1,103 @@ +#' WMSCapabilities +#' +#' @docType class +#' @export +#' @keywords OGC WMS GetCapabilities +#' @return Object of \code{\link{R6Class}} with methods for interfacing an OGC +#' Web Map Service Get Capabilities document. +#' @format \code{\link{R6Class}} object. +#' +#' @examples +#' \donttest{ +#' #example based on WMS endpoint responding at http://localhost:8080/geoserver/wms +#' caps <- WMSCapabilities$new("http://localhost:8080/geoserver/wms", version = "1.1.1") +#' } +#' +#' @section Methods: +#' \describe{ +#' \item{\code{new(url, version)}}{ +#' This method is used to instantiate a WMSGetCapabilities object +#' } +#' \item{\code{getLayers(pretty)}}{ +#' List the layers available. If \code{pretty} is TRUE, +#' the output will be an object of class \code{data.frame} +#' } +#' \item{\code{findLayerByName(name, exact)}}{ +#' Find layer(s) by name. +#' } +#' } +#' +#' @note Class used to read a \code{WMSCapabilities} document. The use of \code{WMSClient} is +#' recommended instead to benefit from the full set of capabilities associated to a WMS server. +#' +#' @author Emmanuel Blondel +#' +WMSCapabilities <- R6Class("WMSCapabilities", + inherit = OWSCapabilities, + private = list( + + layers = NA, + + #fetchLayers + fetchLayers = function(xmlObj, version){ + wmsNs <- NULL + if(all(class(xmlObj) == c("XMLInternalDocument","XMLAbstractDocument"))){ + namespaces <- OWSUtils$getNamespaces(xmlObj) + if(!is.null(namespaces)) wmsNs <- OWSUtils$findNamespace(namespaces, id = "wms") + } + layersXML <- list() + if(is.null(wmsNs)){ + layersXML <- getNodeSet(xmlObj, "//Layer/Layer") + }else{ + layersXML <- getNodeSet(xmlObj, "//ns:Layer/ns:Layer", wmsNs) + } + layersList <- lapply(layersXML, function(x){ + WMSLayer$new(x, self, version, logger = self$loggerType) + }) + return(layersList) + } + + ), + + public = list( + + #initialize + initialize = function(url, version, logger = NULL) { + super$initialize(url, service = "WMS", serviceVersion = version, + owsVersion = "1.1", logger = logger) + xmlObj <- self$getRequest()$getResponse() + private$layers = private$fetchLayers(xmlObj, version) + }, + + #getLayers + getLayers = function(pretty = FALSE){ + layers <- private$layers + if(pretty){ + layers <- do.call("rbind", lapply(layers, function(x){ + return(data.frame( + name = x$getName(), + title = x$getTitle(), + stringsAsFactors = FALSE + )) + })) + } + return(layers) + }, + + #findLayerByName + findLayerByName = function(expr, exact = TRUE){ + result <- lapply(private$layers, function(x){ + ft <- NULL + if(attr(regexpr(expr, x$getName()), "match.length") != -1 + && endsWith(x$getName(), expr)){ + ft <- x + } + return(ft) + }) + result <- result[!sapply(result, is.null)] + if(length(result) == 1) result <- result[[1]] + return(result) + } + + ) +) \ No newline at end of file diff --git a/R/WMSClient.R b/R/WMSClient.R new file mode 100644 index 0000000..1267559 --- /dev/null +++ b/R/WMSClient.R @@ -0,0 +1,105 @@ +#' WMSClient +#' +#' @docType class +#' @export +#' @keywords OGC WMS Map GetFeatureInfo +#' @return Object of \code{\link{R6Class}} with methods for interfacing an OGC +#' Web Map Service. +#' @format \code{\link{R6Class}} object. +#' +#' @examples +#' \donttest{ +#' #example based on a WMS endpoint responding at http://localhost:8080/geoserver/wms +#' wms <- WMSClient$new("http://localhost:8080/geoserver/wms", serviceVersion = "1.1.1") +#' +#' #get capabilities +#' caps <- wms$getCapabilities() +#' +#' #get feature info +#' +#' #Advanced examples at https://github.com/eblondel/ows4R/wiki#wms +#' } +#' +#' @section Methods: +#' \describe{ +#' \item{\code{new(url, serviceVersion, user, pwd, logger)}}{ +#' This method is used to instantiate a WMSClient with the \code{url} of the +#' OGC service. Authentication (\code{user}/\code{pwd}) is not yet supported.By default, the \code{logger} +#' argument will be set to \code{NULL} (no logger). This argument accepts two possible +#' values: \code{INFO}: to print only \pkg{ows4R} logs, \code{DEBUG}: to print more verbose logs +#' } +#' \item{\code{getCapabilities()}}{ +#' Get service capabilities. Inherited from OWS Client +#' } +#' \item{\code{reloadCapabilities()}}{ +#' Reload service capabilities +#' } +#' } +#' +#' @author Emmanuel Blondel +#' +WMSClient <- R6Class("WMSClient", + inherit = OWSClient, + private = list( + serviceName = "WMS" + ), + public = list( + #initialize + initialize = function(url, serviceVersion = NULL, user = NULL, pwd = NULL, logger = NULL) { + super$initialize(url, service = private$serviceName, serviceVersion, user, pwd, logger) + self$capabilities = WMSCapabilities$new(self$url, self$version, logger = logger) + }, + + #getCapabilities + getCapabilities = function(){ + return(self$capabilities) + }, + + #reloadCapabilities + reloadCapabilities = function(){ + self$capabilities = WMSCapabilities$new(self$url, self$version, logger = self$loggerType) + }, + + #getLayers + getLayers = function(pretty = FALSE){ + return(self$capabilities$getLayers(pretty = pretty)) + }, + + #getMap + getMap = function(){ + stop("Not yet supported") + }, + + #getFeatureInfo + getFeatureInfo = function(layer, styles = NULL, feature_count = 1, + x, y, width, height, bbox, + info_format = "application/vnd.ogc.gml", + ...){ + wmsLayer = self$capabilities$findLayerByName(layer) + features <- NULL + if(is(wmsLayer,"WMSLayer")){ + features <- wmsLayer$getFeatureInfo( + styles = styles, feature_count = feature_count, + x = x, y = y, width = width, height = height, bbox = bbox, + info_format = info_format, + ... + ) + }else if(is(wmsLayer, "list")){ + features <- wmsLayer[[1]]$getFeatureInfo( + styles = styles, feature_count = feature_count, + x = x, y = y, width = width, height = height, bbox = bbox, + info_format = info_format, + ... + ) + } + return(features) + }, + + #getLegendGraphic + getLegendGraphic = function(){ + stop("Not yet supported") + } + + ) +) + diff --git a/R/WMSGetFeatureInfo.R b/R/WMSGetFeatureInfo.R new file mode 100644 index 0000000..77b5337 --- /dev/null +++ b/R/WMSGetFeatureInfo.R @@ -0,0 +1,62 @@ +#' WMSGetFeatureInfo +#' +#' @docType class +#' @export +#' @keywords OGC WMS GetFeatureInfo +#' @return Object of \code{\link{R6Class}} for modelling a WMS GetFeatureInfo request +#' @format \code{\link{R6Class}} object. +#' +#' @section Methods: +#' \describe{ +#' \item{\code{new(op, url, version, typeName, logger, ...)}}{ +#' This method is used to instantiate a WMSGetFeatureInfo object +#' } +#' } +#' +#' @note Abstract class used by \pkg{ows4R} to trigger a WMS GetFeatureInfo request +#' +#' @author Emmanuel Blondel +#' +WMSGetFeatureInfo <- R6Class("WMSGetFeatureInfo", + inherit = OWSRequest, + private = list( + name = "GetFeatureInfo" + ), + public = list( + initialize = function(op, url, version, layers, srs, styles, feature_count = 1, + x, y, width, height, bbox, info_format = "application/vnd.ogc.gml", + logger = NULL, ...) { + + mimeType <- switch(info_format, + "application/vnd.ogc.gml" = "text/xml", + "application/vnd.ogc.gml/3.1.1" = "text/xml", + "application/json" = "application/json", + "text/xml" + ) + + if(is(bbox, "matrix")){ + bbox <- paste0(bbox, collapse=",") + } + namedParams <- list( + service = "WMS", + version = version, + FORMAT = "image/png", + TRANSPARENT = "true", + QUERY_LAYERS = layers, + LAYERS = layers, + STYLES = styles, + FEATURE_COUNT = format(feature_count, scientific = FALSE), + X = x, Y = y, + WIDTH = width, HEIGHT = height, + BBOX = bbox, + INFO_FORMAT = info_format + ) + vendorParams <- list(...) + if(length(vendorParams)>0) namedParams <- c(namedParams, vendorParams) + super$initialize(op, "GET", url, request = private$name, + namedParams = namedParams, mimeType = mimeType, + logger = logger) + self$execute() + } + ) +) \ No newline at end of file diff --git a/R/WMSLayer.R b/R/WMSLayer.R new file mode 100644 index 0000000..a364dff --- /dev/null +++ b/R/WMSLayer.R @@ -0,0 +1,214 @@ +#' WMSLayer +#' +#' @docType class +#' @export +#' @keywords OGC WMS Layer +#' @return Object of \code{\link{R6Class}} modelling a WMS layer +#' @format \code{\link{R6Class}} object. +#' +#' @section Methods: +#' \describe{ +#' \item{\code{new(xmlObj, capabilities, version, logger)}}{ +#' This method is used to instantiate a \code{WMSLayer} object +#' } +#' \item{\code{getName()}}{ +#' Get layer name +#' } +#' \item{\code{getTitle()}}{ +#' Get layer title +#' } +#' \item{\code{getAbstract()}}{ +#' Get layer abstract +#' } +#' \item{\code{getKeywords()}}{ +#' Get layer keywords +#' } +#' } +#' +#' @note Abstract class used by \pkg{ows4R} +#' +#' @author Emmanuel Blondel +#' +WMSLayer <- R6Class("WMSLayer", + inherit = OGCAbstractObject, + private = list( + + capabilities = NULL, + url = NA, + version = NA, + + name = NA, + title = NA, + abstract = NA, + keywords = NA, + defaultCRS = NA, + boundingBox = NA, + style = NA, + + #fetchLayer + fetchLayer = function(xmlObj, version){ + + children <- xmlChildren(xmlObj) + + layerName <- NULL + if(!is.null(children$Name)){ + layerName <- xmlValue(children$Name) + } + + layerTitle <- NULL + if(!is.null(children$Title)){ + layerTitle <- xmlValue(children$Title) + } + + layerAbstract <- NULL + if(!is.null(children$Abstract)){ + layerAbstract <- xmlValue(children$Abstract) + } + + layerKeywords <- NULL + if(!is.null(children$Keywords)){ + layerKeywords <- xpathSApply(xmlDoc(children$KeywordList), "//Keyword", xmlValue) + } + + layerDefaultCRS <- NULL + if(version == "1.1.1"){ + if(!is.null(children$SRS)){ + layerDefaultCRS <- xmlValue(children$SRS) + } + }else if(version == "1.3.0"){ + if(!is.null(children$CRS)){ + layerDefaultCRS <- xmlValue(children[names(children)=="CRS"][[1]]) + } + } + if(!is.null(layerDefaultCRS)) layerDefaultCRS <- OWSUtils$toCRS(layerDefaultCRS) + + layerBoundingBox <- NULL + bboxXML <- children$BoundingBox + if(!is.null(bboxXML)){ + layerBoundingBox <- OWSUtils$toBBOX( + as.numeric(xmlGetAttr(bboxXML,"minx")), + as.numeric(xmlGetAttr(bboxXML,"maxx")), + as.numeric(xmlGetAttr(bboxXML,"miny")), + as.numeric(xmlGetAttr(bboxXML,"maxy")) + ) + } + + layerStyle <- NULL + styleXML <- children$Style + if(!is.null(styleXML)){ + layerStyle <- xmlValue(xmlChildren(styleXML)$Name) + } + + layer <- list( + name = layerName, + title = layerTitle, + abstract = layerAbstract, + keywords = layerKeywords, + defaultCRS = layerDefaultCRS, + boundingBox = layerBoundingBox, + style = layerStyle + ) + + return(layer) + + } + + ), + public = list( + description = NULL, + features = NULL, + initialize = function(xmlObj, capabilities, version, logger = NULL){ + super$initialize(logger = logger) + + private$capabilities = capabilities + private$url = capabilities$getUrl() + private$version = version + + layer = private$fetchLayer(xmlObj, version) + private$name = layer$name + private$title = layer$title + private$abstract = layer$abstract + private$keywords = layer$keywords + private$defaultCRS = layer$defaultCRS + private$boundingBox = layer$boundingBox + private$style = layer$style + + }, + + #getName + getName = function(){ + return(private$name) + }, + + #getTitle + getTitle = function(){ + return(private$title) + }, + + #getAbstract + getAbstract = function(){ + return(private$abstract) + }, + + #getKeywords + getKeywords = function(){ + return(private$keywords) + }, + + #getDefaultCRS + getDefaultCRS = function(){ + return(private$defaultCRS) + }, + + #getBoundingBox + getBoundingBox = function(){ + return(private$boundingBox) + }, + + #getStyle + getStyle = function(){ + return(private$style) + }, + + #getFeatureInfo + getFeatureInfo = function(styles = NULL, feature_count = 1, + x, y, width, height, bbox, + info_format = "application/vnd.ogc.gml", + ...){ + + if(is.null(styles)){ + styles <- self$getStyle() + } + + ftFeatures <- WMSGetFeatureInfo$new( + op = op, url = private$url, version = private$version, + layers = private$name, styles = styles, + feature_count = feature_count, + x = x, y = y, width = width, height = height, bbox = bbox, + info_format = info_format, + logger = self$loggerType, ...) + obj <- ftFeatures$getResponse() + + #write the file to disk + destext <- switch(info_format, + "application/vnd.ogc.gml" = "gml", + "application/vnd.ogc.gml/3.1.1" = "gml", + "application/json" = "json", + "gml" + ) + tempf = tempfile() + destfile = paste0(tempf,".", destext) + if(destext == "gml"){ + saveXML(obj, destfile) + }else if(destext == "json"){ + write(obj, destfile) + } + + ftFeatures <- sf::st_read(destfile, quiet = TRUE) + if(is.null(st_crs(ftFeatures))){ + st_crs(ftFeatures) <- self$getDefaultCRS() + } + return(ftFeatures) + } + ) +) \ No newline at end of file diff --git a/R/ows4R.R b/R/ows4R.R index 7934ca4..5d5eaae 100644 --- a/R/ows4R.R +++ b/R/ows4R.R @@ -15,8 +15,8 @@ #' Package: \tab ows4R\cr #' Type: \tab Package\cr #' Version -#' : \tab 0.1-6\cr -#' Date: \tab 2020-08-31\cr +#' : \tab 0.2\cr +#' Date: \tab 2020-09-03\cr #' License: \tab MIT\cr #' LazyLoad: \tab yes\cr #' } diff --git a/README.md b/README.md index f46f3fa..4ca9a25 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![codecov.io](http://codecov.io/github/eblondel/ows4R/coverage.svg?branch=master)](http://codecov.io/github/eblondel/ows4R?branch=master) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/ows4R)](https://cran.r-project.org/package=ows4R) [![cran checks](https://cranchecks.info/badges/worst/ows4R)](https://cran.r-project.org/web/checks/check_results_ows4R.html) -[![Github_Status_Badge](https://img.shields.io/badge/Github-0.1--6-blue.svg)](https://github.com/eblondel/ows4R) +[![Github_Status_Badge](https://img.shields.io/badge/Github-0.2-blue.svg)](https://github.com/eblondel/ows4R) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345111.svg)](https://doi.org/10.5281/zenodo.1345111) R client for OGC Web-Services @@ -13,6 +13,7 @@ R client for OGC Web-Services * the Common OGC Web-Services specifications, versions ``1.1`` and ``2.0`` * the Catalogue Service for the Web (CSW), version ``2.0.2`` (including ``Transaction`` and ``Harvest`` operations) * the Web Feature Service (WFS), versions ``1.0.0``, ``1.1.0``, and ``2.0.0`` +* the Web Map Service (WMS), versions ``1.1.0``, ``1.1.1``, and ``1.3.0`` ### Citation @@ -26,6 +27,7 @@ OGC Filter|[Filter Encoding](http://www.opengeospatial.org/standards/filter)|``1 OGC Common|[Web Service Common](http://www.opengeospatial.org/standards/common)|``1.1``,``2.0``|||ongoing OGC CSW |[Catalogue Service](http://www.opengeospatial.org/standards/cat)|``2.0.2``|``3.0.0``|[geometa](https://github.com/eblondel/geometa) (ISO 19115 / 19119 / 19110 / 19139 XML)|ongoing / seeking sponsors OGC WFS |[Web Feature Service](http://www.opengeospatial.org/standards/wfs)|``1.0.0``,``1.1.0``,``2.0.0``||[sf](https://github.com/r-spatial/sf) (OGC Simple Feature)|ongoing +OGC WMS |[Web Map Service](http://www.opengeospatial.org/standards/wms)|``1.1.0``,``1.1.1``,``1.3.0``||[sf](https://github.com/r-spatial/sf) (OGC Simple Feature - for GetFeatureInfo operations)|ongoing OGC WCS |[Web Coverage Service](http://www.opengeospatial.org/standards/wcs)||``1.0.0``, ``1.1.0``, ``1.1.1``, ``2.0.1``|[raster](https://cran.r-project.org/package=raster)|under investigation/seek sponsors In case of a missing feature, [create a ticket](https://github.com/eblondel/ows4R/issues/new). diff --git a/man/WMSCapabilities.Rd b/man/WMSCapabilities.Rd new file mode 100644 index 0000000..47ee1de --- /dev/null +++ b/man/WMSCapabilities.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WMSCapabilities.R +\docType{class} +\name{WMSCapabilities} +\alias{WMSCapabilities} +\title{WMSCapabilities} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} with methods for interfacing an OGC +Web Map Service Get Capabilities document. +} +\description{ +WMSCapabilities +} +\note{ +Class used to read a \code{WMSCapabilities} document. The use of \code{WMSClient} is +recommended instead to benefit from the full set of capabilities associated to a WMS server. +} +\section{Methods}{ + +\describe{ + \item{\code{new(url, version)}}{ + This method is used to instantiate a WMSGetCapabilities object + } + \item{\code{getLayers(pretty)}}{ + List the layers available. If \code{pretty} is TRUE, + the output will be an object of class \code{data.frame} + } + \item{\code{findLayerByName(name, exact)}}{ + Find layer(s) by name. + } +} +} + +\examples{ +\donttest{ + #example based on WMS endpoint responding at http://localhost:8080/geoserver/wms + caps <- WMSCapabilities$new("http://localhost:8080/geoserver/wms", version = "1.1.1") +} + +} +\author{ +Emmanuel Blondel +} +\keyword{GetCapabilities} +\keyword{OGC} +\keyword{WMS} diff --git a/man/WMSClient.Rd b/man/WMSClient.Rd new file mode 100644 index 0000000..849bbce --- /dev/null +++ b/man/WMSClient.Rd @@ -0,0 +1,55 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WMSClient.R +\docType{class} +\name{WMSClient} +\alias{WMSClient} +\title{WMSClient} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} with methods for interfacing an OGC +Web Map Service. +} +\description{ +WMSClient +} +\section{Methods}{ + +\describe{ + \item{\code{new(url, serviceVersion, user, pwd, logger)}}{ + This method is used to instantiate a WMSClient with the \code{url} of the + OGC service. Authentication (\code{user}/\code{pwd}) is not yet supported.By default, the \code{logger} + argument will be set to \code{NULL} (no logger). This argument accepts two possible + values: \code{INFO}: to print only \pkg{ows4R} logs, \code{DEBUG}: to print more verbose logs + } + \item{\code{getCapabilities()}}{ + Get service capabilities. Inherited from OWS Client + } + \item{\code{reloadCapabilities()}}{ + Reload service capabilities + } +} +} + +\examples{ +\donttest{ + #example based on a WMS endpoint responding at http://localhost:8080/geoserver/wms + wms <- WMSClient$new("http://localhost:8080/geoserver/wms", serviceVersion = "1.1.1") + + #get capabilities + caps <- wms$getCapabilities() + + #get feature info + + #Advanced examples at https://github.com/eblondel/ows4R/wiki#wms +} + +} +\author{ +Emmanuel Blondel +} +\keyword{GetFeatureInfo} +\keyword{Map} +\keyword{OGC} +\keyword{WMS} diff --git a/man/WMSGetFeatureInfo.Rd b/man/WMSGetFeatureInfo.Rd new file mode 100644 index 0000000..9739169 --- /dev/null +++ b/man/WMSGetFeatureInfo.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WMSGetFeatureInfo.R +\docType{class} +\name{WMSGetFeatureInfo} +\alias{WMSGetFeatureInfo} +\title{WMSGetFeatureInfo} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling a WMS GetFeatureInfo request +} +\description{ +WMSGetFeatureInfo +} +\note{ +Abstract class used by \pkg{ows4R} to trigger a WMS GetFeatureInfo request +} +\section{Methods}{ + +\describe{ + \item{\code{new(op, url, version, typeName, logger, ...)}}{ + This method is used to instantiate a WMSGetFeatureInfo object + } +} +} + +\author{ +Emmanuel Blondel +} +\keyword{GetFeatureInfo} +\keyword{OGC} +\keyword{WMS} diff --git a/man/WMSLayer.Rd b/man/WMSLayer.Rd new file mode 100644 index 0000000..cf669c1 --- /dev/null +++ b/man/WMSLayer.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WMSLayer.R +\docType{class} +\name{WMSLayer} +\alias{WMSLayer} +\title{WMSLayer} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} modelling a WMS layer +} +\description{ +WMSLayer +} +\note{ +Abstract class used by \pkg{ows4R} +} +\section{Methods}{ + +\describe{ + \item{\code{new(xmlObj, capabilities, version, logger)}}{ + This method is used to instantiate a \code{WMSLayer} object + } + \item{\code{getName()}}{ + Get layer name + } + \item{\code{getTitle()}}{ + Get layer title + } + \item{\code{getAbstract()}}{ + Get layer abstract + } + \item{\code{getKeywords()}}{ + Get layer keywords + } +} +} + +\author{ +Emmanuel Blondel +} +\keyword{Layer} +\keyword{OGC} +\keyword{WMS} diff --git a/man/ows4R.Rd b/man/ows4R.Rd index f3b389f..1277bef 100644 --- a/man/ows4R.Rd +++ b/man/ows4R.Rd @@ -16,8 +16,8 @@ Web Processing Service (WPS). Package: \tab ows4R\cr Type: \tab Package\cr Version - : \tab 0.1-6\cr - Date: \tab 2020-08-31\cr + : \tab 0.2\cr + Date: \tab 2020-09-03\cr License: \tab MIT\cr LazyLoad: \tab yes\cr } diff --git a/test.json b/test.json new file mode 100644 index 0000000..02a4529 --- /dev/null +++ b/test.json @@ -0,0 +1 @@ +{"type":"FeatureCollection","totalFeatures":"unknown","features":[{"type":"Feature","id":"fao_capture_dbquery_layer_adv_multiyear.fid-39f10342_174549c71fe_2118","geometry":null,"properties":{"flag":"GHA","species":null,"f_area":null,"f_area_type":null,"capture":1.7362721E7}}],"crs":null}