Bug report #13048
WKT Parser seems to be unable to parse polygons with Z values
|Affected QGIS version:||2.8.2||Regression?:||No|
|Operating System:||windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||21121|
Recently I haven’t been able to insert WKT polygons with Z-values.
I have tried the following in the Python console:
> g = QgsGeometry.fromWkt('Polygon((0 0 0, 0 1 0, 1 1 0, 0 0 0))') > f = QgsFeature() > f.setGeometry(g) > iface.activeLayer().dataProvider().addFeatures([f])
My active layer is a scratch layer configured as Polygon. I get no exceptions and QGIS reports the layer containing 1 feature but nothing is shown. I have altered the above four python lines to only have the X and Y values and this results in a visual result.
Repeating the above using a Point WKT instead works fine with both 2D and 3D data.