I need to write QGIS script, which removes features with same value of specific attribute – in output will be only features with first occurrence of value. I know, how to check duplicity, but I don't know, how properly create output from my script, when I need it to use in graphical modeler.
Also, what is the best way to get input into the script?
I am beginer in QGIS scripting, but I noticed that the basic scripts deal with inputs differently than any downloaded user scripts (which follow this documentation: https://docs.qgis.org/2.6/en/docs/user_manual/processing/scripts.html).
Best Answer
The following script can be used in the Processing Toolbox (either directly or through the modeler) which allows the user to select a field in the relevant layer and will only output the features with values which occur first:
Attributes of input layer:
Attributes of output layer: