2

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?

asked Jun 5, 2024 at 11:51

1 Answer 1

4

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

answered Jun 5, 2024 at 12:15
1
  • 1
    This helped! Thank you very much! Commented Jun 5, 2024 at 12:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.