19bool QgsGeometrySliverPolygonCheck::checkThreshold(
double layerToMapUnits,
const QgsAbstractGeometry *geom,
double &value )
const
21 const double maxArea = mMaxArea / ( layerToMapUnits * layerToMapUnits );
23 const double maxDim = std::max( bb.
width(), bb.
height() );
24 const 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
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.