Skip to content

Commit

Permalink
...changed back to plot mode...
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Jan 28, 2024
1 parent f0a9205 commit 2126a9e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion R/onLoad.R
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
6 changes: 0 additions & 6 deletions R/tmapShape.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sandbox/issues.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2126a9e

Please sign in to comment.