QGIS/python/core/qgsmaptopixelgeometrysimplifier.sip
Nyall Dawson 881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00

45 lines
1.7 KiB
Plaintext

class QgsMapToPixelSimplifier : QgsAbstractGeometrySimplifier
{
%TypeHeaderCode
#include "qgsmaptopixelgeometrysimplifier.h"
%End
public:
QgsMapToPixelSimplifier( int simplifyFlags, double tolerance );
virtual ~QgsMapToPixelSimplifier();
//! Applicable simplification flags
enum SimplifyFlag
{
NoFlags = 0, //!< No simplification can be applied
SimplifyGeometry = 1, //!< The geometries can be simplified using the current map2pixel context state
SimplifyEnvelope = 2, //!< The geometries can be fully simplified by its BoundingBox
};
protected:
//! Returns the squared 2D-distance of the vector defined by the two points specified
static float calculateLengthSquared2D( double x1, double y1, double x2, double y2 );
public:
int simplifyFlags() const;
void setSimplifyFlags( int simplifyFlags );
//! Returns a simplified version the specified geometry
virtual QgsGeometry* simplify( QgsGeometry* geometry ) const;
//! Simplifies the specified geometry
virtual bool simplifyGeometry( QgsGeometry* geometry ) const;
// MapToPixel simplification helper methods
public:
//! Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context
static bool isGeneralizableByMapBoundingBox( const QgsRectangle& envelope, double map2pixelTol );
//! Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context
bool isGeneralizableByMapBoundingBox( const QgsRectangle& envelope ) const;
//! Simplifies the geometry when is applied the specified map2pixel context
static bool simplifyGeometry( QgsGeometry* geometry, int simplifyFlags, double tolerance );
};