Error using mapview package: (!is.na(getProjection(lst[[i]]))) { : argument is of length zero

Viewed 501

I am trying to use the mapview package to plot a raster and sf feature.

streamsTransform <- st_transform(streams, 2958)
st_crs(streamsTransform)

dem17N <- projectRaster(dem, crs = "+proj=utm +zone=17 +ellps=GRS80 
                        +towgs84=0,0,0,0,0,0,0 +units=m +no_defs")

course <- raster::aggregate(dem17N,8)
mapview(course) + mapview(streamsTransform)

I have made sure they are in the same projected coordinate system using st_transform and projectRaster, but I am still getting the following error:

(!is.na(getProjection(lst[[i]]))) { : 
  argument is of length zero

Any advice would be greatly appreciated!

0 Answers
Related