Support for Postgis tables with multiple geometry types with Z #32119
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
DB Manager
Relating to the DB Manager core plugin
Support for Postgis tables with multiple geometry types
When a Postgis table has more than one kind of geometry (Point, LineString, Polygon), DB Manager allow the user to add a layer with just Point features, or with just Polygon features, for example.
That behaviour is illustrated in the following DB Manager dialogue, where we can see three different layers that can be added for the same Potsgis table
edificio
.This works well, if the geometry are only 2d.
Describe the bug
If the Postgis table has Z geometry (geometry with 3D), the layers are added to QGIS without the Z component. If the Postgis table has points with Z, lines with Z or polygons with Z, the layers are added, but the Z component is lost.
How to Reproduce
To reproduce this limitation, we need to create a Postgis table with the
geometry
type with 3 dimensions.Add layer to QGIS
The previous table is shown and can be added to QGIS, using DB Manager.
The layer is reported as having 3 dimensions.
Added layer does not have 3 dimensions
After adding the layer, it does not preserve the 3 dimensions.
This can be checked immediately on the layer tree (mouse over the layer with report it as
Polygon
, not asPolygonZ
, for example).Editing the layer, and showing the vertice editor, the 3 dimension does not appear.
QGIS and OS versions
Tested with 3.8.1-Zanzibar
Additional context
Support for 3D works, if the Postgis table has only one kind of geometry.
The text was updated successfully, but these errors were encountered: