Skip to content

Commit

Permalink
fix #130
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Dec 9, 2024
1 parent 0f274a7 commit ffab53a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ows4R
Version: 0.4-1
Date: 2024-12-01
Date: 2024-12-09
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("Alexandre", "Bennici", role = c("ctb"), comment = c(ORCID = "0000-0003-2160-3487")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- [#129](https://github.com/eblondel/ows4R/issues/129) WFS FeatureType missing control to inherit element type

**Enhancements**

- [#130](https://github.com/eblondel/ows4R/issues/130) WFS 2.0 - Support count parameter in case maxFeatures is used

## [ows4R 0.4](https://github.com/eblondel/ows4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://github.com/eblondel/ows4R)

**Corrections**
Expand Down
15 changes: 12 additions & 3 deletions R/WFSFeatureType.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ WFSFeatureType <- R6Class("WFSFeatureType",
stop("Feature type could not be described, aborting getting features...")
}
vendorParams <- list(...)
if(startsWith(private$version, "2.0")) if("maxfeatures" %in% tolower(names(vendorParams))){
names(vendorParams)[tolower(names(vendorParams)) == "maxfeatures"] <- "count"
}

if(paging){
hitParams <- vendorParams
Expand Down Expand Up @@ -344,9 +347,15 @@ WFSFeatureType <- R6Class("WFSFeatureType",
}

client = private$capabilities$getClient()
ftFeatures <- WFSGetFeature$new(private$capabilities, op = op, private$url, private$version, private$name, outputFormat = outputFormat,
user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(),
logger = self$loggerType, ...)
ftFeatures <- do.call(
WFSGetFeature$new,
c(
private$capabilities, op = op, private$url, private$version, private$name, outputFormat = outputFormat,
user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(),
logger = self$loggerType,
vendorParams
)
)
#exception handling
if(ftFeatures$hasException()){
return(ftFeatures$getException())
Expand Down

0 comments on commit ffab53a

Please sign in to comment.