I have ~ 100 vector layer loaded in QGIS which I want to transform to a .tif file with the tool 'rasterize (vector to raster)'. In that tool you need to specify the extent of the file which I want to set to the extent of the layer. In the tool menu you specify this by calculating the extent from the layer in the menu. All parameters set it looks like it: enter image description here
But how can I set this automatically in the batch process? I know I will probably need to use the 'Calculate by expression'-method to get the extent for each layer?
1 Answer 1
Yes, you can use calculate by expression
and use this expression with function layer_property()
:
layer_property (@INPUT, 'extent')
@INPUT
is a variable that contains the name of the current layer. It is generated automatically by QGIS and contains what you entered in the first column (you can fill this automatically, as well).
Yellow: variables generated by QGIS that store the values entered in the input options: enter image description here
-
1This helped! Thank you very much!i.i.k.– i.i.k.2024年06月05日 12:37:21 +00:00Commented Jun 5, 2024 at 12:37