[Qgis-user] Adding postgis views to qgis

Clifford Snow clifford at snowandsnow.us
Tue Oct 20 09:06:02 PDT 2015


On Tue, Oct 20, 2015 at 7:35 AM, Piotr Kania <p.kania at op.pl> wrote:

> In my postgis database I have multipolygon layer 'public.polygons'
> (gid,geom), I'd like to see vertices of those layer during editing, that's
> why I thought of postgis view. I create that in database:
>
> CREATE VIEW points_of_polygons AS SELECT ST_DumpPoints(geom) AS geom FROM
> public.polygons;
>
> But I can't add that view to Qgis, I found that info:
>

Views are not selectable from the Add PostGIS icon. But starting in version
2.10 you can add the view points_of_polygons by using the DB Manager. A
unique id is no longer required. If you are using an earlier version then
you'll need to create a unique row number. The stackexchange link you
provided gives an example of using ROWNUMBER() OVER() to create the unique
id.


-- 
@osm_seattle
osm_seattle.snowandsnow.us
OpenStreetMap: Maps with a human touch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151020/b8992507/attachment.html>


More information about the Qgis-user mailing list