Skip to content
Permalink
Browse files

[Geometry checker] Ensure line layer intersection test does not check…

… a line layer against itself
  • Loading branch information
manisandro committed Sep 28, 2017
1 parent e5e3fde commit 5ded4f8580694251da25f47ce7ec36ca5f370260
@@ -21,6 +21,7 @@
void QgsGeometryLineLayerIntersectionCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &/*messages*/, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
{
QMap<QString, QgsFeatureIds> featureIds = ids.isEmpty() ? allLayerFeatureIds() : ids;
featureIds.remove( mCheckLayer ); // Don't check layer against itself
QgsGeometryCheckerUtils::LayerFeatures layerFeatures( mContext->featurePools, featureIds, mCompatibleGeometryTypes, progressCounter, true );
for ( const QgsGeometryCheckerUtils::LayerFeature &layerFeature : layerFeatures )
{
@@ -38,11 +39,6 @@ void QgsGeometryLineLayerIntersectionCheck::collectErrors( QList<QgsGeometryChec
QgsGeometryCheckerUtils::LayerFeatures checkFeatures( mContext->featurePools, QStringList() << mCheckLayer, line->boundingBox(), {QgsWkbTypes::LineGeometry, QgsWkbTypes::PolygonGeometry} );
for ( const QgsGeometryCheckerUtils::LayerFeature &checkFeature : checkFeatures )
{
if ( checkFeature == layerFeature )
{
// Skip current feature
continue;
}
const QgsAbstractGeometry *testGeom = checkFeature.geometry();
for ( int jPart = 0, mParts = testGeom->partCount(); jPart < mParts; ++jPart )
{

0 comments on commit 5ded4f8

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