From ab5e1f260a56291a4bbc2826caa5d35e3e2f645a Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 22 Oct 2018 16:46:20 +0200 Subject: [PATCH] #17 control for overwriting crs --- R/WFSFeatureType.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/WFSFeatureType.R b/R/WFSFeatureType.R index bbd91c6..caf7bfe 100644 --- a/R/WFSFeatureType.R +++ b/R/WFSFeatureType.R @@ -246,7 +246,9 @@ WFSFeatureType <- R6Class("WFSFeatureType", #ftFeatures if(hasGeometry){ ftFeatures <- sf::st_read(destfile, quiet = TRUE) - st_crs(ftFeatures) <- self$getDefaultCRS() + if(is.null(st_crs(ftFeatures))){ + st_crs(ftFeatures) <- self$getDefaultCRS() + } }else{ if(private$version == "1.0.0"){ membersContent <- sapply(getNodeSet(xmlObj, "//gml:featureMember"), function(x) xmlChildren(x))