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

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8008 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 20, 2008
1 parent 2f8a1d7 commit 414609edf7070a948beba96b0ae656f56f49ada8
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"));
}

mCaptureList.clear();

0 comments on commit 414609e

Please sign in to comment.