Skip to content

Commit

Permalink
renderer: also consider support ogc wkb types for 3d (fixes crash aft…
Browse files Browse the repository at this point in the history
…er merging

3d polygons)
  • Loading branch information
jef-n committed Jun 9, 2015
1 parent b14d3eb commit 1959f75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgsrendererv2.cpp
Expand Up @@ -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() )
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1959f75

Please sign in to comment.