[Qgis-user] QGIS processing command line

Karl Magnus Jönsson Karl-Magnus.Jonsson at kristianstad.se
Wed Feb 10 08:20:55 PST 2021


Hi all!
I'm trying the new, relatively, features of the processing toolbox, using the graphical modeler and to run the model from command line. Most works fine but there are some things that I can't get working. Either I don't know how to configure it properly, or it is a bug or feature request. The documentation is quite short on this subject and I haven't found any more good examples. My test model reads two vector feature sources, buffer one of the, clip them against each other, write a shapefile, export to PostgreSQL as well, run some SQL and saves a log to a file. This works fine in graphical mode. In command line I have a few problems:

·         Works fine with shape files but how to read directly from a database table? In graphical mode I can browse for a table and use it like 'postgres://dbname=\'geodata\' host=sbkgeodata port=5432 user=\'user\' password=\'pwd\' sslmode=disable key=\'UNIK\' estimatedmetadata=true srid=3008 type=PolygonZ checkPrimaryKeyUnicity=\'1\' table=\"pri\".\"byggnad_\" (geom)' but I don't know how to write it as a parameter in command line.

·         The log file is created but it is empty from command line.

·         Is there an option to use an existing table in the database and truncate it instead of dropping and recreate? Thought there would be. This is not connected to command line.

Is there someone else that have been testing features like this or are there any good examples to view? Maybe write bug report/feature requests/enhancement proposals to describe and discuss if isn't  just me using it the wrong way. I'm on Windows 10 with QGIS 3.16.3 Standalone installer.

Karl-Magnus Jönsson


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210210/591fb431/attachment.html>


More information about the Qgis-user mailing list