Skip to content
Permalink
Browse files

[Geometry checker] Simplify code

  • Loading branch information
manisandro committed Jun 27, 2017
1 parent b9966aa commit b5208c04df17921fa75a53e432ac2cea266f080b
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp
@@ -25,13 +25,10 @@ void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError *> &err
QList<QString> layerIds = featureIds.keys();
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeatureA : layerFeaturesA )
{
// Don't check already checked layers
layerIds.removeOne( layerFeatureA.layer().id() );

QgsRectangle bboxA = layerFeatureA.geometry()->boundingBox();
QSharedPointer<QgsGeometryEngine> geomEngineA = QgsGeometryCheckerUtils::createGeomEngine( layerFeatureA.geometry(), mContext->tolerance );

QgsGeometryCheckerUtils::LayerFeatures layerFeaturesB( mContext->featurePools, QList<QString>() << layerFeatureA.layer().id() << layerIds, bboxA, mCompatibleGeometryTypes );
QgsGeometryCheckerUtils::LayerFeatures layerFeaturesB( mContext->featurePools, layerIds, bboxA, mCompatibleGeometryTypes );
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeatureB : layerFeaturesB )
{
// > : only report overlaps within same layer once
@@ -62,6 +59,8 @@ void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError *> &err
delete interGeom;
}
}
// Don't check already checked layers
layerIds.removeOne( layerFeatureA.layer().id() );
}
}

0 comments on commit b5208c0

Please sign in to comment.
You can’t perform that action at this time.