Skip to content

Commit

Permalink
Changed feature splitting mechanism such that it is possible to gener…
Browse files Browse the repository at this point in the history
…ate several new features with one split

git-svn-id: http://svn.osgeo.org/qgis/trunk@8008 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 20, 2008
1 parent 006f680 commit 4635c89
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 826 deletions.
9 changes: 2 additions & 7 deletions src/app/qgsmaptoolsplitfeatures.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 4635c89

Please sign in to comment.