Overview: In QGIS I want to create a conditional branch in the model designer so that I can pass images with 20m resolution through the 'Warp (reproject)' tool. Images that are already at 10m resolution will skip this step.
Tool: Conditional Branching
Problem: To be clear, I am new to expressions in QGIS (and QGIS as a whole). I do know coding, however. It appears as though there is a selection of variables that one can choose from when creating an expression (condition) for the 'Conditional Branch' tool.
I would like to access the pixel size value, however, it appears as if this argument is not a straightforward argument to be passed. Instead, one must first access the property via the argument crs_description
(if I understood correctly). However, from this point on, I am lost.
I did run raster information on the image, which is how I concluded that the 'Pixel Size' value is a crs property and not part of the metadata. How can I access this attribute from the 'crs_description' argument passed to the 'layer_property' function?
And as a final follow-up question, will the layer_property() function return the pixel value? In this case, I assume I would then need to change the function to be similar to the following:
Best Answer
You can use Raster layer properties:
@Raster_layer_properties_PIXEL_HEIGHT > 15
The conditions are used as dependencies to the following tools: