[Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column

Bernhard Ströbl bernhard.stroebl at jena.de
Mon Dec 17 01:08:45 PST 2012


Hi Astrid,

AFAIK QGIS can only handle one geometry type per layer (how should it be 
displayed by default?) and only (Multi)points, -lines and -polygons.
So there are IMHO two workarounds, both with views:
1) create three different tables ((Multi)point, (Multi)linestring and 
(Multi)polygon) for editing. Put them all into a view for your result:
SELECT * FROM <pointtable> UNION select * FROM <linetable> ...
2) keep your geometries in one table and make three views, one for each 
geometrytype. Define appropriate rules on the views in order to push any 
edits back into the table.

Bernhard

Am 17.12.2012 09:22, schrieb Astrid Emde:
> Hello,
>
> in a project I want to handle in one PostgreSQl/PostGIS table different
> geometrytypes (POINT, LINESTRING, POLYGON or even MULTI-objects) in a
> single geometrycolumn.
>
> Then I would like to digitize with QGIS new objects. Is this possible?
>
> I tried it already but in QGIS it is not possible to select the
> different geometrytypes although I already have different geometrytypes
> in the table.
>
> I tried with the TYPE GEOMETRYCOLLECTION too, but QGIS seams not to
> support this at all.
>
> I am using PostGIS 1.5 and QGIS 1.8.0.
>
> Thanks for your help.
>



More information about the Qgis-user mailing list