[Qgis-developer] Table join in QGIS

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Apr 17 07:12:42 EDT 2009


On Fri, Apr 17, 2009 at 11:56 AM, Alexander Bruy <voltron at ua.fm> wrote:
> Carson, Giovanni, thanks for yours replies.
>  The problem is in my bad English. Sorry.
>  Yes, fTools works, it produce a new layer with attributes, from both tables. But this is not what I want.
> For my task it's necessary to have one layer with minimal attribute set and few standalone tables, which
> time from time joined to the layer. In one case used one table, in another case - another table.
>  I think, for this task better use PostGIS or SpatialLite...

 I've used PostGIS for this, and created VIEWs from my spatial table
and my data table. The spatial table is one row per feature, and the
data table has rows which have feature id, month, and rainfall in that
month.

 If I want to map rainfall in a particular month, I do a join on the
two tables, selecting the month, and joining on the feature-id. I end
up with a view that has one row per feature, keeping the_geom, and
having the rainfall for each feature in that month.

 It would be nice to have this kind of feature dynamically available
for any kind of vector layer, but then you end up duplicating an RDBMS
in Qgis. Better that we stop using shapefiles and get SpatialLite
working :)

Barry


More information about the Qgis-developer mailing list