diff --git a/R/onLoad.R b/R/onLoad.R index 59583e39..87880d41 100644 --- a/R/onLoad.R +++ b/R/onLoad.R @@ -1,6 +1,6 @@ # envir = environment() .onLoad = function(...) { - options(tmap.style = "white", tmap.mode = "view", tmap.design.mode = FALSE, + options(tmap.style = "white", tmap.mode = "plot", tmap.design.mode = FALSE, tmap.devel.mode = FALSE) assign("tmapOptions", .defaultTmapOptions, envir = .TMAP) diff --git a/R/tmapShape.R b/R/tmapShape.R index 56bd1e5d..3c0e2a95 100644 --- a/R/tmapShape.R +++ b/R/tmapShape.R @@ -249,11 +249,7 @@ tmapShape.stars = function(shp, is.main, crs, bbox, unit, filter, shp_name, smet shpclass = "sfc" } else { - shp0 = shp - dt0 = as.data.table(shp0, center = FALSE) - shp = downsample_stars(shp, max.raster = o$raster.max.cells / (o$fn[1] * o$fn[2])) - if (!is.null(crs) && sf::st_crs(shp) != crs) { shp = transwarp(shp, crs, raster.warp = TRUE) } @@ -279,8 +275,6 @@ tmapShape.stars = function(shp, is.main, crs, bbox, unit, filter, shp_name, smet #shp3 = shp } - shp0b = shp3 - dt = as.data.table(shp3, center = FALSE) # Circumvent bug in tests on Windows diff --git a/sandbox/issues.R b/sandbox/issues.R index 6f0292ba..fe70b147 100644 --- a/sandbox/issues.R +++ b/sandbox/issues.R @@ -392,7 +392,7 @@ st_geotransform(s0) <- c(5, 1.5, 0.2, 0, 0.2, 1.5) tm_shape(s, crs = 3857) + tm_raster() -#tm_shape(s0, crs = 3857) + tm_raster() +tm_shape(s0, crs = 3857) + tm_raster() tm_shape(s) + tm_raster() #tm_shape(s0) + tm_raster()