Package org.locationtech.udig.tools.geometry.trim

Examples of org.locationtech.udig.tools.geometry.trim.TrimGeometryStrategy


                final EditCommandFactory editCommandFactory;
                editCommandFactory = AppGISAdapter.getEditCommandFactory();

                final FeatureIterator<SimpleFeature> iterator = featuresToTrim.features();
                final List<UndoableMapCommand> undoableCommands = new ArrayList<UndoableMapCommand>();
                final TrimGeometryStrategy trimOp = new TrimGeometryStrategy(trimmingLine);
                String fidNotTrimmed = ""; //$NON-NLS-1$
                try {
                    SimpleFeature feature;
                    Geometry original;
                    Geometry trimmed;
                    UndoableMapCommand command;
                    while (iterator.hasNext()) {
                        feature = iterator.next();
                        original = (Geometry) feature.getDefaultGeometry();

                        if (checkTrimPossible(original)) {

                            trimmed = trimOp.trim(original);
                            command = editCommandFactory.createSetGeomteryCommand(feature,selectedLayer, trimmed);
                            undoableCommands.add(command);
                        } else {
                            fidNotTrimmed += feature.getID() + " "; //$NON-NLS-1$
                        }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.tools.geometry.trim.TrimGeometryStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.