LCOV - code coverage report
Current view: top level - analysis/vector/geometry_checker - qgsgeometrysliverpolygoncheck.h (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 9 11 81.8 %
Date: 2021-04-10 08:29:14 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /***************************************************************************
       2                 :            :     qgsgeometrysliverpolygoncheck.h
       3                 :            :     ---------------------
       4                 :            :     begin                : September 2015
       5                 :            :     copyright            : (C) 2014 by Sandro Mani / Sourcepole AG
       6                 :            :     email                : smani at sourcepole dot ch
       7                 :            :  ***************************************************************************
       8                 :            :  *                                                                         *
       9                 :            :  *   This program is free software; you can redistribute it and/or modify  *
      10                 :            :  *   it under the terms of the GNU General Public License as published by  *
      11                 :            :  *   the Free Software Foundation; either version 2 of the License, or     *
      12                 :            :  *   (at your option) any later version.                                   *
      13                 :            :  *                                                                         *
      14                 :            :  ***************************************************************************/
      15                 :            : 
      16                 :            : #define SIP_NO_FILE
      17                 :            : 
      18                 :            : #ifndef QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
      19                 :            : #define QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
      20                 :            : 
      21                 :            : #include "qgsgeometryareacheck.h"
      22                 :            : 
      23                 :            : /**
      24                 :            :  * \ingroup analysis
      25                 :            :  * \brief A sliver polygon check.
      26                 :            :  */
      27                 :          1 : class ANALYSIS_EXPORT QgsGeometrySliverPolygonCheck : public QgsGeometryAreaCheck
      28                 :            : {
      29                 :            :   public:
      30                 :          1 :     QgsGeometrySliverPolygonCheck( QgsGeometryCheckContext *context, const QVariantMap &configuration )
      31                 :          1 :       : QgsGeometryAreaCheck( context, configuration )
      32                 :          2 :     {
      33                 :          1 :       mThresholdMapUnits = configurationValue<double>( "threshold" );
      34                 :          1 :       mMaxArea = configurationValue<double>( "maxArea" );
      35                 :          1 :     }
      36                 :          0 :     static QString factoryDescription() { return tr( "Sliver polygon" ); }
      37                 :          0 :     QString description() const override { return factoryDescription(); }
      38                 :          4 :     static QString factoryId() { return QStringLiteral( "QgsGeometrySliverPolygonCheck" ); }
      39                 :          2 :     QString id() const override { return factoryId(); }
      40                 :            : 
      41                 :            :   private:
      42                 :            :     bool checkThreshold( double layerToMapUnits, const QgsAbstractGeometry *geom, double &value ) const override;
      43                 :            : 
      44                 :            :     double mThresholdMapUnits;
      45                 :            :     double mMaxArea;
      46                 :            : 
      47                 :            : };
      48                 :            : 
      49                 :            : #endif // QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H

Generated by: LCOV version 1.14