Relative Content

Tag Archive for rrasterterra

Why does terra produce different value ranges for the same raster?

I have been using terra to read and then save various global raster data sets. Today I noticed quite different value ranges depending on how I look at the data or what I do with it. I am confused and nervous to undertake any analyses until I can explain why I am seeing what I am seeing. I would be most grateful if any among you could let me know why the value ranges I am seeing are so different.

Convert bounds into raster in R

I have a data frame with quad keys and associated values for activity index, and I want to convert it into a raster. The quadkeyr package is too slow for the scale of my data (each hour across all of Canada), so I just want to use the terra package.

The results from focal() in terra

I’m trying to calculate focal statistics on a raster in R using the terra package. I want a 3×3 moving window and I want to calculate the max raster cell. After doing this, I turn the original and “focal stats” raster into data frames.