You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that the raster.warp argument is removed in tmap4. However, it seems not ideal that the current version of tmap cannot warp a raster that the previous version was able to do:
library(tmap)
data("land")
elev=land[4]
tm_shape(elev) +
tm_raster()
#> [scale] tm_raster:() the data variable assigned to 'col' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals(<HERE>)' to use all visual values (e.g. colors)
# in tmap3 -- this would apply raster warping
tm_shape(elev, crs="EPSG:8857") +
tm_raster()
#> Warning: Unable to warp stars. Stars will be transformed now (which will take#> some time).#> [scale] tm_raster:() the data variable assigned to 'col' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals(<HERE>)' to use all visual values (e.g. colors)
# in tmap3 -- this would result in a curvilinear raster
tm_shape(elev, crs="EPSG:8857", raster.warp=FALSE) +
tm_raster()
#> Warning: Unable to warp stars. Stars will be transformed now (which will take#> some time).#> [scale] tm_raster:() the data variable assigned to 'col' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals(<HERE>)' to use all visual values (e.g. colors)
Yesterday, I've reset the crs of land to 4326. It also was that crs, but with a different specification.
Now it the warping works (although I'm not sure if that was the cause). So please check.
I don't recall the exact arguments why raster.wrap has been dropped (have to look up), but I guess it is superfluous because warping is always preferable, and as fallback, a transformation is applied.
I know that the
raster.warp
argument is removed in tmap4. However, it seems not ideal that the current version of tmap cannot warp a raster that the previous version was able to do:Related issue: #789
The text was updated successfully, but these errors were encountered: