19 bool QgsGeometrySliverPolygonCheck::checkThreshold(
double layerToMapUnits,
const QgsAbstractGeometry *geom,
double &value )
const 21 double maxArea = mMaxArea / ( layerToMapUnits * layerToMapUnits );
23 double maxDim = std::max( bb.
width(), bb.
height() );
24 double area = geom->
area();
25 value = ( maxDim * maxDim ) / area;
26 if ( maxArea > 0. && area > maxArea )
30 return value > mThresholdMapUnits;
A rectangle specified with double values.
virtual QgsRectangle boundingBox() const =0
Returns the minimal bounding box for the geometry.
double width() const
Returns the width of the rectangle.
virtual double area() const
Returns the area of the geometry.
Abstract base class for all geometries.
double height() const
Returns the height of the rectangle.