Skip to content
Browse files
Changed feature splitting mechanism such that it is possible to gener…
…ate several new features with one split

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 20, 2008
1 parent 006f680 commit 4635c89077650b2111836e1bfb7cfd51427d3c25
Showing with 215 additions and 826 deletions.
  1. +2 −7 src/app/qgsmaptoolsplitfeatures.cpp
  2. +174 −765 src/core/qgsgeometry.cpp
  3. +19 −39 src/core/qgsgeometry.h
  4. +19 −13 src/core/qgsvectorlayer.cpp
  5. +1 −2 src/core/qgsvectorlayer.h
@@ -79,15 +79,10 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent(QMouseEvent * e)
//bring up dialog if a split was not possible (polygon) or only done once (line)
int topologicalEditing = QgsProject::instance()->readNumEntry("Digitizing", "/TopologicalEditing", 0);
int returnCode = vlayer->splitFeatures(mCaptureList, topologicalEditing);
if(returnCode == 1)
if(returnCode != 0)
//several intersections but only one split (most likely line)
QMessageBox::warning(0, tr("Intersection problem"), tr("One or more geometries are intersected several times by the split lines. Those geometries are only split once."));
else if(returnCode == 2)
//too complex intersection (most likely several polygon intersections)
QMessageBox::warning(0, tr("Intersection problem"), tr("One or more geometries cannot be split because the intersection is too complex. Note that polygon splits can only be done if the split line intersects the polygon once. Also inner polygon rings cannot be split"));
QMessageBox::warning(0, tr("Split error"), tr("An error occured during feature splitting"));


0 comments on commit 4635c89

Please sign in to comment.