[Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
Vincent Picavet
vincent.ml at oslandia.com
Mon Dec 17 01:13:28 PST 2012
Hello Astrid,
> 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.
It is possible though really not recommanded.
> Then I would like to digitize with QGIS new objects. Is this possible?
As far as I know no, there is almost no software being able to deal with
heterogeneous geometries in a column.
Something you could do is split your point/line/polygon geometries into three
different columns (or even table).
Then create a view to gather everything into a single heterogeneous geometry
column if you really need to.
And for writing, use triggers on insert and update, to detect the kind of
geometry you want to insert, and write into the right column (or table).
You can even in that case for a same object, have a polygon representation and
a point representation at the same time, written automatically by the trigger.
Then you can use qgis to read and write the various column (/tables) and edit
the data transparently.
What you cannot have is an heterogeneous layer inside qgis.
Hope this helps.
Vincent
> 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