@@ -85,18 +85,18 @@ inline static QgsRectangle calculateBoundingBox( QGis::WkbType wkbType, unsigned
85
85
memcpy ( &x, wkb, sizeof ( double ) ); wkb += sizeOfDoubleX;
86
86
memcpy ( &y, wkb, sizeof ( double ) ); wkb += sizeOfDoubleY;
87
87
88
- if (xmin>x ) xmin = x;
89
- if (ymin>y ) ymin = y;
90
- if (xmax<x ) xmax = x;
91
- if (ymax<y ) ymax = y;
88
+ if ( xmin > x ) xmin = x;
89
+ if ( ymin > y ) ymin = y;
90
+ if ( xmax < x ) xmax = x;
91
+ if ( ymax < y ) ymax = y;
92
92
}
93
93
wkb = wkb2;
94
94
95
95
return QgsRectangle ( xmin, ymin, xmax, ymax );
96
96
}
97
97
98
98
// ! Generalize the WKB-geometry using the BBOX of the original geometry
99
- inline static bool generalizeGeometry ( QGis::WkbType wkbType, unsigned char * sourceWkb, size_t sourceWkbSize, unsigned char * targetWkb, size_t & targetWkbSize, const QgsRectangle& envelope, bool writeHeader )
99
+ inline static bool generalizeWkbGeometry ( QGis::WkbType wkbType, unsigned char * sourceWkb, size_t sourceWkbSize, unsigned char * targetWkb, size_t & targetWkbSize, const QgsRectangle& envelope, bool writeHeader )
100
100
{
101
101
unsigned char * wkb2 = targetWkb;
102
102
unsigned int geometryType = QGis::singleType ( QGis::flatType ( wkbType ) );
@@ -180,7 +180,7 @@ bool QgsMapToPixelSimplifier::simplifyWkbGeometry( int simplifyFlags, QGis::WkbT
180
180
// Can replace the geometry by its BBOX ?
181
181
if ( ( simplifyFlags & QgsMapToPixelSimplifier::SimplifyEnvelope ) && (envelope.xMaximum ()-envelope.xMinimum ()) < map2pixelTol && (envelope.yMaximum ()-envelope.yMinimum ()) < map2pixelTol )
182
182
{
183
- canbeGeneralizable = generalizeGeometry ( wkbType, sourceWkb, sourceWkbSize, targetWkb, targetWkbSize, envelope, writeHeader );
183
+ canbeGeneralizable = generalizeWkbGeometry ( wkbType, sourceWkb, sourceWkbSize, targetWkb, targetWkbSize, envelope, writeHeader );
184
184
if (canbeGeneralizable) return true ;
185
185
}
186
186
if (!( simplifyFlags & QgsMapToPixelSimplifier::SimplifyGeometry ) ) canbeGeneralizable = false ;
0 commit comments