[postgis-users] Multiple Geometries in Single View
Wesley Roberts
jwesroberts at gmail.com
Tue Oct 29 00:07:13 PDT 2013
Dear Rémi-C and Bo Victor,
Many thanks for your responses. It seems my idea will not work as I
thought. Perhaps I should look for alternative methods to share my data. My
main aim is to reduce the clutter of sharing shapefiles and making it
easier for the auditor to access and use our data. Perhaps the spatiallite
db approach is one to use.
I looked around for methods for sharing a postGIS database and it is not as
easy as one would think. As I understand it there is no single file or
folder containing the database and tables that can be simply copied to a
shared folder. Even setting up a database in a non-standard location is
difficult enough. I will start a separate question regarding sharing
postGIS databases.
Spatiallite may be the best alternative.
Many thanks and kind regards,
Wesley
On Mon, Oct 28, 2013 at 5:20 PM, Rémi Cura <remi.cura at gmail.com> wrote:
> Hey,
> as far as I know you cant load directly different geometry type into qgis (
> http://trac.osgeo.org/qgis/ticket/167).
>
> If you have a table with different type in in (point, line, polygon), qgis
> will ask you to chose which geometry you want to load.
> If you have a table with a column with "geometry collection", qgis won't
> load it.
>
> This being said, it is easilly worked around (still a hassle) :
> simple : if you have a column with different geometry type, load it
> multiple time in qgis selecting each time a different geometry type
> simple : if you have a column with geometry collection : use
> ST_CollectionExtract to be in the previous case
>
> Note: if you are tired of selecting the type of geometry in qgis, you can
> create view with only one type of geometry.
>
> dirty way : simply convert everything to polygon ! : use ST_Buffer with
> small area to convert point and line to polygon.
>
> Don't hesitate if you need more details.
> Cheers,
> Rémi-C
>
>
> 2013/10/28 Wesley Roberts <jwesroberts at gmail.com>
>
>> Dear PostGIS users,
>>
>> I am a new postgis user and have a question regarding views and multiple
>> geometry types. I understand that I can create a *view* where I select a
>> portion of my data using an sql statement and view that *view *in QGIS.
>> I would like to know if it is possible to create a *view *that contains
>> multiple geometry types, so for example: a view displaying points lines and
>> polygons from different tables within the my db?
>>
>> The context to this question is as follows. Our organization needs to
>> share a number of GIS layers with an auditor as part of our validation
>> process. Instead of sending the auditor a "bucket load" of shapefiles with
>> instructions on what to look at, I would prefer to share one postGIS DB
>> with all the layers in tables and all of our geo-spatial requirements in
>> views. Is this possible?
>>
>> Many thanks and looking forward to your responses.
>> Wesley
>>
>> --
>> Dr Wesley Roberts
>> jwesroberts at gmail.com
>> Cell: +27(0)83 5355 646
>> skype: roberts-w
>>
>> I hear...I forget
>> I see...and I remember
>> I do...and I understand
>> Ancient Chinese Proverb
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
--
Dr Wesley Roberts
jwesroberts at gmail.com
Cell: +27(0)83 5355 646
skype: roberts-w
I hear...I forget
I see...and I remember
I do...and I understand
Ancient Chinese Proverb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131029/5e6db489/attachment.html>
More information about the postgis-users
mailing list