[Qgis-user] Loading filtered database table as temp layer

Karl Magnus Jönsson Karl-Magnus.Jonsson at kristianstad.se
Tue May 4 02:37:31 PDT 2021


Hi!
Wouldn't it be possible to use the "Execute SQL" algorithm under "Vector general" instead of the "PostgreSQL SQL execute and load" in the Model Designer? It outputs a (temporary) layer if you choose that. I'm not sure how to use it correctly though. 

Karl-Magnus Jönsson


-----Ursprungligt meddelande-----
Från: Qgis-user <qgis-user-bounces at lists.osgeo.org> För Michael Gieding
Skickat: den 4 maj 2021 11:18
Till: QGIS-User Mailinglist <qgis-user at lists.osgeo.org>
Ämne: Re: [Qgis-user] Loading filtered database table as temp layer

Hello Richard,

thank you for the addition. But I fear, that this is not suitable for my target group.
Difficult enough for them to get the basics in QGIS. So it would be nice to offer a simple tool for their work.
Maybe a good chance for me to dive into plugin programming. Seems to be a reachable goal.


Kind regards,
Michael Gieding


________________________________________
Von: Richard McDonnell <richard.mcdonnell at opw.ie>
Gesendet: Dienstag, 4. Mai 2021 10:58
An: Michael Gieding; QGIS-User Mailinglist
Cc: thayeray at yahoo.com
Betreff: RE: Loading filtered database table as temp layer

Hi Michael,

To add to Thayer's message.

There is currently no way to do exactly what you are looking for, but, I would suggest the following as an alternative, which is simple enough to follow.



There are three ways to load a filtered layer into QGIS

Firstly, You can load a Layer using SQL Filter using the either the Data Source Manager or DB Manager.

1.       Data Source Manager will allow you to use the Set Filter option on your selected Table

2.       DB Manager will do the same when you highlight the Layer you want to load and click on the SQL Window [cid:image002.png at 01D740CC.14351C50]

3.       Load the Layer in in its entirety, then use the Filter option by right clicking on the layer and selecting Filter.



Whichever of the above you use, the Filtered Layers can be temporally saved out as whatever format you would like while being worked on. This can be achieved by right clicking on the layer, selecting Export => Save Feature As



I Hope that helps in some way.



Regards,



Richard







--
Richard McDonnell MSc GIS, FME Certified Professional FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36 Jonathan Swift Street, Trim, Co Meath, C15 NX36 -- M +353 87 688 5964 T +353 46 942 2409 https://gov.ie/opw _______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the Qgis-user mailing list