Skip to content
Permalink
Browse files

renderer: also consider support ogc wkb types for 3d (fixes crash aft…

…er merging

3d polygons)
  • Loading branch information
jef-n committed Jun 9, 2015
1 parent b14d3eb commit 1959f751f67f37b8363a279d2b885513c58655df
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/symbology-ng/qgsrendererv2.cpp
@@ -46,7 +46,7 @@ const unsigned char* QgsFeatureRendererV2::_getPoint( QPointF& pt, QgsRenderCont
unsigned int wkbType;
wkbPtr >> wkbType >> pt.rx() >> pt.ry();

if ( wkbType == QGis::WKBPoint25D )
if ( wkbType == QGis::WKBPoint25D || wkbType == QgsWKBTypes::PointZ )
wkbPtr += sizeof( double );

if ( context.coordinateTransform() )
@@ -66,7 +66,7 @@ const unsigned char* QgsFeatureRendererV2::_getLineString( QPolygonF& pts, QgsRe
unsigned int wkbType, nPoints;
wkbPtr >> wkbType >> nPoints;

bool hasZValue = wkbType == QGis::WKBLineString25D;
bool hasZValue = wkbType == QGis::WKBLineString25D || wkbType == QgsWKBTypes::LineStringZ;

double x = 0.0;
double y = 0.0;
@@ -121,7 +121,7 @@ const unsigned char* QgsFeatureRendererV2::_getPolygon( QPolygonF& pts, QList<QP
if ( numRings == 0 ) // sanity check for zero rings in polygon
return wkbPtr;

bool hasZValue = ( wkbType == QGis::WKBPolygon25D );
bool hasZValue = wkbType == QGis::WKBPolygon25D || wkbType == QgsWKBTypes::PolygonZ;

double x, y;
holes.clear();

0 comments on commit 1959f75

Please sign in to comment.
You can’t perform that action at this time.