Re: [Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
Hello, thanks to all of you for the feedback. Looks like it is better, not to handle different geometrytype in one column. I will try your suggestions Thanks Astrid On Mon, December 17, 2012 5:32 pm, pcr...@pcreso.com wrote: > Hi Astrid, > > > The only way of doing what you suggest is to create your table, then add > views splitting out the geometries into the different types for use in > QGIS. Update rules may need to be applied to the views to support editing > through them > > There are other ways of achieving a similar effect, but this is the only > way to have the single database geometry column that you specify. > > If your use case allows this, I suggest you revisit your requirement for > a single table, so that you manage your underlying data in separate > tables, & apply a view unioning the tables into the single database view. > I think this will be a more robust way to have the editing & data > management facilities, & the apparent single table/column that you > require. > > Brent Wood > > > --- On Mon, 12/17/12, Astrid Emde wrote: > > > From: Astrid Emde > Subject: [Qgis-user] How to digitze points, linestrings, polygons in a > single PostGIS geometry-column To: qgis-user@lists.osgeo.org > Date: Monday, December 17, 2012, 9:22 PM > > > 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. > > > -- > Best regards > > > Astrid Emde > > > -- > Astrid Emde > WhereGroup GmbH & Co.KG > Eifelstraße 7 > 53119 Bonn > Germany > > > Fon: +49(0)228 90 90 38 - 19 > Fax: +49(0)228 90 90 38 - 11 > > > astrid.e...@wheregroup.com www.wheregroup.com Folgen Sie der WhereGroup auf > twitter: http://twitter.com/WhereGroup_com > > > Amtsgericht Bonn, HRA 6788 > --- > Komplementärin: > WhereGroup Verwaltungs GmbH > vertreten durch: Olaf Knopp, Peter Stamm > --- > pgp-public key: > http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284 > Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen > Signed and/or encrypted mail is highly appreciated > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- Mit freundlichen Grüßen Astrid Emde * Das WhereGroup Team wünscht Ihnen ein frohes Weihnachtsfest und ein glückliches Jahr 2013! http://www.wheregroup.com * -- Astrid Emde WhereGroup GmbH & Co.KG Eifelstraße 7 53119 Bonn Germany Fon: +49(0)228 90 90 38 - 19 Fax: +49(0)228 90 90 38 - 11 astrid.e...@wheregroup.com www.wheregroup.com Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com Amtsgericht Bonn, HRA 6788 --- Komplementärin: WhereGroup Verwaltungs GmbH vertreten durch: Olaf Knopp, Peter Stamm --- pgp-public key: http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284 Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen Signed and/or encrypted mail is highly appreciated ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
Hi Astrid, The only way of doing what you suggest is to create your table, then add views splitting out the geometries into the different types for use in QGIS. Update rules may need to be applied to the views to support editing through them There are other ways of achieving a similar effect, but this is the only way to have the single database geometry column that you specify. If your use case allows this, I suggest you revisit your requirement for a single table, so that you manage your underlying data in separate tables, & apply a view unioning the tables into the single database view. I think this will be a more robust way to have the editing & data management facilities, & the apparent single table/column that you require. Brent Wood --- On Mon, 12/17/12, Astrid Emde wrote: From: Astrid Emde Subject: [Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column To: qgis-user@lists.osgeo.org Date: Monday, December 17, 2012, 9:22 PM 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. -- Best regards Astrid Emde -- Astrid Emde WhereGroup GmbH & Co.KG Eifelstraße 7 53119 Bonn Germany Fon: +49(0)228 90 90 38 - 19 Fax: +49(0)228 90 90 38 - 11 astrid.e...@wheregroup.com www.wheregroup.com Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com Amtsgericht Bonn, HRA 6788 --- Komplementärin: WhereGroup Verwaltungs GmbH vertreten durch: Olaf Knopp, Peter Stamm --- pgp-public key: http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284 Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen Signed and/or encrypted mail is highly appreciated ___ 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
Re: [Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
Hi Astrid, On Mon, 17. Dec 2012 at 09:22:13 +0100, Astrid Emde wrote: > 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? You can only have one type of renderer (point, line or polygon), therefore the layers need to have one type of feature (single and multipart doesn't matter here). If you have multiple feature types in one column, QGIS will determine which feature type is there and offer the existing ones and offer those - a row for each type. So you can create multiple layers from one column one for each existing type. If you have an empty column without a restricting entry in geometry_columns you can choose which feature type the new features should have. The case where you want to add features of a different type to a colum that already has other features, but isn't restricted to one type, isn't covered in the GUI yet, I think. Although it should work later as you could have added that column with different types, when it was still empty. > I tried with the TYPE GEOMETRYCOLLECTION too, but QGIS seams not to > support this at all. Right, also something that is related to QGIS restriction to one renderer. And in turn a lot of other stuff assumes that a layer can only have features of one type - so we would probably break a lot, if we added support for multiple renderers per layer. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de committ(ed|ing) to Quantum GIS IRC: jef on FreeNode -- norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH Rheinstrasse 13, 26506 Norden GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
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. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
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 UNION select * FROM ... 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. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] How to digitze points, linestrings, polygons in a single PostGIS geometry-column
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. -- Best regards Astrid Emde -- Astrid Emde WhereGroup GmbH & Co.KG Eifelstraße 7 53119 Bonn Germany Fon: +49(0)228 90 90 38 - 19 Fax: +49(0)228 90 90 38 - 11 astrid.e...@wheregroup.com www.wheregroup.com Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com Amtsgericht Bonn, HRA 6788 --- Komplementärin: WhereGroup Verwaltungs GmbH vertreten durch: Olaf Knopp, Peter Stamm --- pgp-public key: http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284 Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen Signed and/or encrypted mail is highly appreciated ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user