0

I am using a python script to load the content of some files to layers in QGIS. These file usually contain header information that I am skipping (like the Number of header lines to discard parameter in the Delimited Text dialog box).
I would like however to preserve this information as I may have to output my data in the original format.
Where can I store these header ? Is Metadata the way to go ? If so, how do I store my information there and retrieve it later ?

1

Use layer custom properties. These are set through calling setCustomProperty on the layer, and retrieved via customProperty. They are saved and restored along with the current project.

  • Perfect! I was under the impression Metadata wasn't really the correct way to go but I coundn't locate this setCustomProperty. Thanks – YeO Apr 22 '18 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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