<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Hello Sybille,</div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
forget my proposal with the VRT. If all your rasters cover the same extent, this is not going to help you much. I misunderstood ... </div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
In order to get zonal statistics for your raster, you can run use the zonal statistics tool, no need to extract bioregions. You can select, what statistics to calculate (Min, Max, Sum etc.) and you can add a separate prefix for each raster layer, eg. U11, U21.
 So you run the zonal statistics for each raster layer and just add the appropriate prefix.</div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof"><span style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">You wrote: [...]</span><span style="font-family: Calibri, sans-serif; font-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">they
 all look the same[...]</span></div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
 Maybe ask the manufacturer of the data what is actually shown? Could be helpful to understand your data you want to run statistics on ...</div>
<div class="elementToProof" style="font-family: "Century Gothic", sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> sibylle.stoeckli@gmx.ch <sibylle.stoeckli@gmx.ch><br>
<b>Gesendet:</b> Dienstag, 30. April 2024 15:10<br>
<b>An:</b> Frank Broniewski <broniewski@a-a.lu>; qgis-user@lists.osgeo.org <qgis-user@lists.osgeo.org>; Frank Broniewski <broniewski@a-a.lu><br>
<b>Betreff:</b> RE: [Qgis-user] merging parts from various raster files</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Aptos}
@font-face
        {font-family:"Century Gothic"}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif}
a:link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
p.x_MsoListParagraph, li.x_MsoListParagraph, div.x_MsoListParagraph
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif}
span.x_EmailStyle20
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 70.85pt 2.0cm 70.85pt}
div.x_WordSection1
        {}
ol
        {margin-bottom:0cm}
ul
        {margin-bottom:0cm}
-->
</style>
<div lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Hello Frank and Richard</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">,                                                                                                                                                                                                                                            
</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">I have 10-12 raster files (figure 1, .tif files), they all look the same and cover the entire country with no definition of the biogeregions.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Second there is the shape file defining the biogeoregions (figure 2, different colors).</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<ul type="disc" style="margin-top:0cm">
<li class="x_MsoListParagraph" style="margin-left:0cm"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Probably I first need to extract the different biogeoregions out from each raster file or define the linkage between the raster files the
 the biogeoregions in the shape file. However, raster – crop raster based on layer mask extracts the entire mask (entire country) not the different biogeoregions.</span></li><li class="x_MsoListParagraph" style="margin-left:0cm"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Furter I may delete all the data in the raster files not needed: e.g. in raster 1  just data on biogeo 1, but not the other biogeoregions,
 in raster 2, data on biogeo 2, but not the other biogeregions. By doing so there will be no overlap, as each raster file consists only one biogregions.</span></li><li class="x_MsoListParagraph" style="margin-left:0cm"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">I am not sure about the virtual raster, because it is not possible to import .tif files.</span></li><li class="x_MsoListParagraph" style="margin-left:0cm"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Then I may just use the “merge” function – merging each bioregions.</span></li></ul>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Background: postprocessing of a model output. It was not possible to run the model only for biogeoregion 1 (with input data from biogeoregion 1) , bioregion 2 (with input
 data from bioregion 2) etc. It was necessary to model the entire country with input data from bioregion 1 etc.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Kind regards</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Sibylle</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Figure 1</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"><img width="516" height="202" id="x_Grafik_x0020_1" style="width:5.375in; height:2.1041in" data-outlook-trace="F:1|T:1" src="cid:image001.png@01DA9B0E.83210E40"></span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">Figure 2</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"><img width="510" height="302" id="x_Grafik_x0020_2" style="width:5.3125in; height:3.1458in" data-outlook-trace="F:1|T:1" src="cid:image002.png@01DA9B0E.83210E40"></span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> Frank Broniewski <broniewski@a-a.lu>
<br>
<b>Sent:</b> Tuesday, April 30, 2024 1:48 PM<br>
<b>To:</b> qgis-user@lists.osgeo.org; sibylle.stoeckli@gmx.ch<br>
<b>Subject:</b> AW: [Qgis-user] merging parts from various raster files</span></p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black">Hello Sybille,</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black">I am not sure if I understand your problem correctly. I assume, you have a mosaic of raster files (that overlap) and you want to create a single raster
 file for statistical analysis. In my opinion, the easiest way to achieve that is to create a virtual raster (VRT) and either use that for stats or create a new raster file from the VRT. You can find the tool in the processing toolbox. With the tool you can
 even define the resolution, if mixed, and how the VRT should be resampled.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black">HTH</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black">Frank</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:10.0pt; font-family:"Century Gothic",sans-serif; color:black"><a href="https://docs.qgis.org/3.34/en/docs/user_manual/processing_algs/gdal/rastermiscellaneous.html#build-virtual-raster">https://docs.qgis.org/3.34/en/docs/user_manual/processing_algs/gdal/rastermiscellaneous.html#build-virtual-raster</a></span></p>
</div>
<div class="x_MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black">Von:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black"> QGIS-User <<a href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@lists.osgeo.org</a>>
 im Auftrag von Sibylle Stöckli via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>><br>
<b>Gesendet:</b> Dienstag, 30. April 2024 11:34<br>
<b>An:</b> <a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a> <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>><br>
<b>Betreff:</b> [Qgis-user] merging parts from various raster files</span> </p>
<div>
<p class="x_MsoNormal"> </p>
</div>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-size:11.0pt">Dear community<br>
<br>
I am working with QGIS 3.34 (Prizren) and would like to merge region 1 from<br>
raster (.tif) file 1 and region 2 from raster file 2, and...<br>
For sure I will need to use raster-miscellaneous-merge.<br>
<br>
My question is related to the pre-processing of the input raster files.<br>
- The 12 raster files all have the same coordinate system.<br>
- The raster files are fully overlapping (the entire country).<br>
- The region is not defined per se in the raster file, but in an additional<br>
shape file (biogeo.shp).<br>
- For sure I can carry out some zonal statistics using raster and shape<br>
file, but to merge the regions I need all the pixels form a regions as input<br>
file for the merging process. This process is more than just selecting<br>
regions or cropping. Do you have any suggestions?<br>
<br>
Kind regards<br>
Sibylle<br>
<br>
_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span></p>
</div>
</div>
</div>
</div>
</body>
</html>