Bug report #4767
PostGIS 2.0 ST_AsBinary drops forcing 2d, breaks WKB parser of QGIS
|Affected QGIS version:||1.7.3||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||14630|
Up to PostGIS-1.5 ST_AsBinary used to internally force the geometry dimensionality to 2d, due to lack of standard specifications for higher dimensions. As of PostGIS-2.0 the new SQL/MM higher dimension specifications are used. Qgis is unable to parse such WKB and complains as follows:
Debug: /usr/src/qgis/qgis-1.7/src/core/qgsgeometry.cpp: 3701: (boundingBox) Unknown WkbType ENCOUNTERED
Mapserver contains an explicit Force2D call since a long time. Qgis could do the same for a quick fix.
#1 Updated by Sandro Santilli almost 10 years ago
- Affected QGIS version changed from master to 1.7.3
Here's a fix for the 1.7 branch, which also improve the support for geography (fixing opening a geography table with no type advertised in geometry_columns). Note: this was tested against PostGIS 1.4, 1.5 and 2.0svn, opening geometry and geography columns with 4 dimensions.
The following changes since commit 7a9110ab8de73475313f44ebeae76aaa31bf4c43: Alexander Bruy (1): always save last used dir in Raster terrain analysis plugin (fix #4693) are available in the git repository at: [email protected]:strk/Quantum-GIS.git release-1_7-pgis-2_0 Sandro Santilli (1): Simplify code handling geography and support postgis-2.0 WKB (sqlmm) src/providers/postgres/qgspostgresprovider.cpp | 34 +++++++++++------------ 1 files changed, 16 insertions(+), 18 deletions(-)