[Qgis-user] QGIS - PostGIS interaction - click on feature and update other layer based on related database items

Graeme Seggie graeme_seggie at yahoo.co.uk
Wed Apr 10 01:06:15 PDT 2019


Hello,

Is there a set of steps I can follow in QGIS and PostGIS in order to have QGIS act as an interactive frontend to data held in a PostGIS database? I can't quite find anything online to point me in the right direction, but by simple example I have some stops (bus) and associated timetable data stored. I can show the stops easily, but what I would like is to be able to click on a given stop and for an existing layer change (or new one be added) that shows the stops which are related to the selected one by a connecting route.

My initial thought is that I should have a second layer which is based on a dynamic query based on the selected stop. Maybe a table for results which is empty but on clicking on a stop, this is populated with routes associated with the stop and the QGIS view is refreshed to pick up the new content?

Can anyone get me started or point me at some docs that would get me going please?

GraemeP.S. Apologies if you saw this posted by me before from anothe email - but it seems to get blocked and I thought it might not have been picked up by others previously.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190410/37c58c1d/attachment.html>


More information about the Qgis-user mailing list