38 for (
int i = 0, numPoints = points.size(); i < numPoints; ++i )
43 if ( xmin > x ) xmin = x;
44 if ( ymin > y ) ymin = y;
45 if ( xmax < x ) xmax = x;
46 if ( ymax < y ) ymax = y;
76 unsigned char* wkb = (
unsigned char* )malloc( wkbSize );
77 memcpy( wkb, g->
asWkb(), wkbSize );
78 geometry->
fromWkb( wkb, wkbSize );
A rectangle specified with double values.
virtual ~QgsAbstractGeometrySimplifier()
size_t wkbSize() const
Returns the size of the WKB in asWkb().
double yMaximum() const
Get the y maximum value (top side of rectangle)
virtual ~QgsTopologyPreservingSimplifier()
double ANALYSIS_EXPORT max(double x, double y)
returns the maximum of two doubles or the first argument if both are equal
double yMinimum() const
Get the y minimum value (bottom side of rectangle)
double xMaximum() const
Get the x maximum value (right side of rectangle)
double mTolerance
Distance tolerance for the simplification.
QgsGeometry * simplify(double tolerance)
Returns a simplified version of this geometry using a specified tolerance value.
virtual bool simplifyGeometry(QgsGeometry *geometry) const
Simplifies the specified geometry.
void fromWkb(unsigned char *wkb, size_t length)
Set the geometry, feeding in the buffer containing OGC Well-Known Binary and the buffer's length...
QgsTopologyPreservingSimplifier(double tolerance)
Implementation of GeometrySimplifier using the Douglas-Peucker algorithm.
const unsigned char * asWkb() const
Returns the buffer containing this geometry in WKB format.
double xMinimum() const
Get the x minimum value (left side of rectangle)
static bool canbeGeneralizedByDeviceBoundingBox(const QgsRectangle &envelope, float mapToPixelTol=1.0f)
Returns whether the device-envelope can be replaced by its BBOX when is applied the specified toleran...
virtual QgsGeometry * simplify(QgsGeometry *geometry) const
Returns a simplified version the specified geometry.