diff --git a/R/ISOAbstractObject.R b/R/ISOAbstractObject.R index 30d4a7de..3a8e55fb 100644 --- a/R/ISOAbstractObject.R +++ b/R/ISOAbstractObject.R @@ -918,7 +918,7 @@ ISOAbstractObject <- R6Class("ISOAbstractObject", } } })) - + nsdefs <- nsdefs[!duplicated(names(nsdefs))] return(nsdefs) }, diff --git a/tests/testthat/test_GMLRectifiedGrid.R b/tests/testthat/test_GMLRectifiedGrid.R index 072a5530..df1144bd 100644 --- a/tests/testthat/test_GMLRectifiedGrid.R +++ b/tests/testthat/test_GMLRectifiedGrid.R @@ -12,8 +12,10 @@ context("GMLRectifiedGrid") test_that("GMLRectifiedGrid",{ #encoding md <- GMLRectifiedGrid$new() - md$setGridEnvelope(0, 500, 0, 500) - md$setAxisLabels("E", "N") + m <- matrix(c(-180,180,-90, 90), nrow = 2, ncol = 2, byrow = TRUE, + dimnames = list(c("x", "y"), c("min","max"))) + md$setGridEnvelope(m = m) + md$setAxisLabels(c("E", "N")) md$setOrigin(15,15) md$addOffsetVector(c(0,15)) xml <- md$encode() diff --git a/tests/testthat/test_GMLReferenceableGrid.R b/tests/testthat/test_GMLReferenceableGrid.R index 7ea7fe8d..aad61fa1 100644 --- a/tests/testthat/test_GMLReferenceableGrid.R +++ b/tests/testthat/test_GMLReferenceableGrid.R @@ -12,8 +12,8 @@ context("GMLReferenceableGrid") test_that("GMLAbstractReferenceableGrid",{ #encoding md <- GMLAbstractReferenceableGrid$new() - envelope <- matrix(c(0,500,0,500),2,2) - md$setGridEnvelope(envelope) + m <- matrix(c(0,500,0,500),2,2) + md$setGridEnvelope(m = m) md$setAxisLabels(c("E", "N")) xml <- md$encode(validate = FALSE) expect_is(xml, "XMLInternalNode")