Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 133676

This tag refers to the R package terra. For questions about NASA's Terra satellite, use the tags of its sensors like aster or modis.

1 vote
1 answer
586 views

How to maintain existing layer names from input rasters when applying `terra::merge()` funct...

Layer names are carried over from input rasters when I use terra::mosaic(), but not when I use terra::merge(). terra::merge() currently results in a numbered list prefixed by "lyr". … E.g., "lyr1" "lyr2" "lyr3" Is there an option in terra::merge() that will apply the input layer names? …
Ray J's user avatar
  • 541
0 votes
1 answer
153 views

How to import DEM, with R Terra package, from a list containing two elements (list w/ header...

It works with the Raster package, but I'm having trouble with the proper syntax for Terra. I get an error indicating unused arguments in the code below. … Could someone please check the Terra syntax and advise what the correct code would be? …
Ray J's user avatar
  • 541
0 votes
1 answer
117 views

Is there a limit to how many SpatRasters can be handled by terra::compareGeom() in R?

# check if extents are equal: terra::compareGeom(dem20, dem20_Rcls100, vi_leafOff, vi_leafOn, vi_mcDif, tpi, tpi_Rcls, …
Ray J's user avatar
  • 541
2 votes
2 answers
422 views

How can I crop a raster (within a function) that is used by catalog_apply() in lidR, using T...

bbox <- terra::ext(chunk) bbox <- terra::extend(bbox, 1) chm <- terra::crop(chm, bbox) #bbox <- raster::extent(chunk) #bbox <- raster::extend(bbox, 1) #chm <- raster::crop(chm, bbox) edits: minimal … ::ext(chunk) # correct way: bbox <- lidR::extent(chunk) bbox <- terra::extend(bbox, 1) chm <- terra::crop(chm, bbox) return(chm) } opt_chunk_size(ctgNorm) <- 25 opt_progress(ctgNorm) <- TRUE …
Ray J's user avatar
  • 541