[QGIS-Developer] PostgreSQL execute and load SQL in Processing Modeler

Pedro Venâncio pedrongvenancio at gmail.com
Wed Jul 31 09:30:56 PDT 2019


Dear all,

I'm developing a Processing Model and I want to run an algorithm (Union) on
a specific PostGIS layer. The idea is to have this input layer hardcoded to
the Union algorithm.

If this layer is stored in a system file (SHP, or any other vector layer
format), it is simple, just pointing Union input field to that file. But as
it is stored in PostgreSQL, I thought to use "PostgreSQL execute and load
SQL" algorithm to call the layer and use it in Model, as input to Union.

In fact this works well, but when running the Model, the PostGIS layer is
loaded to QGIS canvas.

I think this is happening because "PostgreSQL execute and load SQL" won’t
create any new layer, and load the PostGIS layer itself, as a result of the
query, just like it's explained in the docs:

https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/database.html#postgresql-execute-and-load-sql

So, anyone have any hint to call a PostGIS layer and use it as hardcoded
input to a Model algorithm, without python coding?

Thank you very much!

Best regards,
Pedro Venâncio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190731/72d136a7/attachment.html>


More information about the QGIS-Developer mailing list