[Qgis-user] sampling points from multipe rasters

Tyler Smith tyler at plantarum.ca
Mon May 4 13:39:58 PDT 2020


Hi,

I have 30 raster layers, and I need to sample 10,000 random points 
from each layer (using the same set of points each time). I think 
my options are:

1. Create a virtual raster, and sample. This has the downside that 
the identify of the 30 layers will be replaced by generic 'band1', 
'band2' labels.

2. Sample the layers directly, using a batch process. This has the 
downside that it appears to output to gpkg format, and creates 30 
separate files. I will need to open each of these files, export 
the points they contain to csv, and then combine the into a single 
table in R for analysis.

Is there a way to create a virtual raster that retains the layer 
names in the stack? Alternatively, can I bulk sample multiple 
rasters and have the output combined in a single table?

Thanks,

Tyler

-- 
Tyler Smith
plantarum.ca


More information about the Qgis-user mailing list