Bug report #13053

WKT Parser can't handle multipolygon with spaces

Added by Marco Bernasocchi over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Marco Hugentobler
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21125

Description

Looks like there is an issue is with the new geometry classes - try entering this in the python console:

g=QgsGeometry.fromWkt('MULTIPOLYGON (((62.0 18.0, 62.0 19.0, 63.0 19.0, 63.0 18.0, 62.0 18.0)), ((63.0 19.0, 63.0 20.0, 64.0 20.0, 64.0 19.0, 63.0 19.0)))')

It returns None, so the WKT can't be passed by the new geometry engine.

removing the space like:

g=QgsGeometry.fromWkt('MULTIPOLYGON (((62.0 18.0, 62.0 19.0, 63.0 19.0, 63.0 18.0, 62.0 18.0)),((63.0 19.0, 63.0 20.0, 64.0 20.0, 64.0 19.0, 63.0 19.0)))')

will make it work.

Tested on ubuntu 14.04 and 15.04

Associated revisions

Revision 29aaf1ba
Added by Jürgen Fischer over 9 years ago

skip blanks between wkt child blocks (fixes #13053)

Revision 77e937fc
Added by Jürgen Fischer about 9 years ago

skip blanks between wkt child blocks (fixes #13053)

(cherry-picked from 29aaf1bad8d4ce2bd50391b886ea4116c03cf100)

History

#1 Updated by Marco Bernasocchi over 9 years ago

it is a regression, in 2.8 all works fine

#2 Updated by Jürgen Fischer over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF