net.refractions.udig.tools.edit.commands
Class SplitFeatureCommand

java.lang.Object
  extended by AbstractCommand
      extended by net.refractions.udig.tools.edit.commands.SplitFeatureCommand

public class SplitFeatureCommand
extends AbstractCommand

This command splits all the geometries in the Editblackboard based on the Current Shape ([@link net.refractions.udig.tools.edit.EditToolHandler#getCurrentShape()})

Since:
1.1.0
Author:
jones

Constructor Summary
SplitFeatureCommand(EditToolHandler handler, EditState endState)
           
 
Method Summary
 java.lang.String getName()
           
 void rollback(IProgressMonitor monitor)
           
 void run(IProgressMonitor monitor)
           
static java.util.List<EditGeom> splitGeom(java.util.List<EditGeom> toSplit, PrimitiveShape splitter, int edgeIndex)
          Splits a Polygon against a line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitFeatureCommand

public SplitFeatureCommand(EditToolHandler handler,
                           EditState endState)
Parameters:
handler -
Method Detail

run

public void run(IProgressMonitor monitor)
         throws java.lang.Exception
Throws:
java.lang.Exception

splitGeom

public static java.util.List<EditGeom> splitGeom(java.util.List<EditGeom> toSplit,
                                                 PrimitiveShape splitter,
                                                 int edgeIndex)
Splits a Polygon against a line. The created geometries are added to the edit blackboard.

Parameters:
toSplit - geom to split
splitter - shape to use to determine the split.
Returns:

rollback

public void rollback(IProgressMonitor monitor)
              throws java.lang.Exception
Throws:
java.lang.Exception

getName

public java.lang.String getName()