Bug report #9748
PostGIS table loads but won't display.
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | Data Provider/PostGIS | ||
Affected QGIS version: | 2.2.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18298 |
Description
- POSTGRESQL 9.3.1 POSTGIS="2.1.1 r12113" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.7.3" LIBJSON="UNKNOWN" TOPOLOGY RASTER
- POSTGRESQL 9.1.6 POSTGIS="2.0.2 r10789" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.3" LIBJSON="UNKNOWN" RASTER
The layers display with no issues in QGIS 2.0. After dumping the layers to shapefile using pgsql2shp, the shapefile can be added to QGIS 2.2 and it will display. Also, converting the geometry to 2d (using ST_Force2d) results in the layer being visible in QGIS 2.2.
I did not have data available to test whether the same issue affects 3dm or 3dz data from PostGIS.
Related issues
Associated revisions
postgres: convert 4d geometries to 2d (fixes #9748)
Detect number of dimensions for tables with unconstrained type
Fixes #9748
Detect number of dimensions for tables with unconstrained type
Fixes #9748
(cherry picked from commit f512e87ffd0ed7297520bf63830c1fc5c37d7ee9)
History
#1 Updated by Alessandro Pasotti over 10 years ago
- Priority changed from Normal to Severe/Regression
Just a me too: I have a couple of postgis tables that are not visible in 2.2 (they were in previous version).
The tables have column MultiPolygonZM
In the logs I see (might be unrelated though):
rc/core/symbology-ng/qgsrendererv2.cpp: 362: (renderFeatureWithSymbol) feature 89: unsupported wkb type 0x800007d6 for rendering
After changing geometry to 2D with ST_Force_2D the layers becomes visible again.
This is the query I used:
ALTER TABLE prg_tutela ALTER COLUMN geom TYPE geometry(MultiPolygon,32632) USING ST_Force_2d(geom);
See also:
http://gis.stackexchange.com/questions/88785/postgresql-table-wont-display-in-qgis-2-2
#2 Updated by Jürgen Fischer over 10 years ago
- Category set to Data Provider/PostGIS
#3 Updated by Jürgen Fischer over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 016b03b562f0531a09b33809121138f590af6b53.
#4 Updated by Sandro Santilli over 9 years ago
- Status changed from Closed to Reopened
- Target version set to Version 2.8.2
Reopening as this table does not load in any of 1.8, 2.4, 2.6, 2.8 and master barnches:
CREATE TABLE t (g geometry); INSERT INTO t VALUES ('POINT(0 0 0 0)');
#5 Updated by Sandro Santilli over 9 years ago
Note that enforcing a coordinate dimension constraint so that geometry_columns."coord_dimension" returns 4 is not enough by itself, but it also takes geometry_columns.type to be != 'GEOMETRY' for QGIS to force 2d. It would be very helpful to get a comprehensive testcase covering all combinations.
#6 Updated by Sandro Santilli over 9 years ago
I've pushed a fix as f512e87ffd0ed7297520bf63830c1fc5c37d7ee9 -- is it ok to backport this to 2.8 branch too ?
#7 Updated by Sandro Santilli over 9 years ago
- Status changed from Reopened to Closed
Fixed in changeset 3d6554e0ab35444228cf3d7d0e1eb6e1e08173bb.