Dear all,
I work ith QGIS 3.40. Using Landsat 5 satellite, I need to calculate
several indices (vegetation, water, etc.), including the NDVI.
This isn't difficult, but since it's a time series, I have hundreds of
images from which I want to generate these same indices. Until now, I've
been generating these indices using the raster calculator in batch mode.
However, this isn't optimized because I still have to manually edit/adapt
the input filename for each NDVI expression/formula.
Regarding the 'input layers' parameter, it's not too complicated since I've
stored all my Landsat images in the same location/folder. For your
information, these are multi-band Landsat image files in GeoTIFF format
(one TIFF file consists of 8 bands). Regarding the input layers, I select
them by selecting all the files in the input folder.
The complexity is greater with the expression parameter.
Here's an example of NDVI for an image:
(("LT05_L2SP_197029_19920101_20200915_02_T1_SR_MERGE_CLIP_BBOX@4" *
0.0000275 - 0.2)
-
("LT05_L2SP_197029_19920101_20200915_02_T1_SR_MERGE_CLIP_BBOX@3" *
0.0000275 - 0.2))
/
(("LT05_L2SP_197029_19920101_20200915_02_T1_SR_MERGE_CLIP_BBOX@4" *
0.0000275 - 0.2)
+
("LT05_L2SP_197029_19920101_20200915_02_T1_SR_MERGE_CLIP_BBOX@3" *
0.0000275 - 0.2))
where "LT05_L2SP_197029_19920101_20200915_02_T1_SR_MERGE_CLIP_BBOX" is the
part that is supposed to vary from one image/iteration to another. The rest
is always the same (invariable/fixed). This includes the band number (@3 or
@4). How can I ensure that the variable part of the input name is
defined/determined based on the value set in the first parameter, 'input
layers'? Finally, for the last parameter, 'calculated', the idea would be
to define it by the concatenation of a fixed path part + the variable
filename, which would be defined by 'variable input layer name' + ''_ndvi'.
[image: image.png]
Thanks so much for your help.
_______________________________________________
QGIS-User mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user