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;
Abstract base class for all geometries.
virtual QgsRectangle boundingBox() const =0
Returns the minimal bounding box for the geometry.
virtual double area() const
Returns the planar, 2-dimensional area of the geometry.
A rectangle specified with double values.
double height() const SIP_HOLDGIL
Returns the height of the rectangle.
double width() const SIP_HOLDGIL
Returns the width of the rectangle.