Statistics
| Revision:

gvsig-vectorediting / org.gvsig.vectorediting / trunk / org.gvsig.vectorediting / org.gvsig.vectorediting.lib / org.gvsig.vectorediting.lib.prov / org.gvsig.vectorediting.lib.prov.trimline / src / main / java / org / gvsig / vectorediting / lib / prov / trimline / operation / TrimLineOperation.java @ 344

History | View | Annotate | Download (2.77 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2015 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

    
25
package org.gvsig.vectorediting.lib.prov.trimline.operation;
26

    
27
import org.gvsig.fmap.dal.exception.DataException;
28
import org.gvsig.fmap.dal.feature.FeatureSelection;
29
import org.gvsig.fmap.geom.aggregate.MultiCurve;
30
import org.gvsig.fmap.geom.exception.CreateGeometryException;
31
import org.gvsig.fmap.geom.operation.GeometryOperationException;
32
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
33
import org.gvsig.fmap.geom.primitive.Curve;
34
import org.gvsig.fmap.geom.primitive.Point;
35
import org.gvsig.tools.locator.LocatorException;
36

    
37
/**
38
 * Represents an operation to trim curve.
39
 * 
40
 * @author llmarques
41
 *
42
 */
43
public interface TrimLineOperation {
44

    
45
    /**
46
     * Trim line, taking as cutting edges the boundary objects received as
47
     * parameters.
48
     * 
49
     * Inserted point is the point inserted by user. It is used to determinate
50
     * what segment of curve it must trimmed.
51
     * 
52
     * If curveToBeExtended does not intersect with any geometry, the geometry
53
     * will not be modified.
54
     * 
55
     * @param curveToTrim
56
     *            Curve to trim
57
     * @param insertedPoint
58
     *            Point inserted by user to determinate what side of curve must
59
     *            be extended.
60
     * @param boundaryObjects
61
     *            If curveToBeExtended intersects with some boundary object, it
62
     *            will
63
     *            be extend to it. If there are several boundary objects that
64
     *            intersects with curveToBeExtended, it will be extended to
65
     *            nearest
66
     *            point.
67
     * @return Trimmed line
68
     */
69
    public MultiCurve trimLine(Curve curveToTrim, Point insertedPoint,
70
        FeatureSelection boundaryObjects)
71
        throws GeometryOperationNotSupportedException,
72
        GeometryOperationException, DataException, CreateGeometryException,
73
        LocatorException;
74

    
75
}