You can add views from the add postgis layer but your view must have a few
tweaks.

First, add an Id, even if a fake id with rownumber () over ().

Then, you need to explicitly cast your geometry and CRS.  Therefore use
this instead

ST_DumpPoints(geom).geom::geometry('point',your_EPSG_code)

A 17h06 Ter, 20 de Out de 2015, Clifford Snow <cliff...@snowandsnow.us>
escreveu:

>
> On Tue, Oct 20, 2015 at 7:35 AM, Piotr Kania <p.ka...@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
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to