New answers tagged

3 votes
Accepted

Find locations (cell's centroid) of a raster's min and max value using R and terra

Read raster using terra: r = rast("au.tif") Get coords of minimum: xyFromCell(r, where.min(r)[2]) ## x y ## [1,] 377500 393500 Breaking this down a bit, where.min returns ...
Spacedman's user avatar
  • 62.6k
0 votes

Terra::extract delivers unexpected values when extracting table from raster using polygons

Nevermind, I figured terra::extract does not return the fraction of polygon area covered (though the number of rows in the output table equals the number of polygons within the vector layer), but the ...
Manuel Popp's user avatar

Top 50 recent answers are included