2

Using QGIS

I want to clip a 100gb VRT raster (UAS) into tiles using a predefined polygon grid (polygon gpkg). I want each tile file to be named by the value contained in the "grid_square" field inside the grid gpkg.

What raster tool should I use for this?

1 Answer 1

0

Are you willing to try a solution in R ?

library(sf)
library(terra)

grid <- st_read(dsn = "polygon_grid.gpkg")
nr = nrow(terrace_grid)
r <- rast("uas.vrt")

lapply(1:nr, function(t) {
    tile <- grid[t,]
    nm <- tile$grid_square
    cropped <- crop(r, tile)
    cropped_name = paste0(nm, ".tif")
    writeRast(cropped, cropped_name)
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.