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 );
QgsGeometry * simplify(double tolerance) const
Returns a simplified version of this geometry using a specified tolerance value.
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...
double yMaximum() const
Get the y maximum value (top side of rectangle)
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.
virtual QgsGeometry * simplify(QgsGeometry *geometry) const override
Returns a simplified version the specified geometry.
void combineExtentWith(QgsRectangle *rect)
expand the rectangle so that covers both the original rectangle and the given rectangle ...
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.
int wkbSize() const
Returns the size of the WKB in asWkb().
QgsTopologyPreservingSimplifier(double tolerance)
Implementation of GeometrySimplifier using the Douglas-Peucker algorithm.
virtual bool simplifyGeometry(QgsGeometry *geometry) const override
Simplifies the specified geometry.
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...
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)