<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
</head>
<body dir="ltr">
<div style="font-size:10pt">
<div dir="ltr" style="margin-top:0; margin-bottom:0">Hello.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0">I'm Javier García Prieto from México.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0">I do exactly the same as you intend to do years ago.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0">There are 2 ways to do what you want frim my perspective.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0">1 If you are working in Linux do a bash script to import every raster to grass, then execute your model from that script.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><a href="https://thedbadmin.com/how-to-loop-in-bash-linux-shell-script-automation/">https://thedbadmin.com/how-to-loop-in-bash-linux-shell-script-automation/</a><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><a href="https://grasswiki.osgeo.org/wiki/Importing_data#:~:text=Create%20a%20new%20location%20for,raster%20data%20(internally%20using%20GDAL)">https://grasswiki.osgeo.org/wiki/Importing_data#:~:text=Create%20a%20new%20location%20for,raster%20data%20(internally%20using%20GDAL)</a><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0">2 Use Python to do the same in a way that the script is system agnostic. Once you have aquired your maps in grass use your model as described above.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0">Greetings from Mexico.</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="ltr" style="margin-top:0; margin-bottom:0"><br>
</div>
<div id="LGEmailSignatureBox" dir="ltr" style="margin-top:0; margin-bottom:0">
<div dir="ltr" style="margin-top:0; margin-bottom:0; font-size:9pt"><i>Enviado desde mi LG de Telcel.</i></div>
</div>
</div>
<div style="font-size:10pt">
<div dir="auto" style="margin-top:0; margin-bottom:0"><br>
</div>
<div dir="auto" style="margin-top:0; margin-bottom:0">------ Mensaje original------</div>
<div dir="auto" style="margin-top:0; margin-bottom:0"><b>Desde: </b>Victor Lundström via grass-user
</div>
<div dir="auto" style="margin-top:0; margin-bottom:0"><b>Fecha: </b>sáb., 6 ene. 2024 4:17</div>
<div dir="auto" style="margin-top:0; margin-bottom:0"><b>Para: </b>grass-user;</div>
<div dir="auto" style="margin-top:0; margin-bottom:0"><b>Cc:</b></div>
<div dir="auto" style="margin-top:0; margin-bottom:0"><b>Asunto:</b>[GRASS-user] how to add a loop in the graphical modeler</div>
<div dir="auto" style="margin-top:0; margin-bottom:0"><br>
</div>
</div>
<div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi everyone,<br>
</div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm trying the start getting familiar with the graphical modeler as I have a lot of raster operations that I need to automate. </div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have 456 raster layers that I (1) want to interpolate using v.surf.bspline, and then (2) export to six different folders, 76 rasters for each.<br>
<br>
I have designed the workflow in the graphical modeler using just one layer to see that everything works the way that it should, and it does!<br>
However, I can't for the life of me figure out how to set up a loop so that it can iterate through all the remaining layers. I'm trying my best to</div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
read the manual, but since all of this is new to me, I can't figure out (1) how to add several raster layers. Whenever I use the "add data to model" I can</div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">only add one layer from the drop down list. I also don't know if I need two loops, one for interpolation and then one for the
 raster export.<br>
<br>
I have attached a screenshot that outlines my model. I hope you'll be able to guide me in the right direction!<br>
<br>
Best,<br>
Victor</span></div>
<div class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span class="elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"><img class="ContentPasted0 w-1816 h-979" size="42688" data-outlook-trace="F:1|T:1" src="cid:50d4456d-7068-4914-87ef-b733b6be741a" style="max-width:100%"><br>
</span></div>
</div>
</body>
</html>