[Qgis-user] Joining Postgis tables in QGIS ?

Bernhard Ströbl bernhard.stroebl at jena.de
Tue Sep 10 23:09:06 PDT 2013


Hi Brent,

try the DataDrivenInputMask plugin (preferrably in QGIS 2). Initializing 
the layer will add an action that opens a mask with all the species in a 
(clickable) list, provided
1) you have a properly defined foreign key
2) the species table has at least one NotNull varchar field containing 
e.g. the species' name.

Bernhard

Am 11.09.2013 00:00, schrieb Brent Wood:
>
> I'm wondering if there is a way to join aspatial Postgis tables to
> spatial ones in QGIS.
>
> Target scenario:
> a spatial table of site locations
> a table of species observations at each location.
>
> In Postgis I can (obviously) create a view joining these two tables on
> location_id.
>
> However, this means that if I have 40 species observed at a location, I
> get 40 copies of the same point, each with one species. This is NOT what
> I want.
>
> What I want to do is retain the one point representing the location, but
> when clicking on it, retrieve the 40 species that have the ID.
>
> I had a brief try at running this as an action, passing in the required
> parameters to psql, but getting a passworded connection to work from the
> command line, & escaping all the embedded quotes put this in the too
> hard basket. Maybe run it via a shell script? This is also likely to be
> feasible for me running Linux, but more problematic under Windows (most
> other users), and not a simple, generic solution.
>
> Is there a way to implement such a join (link?) in QGIS? Ideally using
> multiple attributes, just to make it more complicated :-)
>
>
> Thanks,
>
> Brent Wood
>
>
> __________ Information from ESET Mail Security, version of virus
> signature database 8785 (20130910) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> __________ Information from ESET Mail Security, version of virus signature database 8785 (20130910) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>


__________ Information from ESET Mail Security, version of virus signature database 8785 (20130910) __________

The message was checked by ESET Mail Security.
http://www.eset.com





More information about the Qgis-user mailing list