2

I have several features I want exported as individual images. I am using Print composer and the export process was successful, but the output shows generic filenames like output_1.png:

Generic output filenames

It obviously came from the default value of 'output_'||@atlas_featurenumber under Atlas generation > Output filenames expression:

Output filename expression

I am not familiar with what expression to use. How can I make each feature's name column (from the layer's attribute table) as the filename of its exported image?

Attribute table name field

2 Answers 2

4

"name" in the output filename expression ... maybe ? Note that avoiding spaces in file names is still a good idea.

(With single file export unchecked of course)

You can try the following :

regexp_replace("name",'[\\s\'-]','_')

To replace spaces, hyphens or quotes in your name field

2
  • Yes, sorry, haven't checked that simple expression before asking.
    – JAT86
    Mar 17, 2019 at 18:55
  • No problem ... i completed my answer giving an example ...
    – Snaileater
    Mar 17, 2019 at 19:57
2

You need to use this in the Output filename expression:

'Output_'|| "name"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.