Skip to content

Commit

Permalink
fix required by CRAN over methods::is
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jan 23, 2022
1 parent d0de391 commit 854d290
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/GMLLineString.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ GMLLineString <- R6Class("GMLLineString",
initialize = function(xml = NULL, sfg){
super$initialize(xml, element = private$xmlElement, wrap = TRUE)
if(is.null(xml)){
if(!is(sfg, c("sfg","XY","LINESTRING"))) stop("Input 'sfg' object should be a 'linestring'")
if(!all(sapply(c("sfg","XY", "LINESTRING"), function(x){is(sfg, x)}))) stop("Input 'sfg' object should be a 'linestring'")
m <- as.matrix(sfg)
self$posList <- m
self$setAttr("srsDimension", as.character(dim(m)[2]))
Expand Down
2 changes: 1 addition & 1 deletion R/GMLMultiCurve.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GMLMultiCurve <- R6Class("GMLMultiCurve",
super$initialize(xml, element = private$xmlElement, wrap = TRUE)
if(is.null(xml)){
if(!is.null(sfg)){
if(!is(sfg, c("sfg","XY","MULTILINESTRING"))) stop("Input 'sfg' object should be a 'multilinestring'")
if(!all(sapply(c("sfg","XY", "MULTILINESTRING"), function(x){is(sfg, x)}))) stop("Input 'sfg' object should be a 'multilinestring'")
coords.list <- sfg
class(coords.list) <- "list"
for(coords in coords.list){
Expand Down
2 changes: 1 addition & 1 deletion R/GMLMultiPoint.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GMLMultiPoint <- R6Class("GMLMultiPoint",
super$initialize(xml, element = private$xmlElement, wrap = TRUE)
if(is.null(xml)){
if(!is.null(sfg)){
if(!is(sfg, c("sfg","XY","MULTIPOINT"))) stop("Input 'sfg' object should be a 'multipoint'")
if(!all(sapply(c("sfg","XY", "MULTIPOINT"), function(x){is(sfg, x)}))) stop("Input 'sfg' object should be a 'multipoint'")
coords.list <- sfg
class(coords.list) <- "matrix"
for(i in 1:dim(coords.list)[1]){
Expand Down
2 changes: 1 addition & 1 deletion R/GMLMultiSurface.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GMLMultiSurface <- R6Class("GMLMultiSurface",
super$initialize(xml, element = private$xmlElement, wrap = TRUE)
if(is.null(xml)){
if(!is.null(sfg)){
if(!is(sfg, c("sfg","XY","MULTIPOLYGON"))) stop("Input 'sfg' object should be a 'multipolygon'")
if(!all(sapply(c("sfg","XY", "MULTIPOLYGON"), function(x){is(sfg, x)}))) stop("Input 'sfg' object should be a 'multipolygon'")
coords.list <- sfg
class(coords.list) <- "list"
for(coords in coords.list){
Expand Down
2 changes: 1 addition & 1 deletion R/GMLPoint.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ GMLPoint <- R6Class("GMLPoint",
super$initialize(xml, element = private$xmlElement, wrap = TRUE)
if(is.null(xml)){
if(!is.null(sfg)){
if(!is(sfg, c("sfg","POINT"))) stop("Input 'sfg' object should be a 'point'")
if(!all(sapply(c("sfg","POINT"), function(x){is(sfg, x)}))) stop("Input 'sfg' object should be a 'point'")
m <- as.matrix(sfg)
}else if(!is.null(m)){
if(!is.matrix(m)){
Expand Down
2 changes: 1 addition & 1 deletion R/GMLPolygon.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GMLPolygon <- R6Class("GMLPolygon",
initialize = function(xml = NULL, sfg){
super$initialize(xml, element = private$xmlElement, wrap = TRUE)
if(is.null(xml)){
if(!is(sfg, c("sfg","XY","POLYGON"))) stop("Input 'sfg' object should be a 'polygon'")
if(!all(sapply(c("sfg","XY", "POLYGON"), function(x){is(sfg, x)}))) stop("Input 'sfg' object should be a 'polygon'")
rings <- sfg
class(rings) <- "list"
self$exterior <- GMLLinearRing$new(m=rings[[1]])
Expand Down

0 comments on commit 854d290

Please sign in to comment.