36 for (
int i = 0, numPoints = points.
size(); i < numPoints; ++i )
68 unsigned char *wkb =
new unsigned char[ wkbSize ];
69 memcpy( wkb, g->
asWkb(), wkbSize );
70 geometry->
fromWkb( wkb, wkbSize );
A rectangle specified with double values.
void setMinimal()
Set a rectangle so that min corner is at max and max corner is at min.
virtual ~QgsAbstractGeometrySimplifier()
void fromWkb(unsigned char *wkb, int length)
Set the geometry, feeding in the buffer containing OGC Well-Known Binary and the buffer's length...
virtual ~QgsTopologyPreservingSimplifier()
static bool isGeneralizableByDeviceBoundingBox(const QVector< QPointF > &points, float mapToPixelTol=1.0f)
Returns whether the device-geometry can be replaced by its BBOX when is applied the specified toleran...
A geometry is the spatial representation of a feature.
int wkbSize() const
Returns the size of the WKB in asWkb().
virtual QgsGeometry * simplify(QgsGeometry *geometry) const override
Returns a simplified version the specified geometry.
double mTolerance
Distance tolerance for the simplification.
const unsigned char * asWkb() const
Returns the buffer containing this geometry in WKB format.
QgsGeometry * simplify(double tolerance) const
Returns a simplified version of this geometry using a specified tolerance value.
double yMinimum() const
Get the y minimum value (bottom side of rectangle)
double xMaximum() const
Get the x maximum value (right side of rectangle)
void combineExtentWith(const QgsRectangle &rect)
expand the rectangle so that covers both the original rectangle and the given rectangle ...
double xMinimum() const
Get the x minimum value (left side of rectangle)
QgsTopologyPreservingSimplifier(double tolerance)
Implementation of GeometrySimplifier using the Douglas-Peucker algorithm.
virtual bool simplifyGeometry(QgsGeometry *geometry) const override
Simplifies the specified geometry.
double yMaximum() const
Get the y maximum value (top side of rectangle)
static bool isGeneralizableByDeviceBoundingBox(const QgsRectangle &envelope, float mapToPixelTol=1.0f)
Returns whether the device-envelope can be replaced by its BBOX when is applied the specified toleran...