Category "r-raster"

Renaming variables in raster data using substr

I downloaded worldclimate data and changed it into raster data. There are names like wc2.1_5m_bio_1 until 19, and I want to rename these variables to bio_1 (sta

Why do terra::cellSize() and raster::area() produce different estimates of raster cell area?

I just noticed that terra::cellSize() produces cell area estimates that do not match those produced by raster::area(). First, why do these two methods not provi

How to make data frame into raster object R

I have a data frame with one column of values. How do I make this into a raster image with the following parameters? I would also like to save it as a .tif rast

Can I bound an st_distance call by a polygon?

I have seen similar posts on this topic (see, for example, here and here) but not one that is specific to the sf-tidyverse ecosystem. I have a series of lakes,

Suddenly error 'Cannot create a RasterLayer object from this file.' in script that worked before

I have a script where I read a raster stored as .tif : f_treecover <- raster('Landcover_data/treecover_res_100_q.tif') The script used to run fine