<div dir="ltr">Hi Tyler,<div>the point sampling tool plugin will allow you to select multiple rasters to sample from and output to the same file. It also allows you to save the results in a number of different formats (geopackage, csv and shapefile). </div><div>If you've got access to python in your version of R then geopandas can read geopackage files directly, I find that a lot more useful than csv.</div><div><br></div><div>I use this workflow. The slowest part is the point sampling depending on the number and size of rasters and points.</div><div><br></div><div>Matt</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 5, 2020 at 6:49 AM Tyler Smith <<a href="mailto:tyler@plantarum.ca">tyler@plantarum.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I have 30 raster layers, and I need to sample 10,000 random points <br>
from each layer (using the same set of points each time). I think <br>
my options are:<br>
<br>
1. Create a virtual raster, and sample. This has the downside that <br>
the identify of the 30 layers will be replaced by generic 'band1', <br>
'band2' labels.<br>
<br>
2. Sample the layers directly, using a batch process. This has the <br>
downside that it appears to output to gpkg format, and creates 30 <br>
separate files. I will need to open each of these files, export <br>
the points they contain to csv, and then combine the into a single <br>
table in R for analysis.<br>
<br>
Is there a way to create a virtual raster that retains the layer <br>
names in the stack? Alternatively, can I bulk sample multiple <br>
rasters and have the output combined in a single table?<br>
<br>
Thanks,<br>
<br>
Tyler<br>
<br>
-- <br>
Tyler Smith<br>
<a href="http://plantarum.ca" rel="noreferrer" target="_blank">plantarum.ca</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>