[Qgis-user] Strange behaviour importing data from postgis
Bo Victor Thomsen
bo.victor.thomsen at gmail.com
Mon Feb 23 05:14:27 PST 2015
Igor -
Yes, the splitting of a table in several parts in QGIS , each containing
only one type of geometry objects is standard behaviour.
A workaround is to change all your "single"-point/line/polygons to
multi-point/line/polygons with an update command in the postgis table. I
suspect there is a slight performance degradation using this method, but
all your rows in the table will be represented in a single layer in QGIS.
Regarding your point table:
* Does all your records in the point table actually have point object,
i.e.none of the records contains NULL in the geometry column ?
* Is your primary key for the table an integer value ? (QGIS needs a
integer unique key for the table. The simplest method to ascertain
this is to have an integer primary key for the table.)
Regards
Bo Victor
Den 23-02-2015 kl. 11:01 skrev Igor Sosa Mayor:
> Bo Victor Thomsen
> <bo.victor.thomsen at gmail.com> writes:
>
>> It might be a point/multipoint issue. If your Postgis table contains
>> both point and multipoint entries, QGIS will represent the table as
>> _two_ tables in the "Add Postgis Layers" dialogue. One table with the
>> "point" type and another table with the same name, but with the
>> "multipoint" type. The reason for this behaviour it that a QGIS layer
>> can only contain _one_ specific type of object. And point and
>> multipoint object are different types. Line/Multiline and
>> Polygon/Multipolygon has the same issues.
> you're right in the case of an other table where I find: ST_MultiPolygon
> (5) and ST_Polygon (4227). (I can also see 2 tables in the dialog,... is
> the a standard solution for this?)
>
> But: in the table with points asking for the ST_GeometryType only
> returns ST_Points...
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150223/c51269fe/attachment.html>
More information about the Qgis-user
mailing list