Skip to content
Permalink
Browse files

[Geometry checker] Fix incorrect ring index in QgsGeometrySelfInterse…

…ctionCheck::fixError
  • Loading branch information
manisandro committed Oct 17, 2017
1 parent 737d513 commit 5b2297f73c0182d9a5c6539be8df3de49384758e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/vector/geometry_checker/qgsgeometryselfintersectioncheck.cpp
@@ -179,7 +179,7 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError *error, i
if ( dynamic_cast<QgsCurvePolygon *>( part ) )
{
QgsCurvePolygon *poly = static_cast<QgsCurvePolygon *>( part );
// If ring is interior ring, create separate holes
// If self-intersecting ring is an interior ring, create separate holes
if ( vidx.ring > 0 )
{
poly->removeInteriorRing( vidx.ring );
@@ -213,7 +213,7 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError *error, i
// No point in adding ChangeAdded changes, since the entire poly2 is added anyways later on
}
poly->removeInteriorRing( i );
changes[error->layerId()][feature.id()].append( Change( ChangeRing, ChangeRemoved, QgsVertexId( vidx.part, i ) ) );
changes[error->layerId()][feature.id()].append( Change( ChangeRing, ChangeRemoved, QgsVertexId( vidx.part, 1 + i ) ) );
}
}

0 comments on commit 5b2297f

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