I created a spatiaLite Database with a point layer (every point is a tree). Additional I created several tables to fill the columns of the spatial layer with attributes using the editing widget “value relations”. I need this because I want to speed up data entry! For some other attribute fields the data entry occurs via “line edit”. I also designed a custom form like Nathan Woodrow describes it in his blog. This works pretty good. However, for output I want to create several custom data sheets with the print composer - one for every tree. Because I want to display the values from my linked tables and not the common keys I created a view that is composed of all attributes I need inclusive the geometry column (geom) of the spatial layer.
CREATE VIEW tree_attrib1 AS SELECT baumkataster.ROWID AS ROWID, baumkataster.baum_ID, baumkataster.geom AS geom, gattung.gattung AS gattung, art.art AS art FROM baumkataster JOIN gattung ON baumkataster.gattung = gattung.gattung_ID JOIN art ON baumkataster.art = art.art_ID;
To use the atlas generator in the print composer I need to “convert” my view into a point layer.
My questions now are: 1: How can I display my view as an point layer in qgis? 2: A view is stored only temporary. Will this new point layer be updated when I insert new features (trees)?