Skip to content
Permalink
Browse files

[Geometry checker] Make self intersection fix create a linear polygon…

… if original feature was one
  • Loading branch information
manisandro committed Oct 12, 2015
1 parent 01a7674 commit fdc85bab9ece8e9834fa7481a11a1819edef628d
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp
@@ -6,7 +6,7 @@
***************************************************************************/

#include "qgsgeometryselfintersectioncheck.h"
#include "qgscurvepolygonv2.h"
#include "qgspolygonv2.h"
#include "qgslinestringv2.h"
#include "qgsgeometryengine.h"
#include "qgsmultipolygonv2.h"
@@ -193,7 +193,8 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError* error, i
// If ring is exterior, build two polygons, and reassign interiors as necessary
poly->setExteriorRing( ringGeom1 );

QgsCurvePolygonV2* poly2 = new QgsCurvePolygonV2();
// If original feature was a linear polygon, also create the new part as a linear polygon
QgsCurvePolygonV2* poly2 = dynamic_cast<QgsPolygonV2*>( part ) ? new QgsPolygonV2() : new QgsCurvePolygonV2();
poly2->setExteriorRing( ringGeom2 );

// Reassing interiors as necessary

0 comments on commit fdc85ba

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