Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS 2.0 ST_AsBinary drops forcing 2d, breaks WKB parser of QGIS #14630

Closed
qgib opened this issue Jan 11, 2012 · 9 comments
Closed

PostGIS 2.0 ST_AsBinary drops forcing 2d, breaks WKB parser of QGIS #14630

qgib opened this issue Jan 11, 2012 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers High Priority
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 11, 2012

Author Name: Sandro Santilli (@strk)
Original Redmine Issue: 4767
Affected QGIS version: 1.7.3
Redmine category:data_provider/postgis
Assignee: Tim Sutton


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.

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Sandro Santilli (@strk)


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 #14578)

are available in the git repository at:

  git@github.com: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(-)



  • version was changed from master to 1.7.3

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Sandro Santilli (@strk)


I'll postpone port of the fix to master as master is currently undergoing a refactoring


  • category_id was configured as Data Provider/PostGIS

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Sandro Santilli (@strk)


2b739d9 by jef adapted the patch to master branch.
Does it need to be also backported in a 1.8 branch ?

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Sandro Santilli (@strk)


Fixed in changeset "8d65c9728065d5b34b4e8c0418ad7767ea6f514e".


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Sandro Santilli (@strk)


The commit references don't make it obvious which branch contains the commit :(
I've no time to file a bug for that against hub...

Anyway, I'm assuming 8d65c97 is in 1.7.
Do we need to port in 1.8 as well ?

@qgib
Copy link
Contributor Author

qgib commented Jan 12, 2012

Author Name: Sandro Santilli (@strk)


Done in 1.7 branch and master (2.0).
Still needs to be taken care of in 1.8 branch.


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Jan 12, 2012

Author Name: Jürgen Fischer (@jef-n)


Sandro Santilli wrote:

Fixed in changeset "8d65c9728065d5b34b4e8c0418ad7767ea6f514e".

FTR I changed the commit message to contain "fixes #14630".

@qgib
Copy link
Contributor Author

qgib commented Jan 12, 2012

Author Name: Sandro Santilli (@strk)


@jef: great, thanks !

@tim: I've been told you're the one taking care of backports to 1.8 :)


  • assigned_to_id was configured as Tim Sutton

@qgib
Copy link
Contributor Author

qgib commented Apr 9, 2012

Author Name: Giuseppe Sucameli (@brushtyler)


The fix seems already present in branch 1.8.


  • resolution was changed from to fixed
  • status_id was changed from Reopened to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Data Provider Related to specific vector, raster or mesh data providers labels May 24, 2019
@qgib qgib added this to the Version 1.7.4 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers High Priority
Projects
None yet
Development

No branches or pull requests

1 participant