gvsig-vectorediting / org.gvsig.vectorediting / trunk / org.gvsig.vectorediting / org.gvsig.vectorediting.lib / org.gvsig.vectorediting.lib.prov / org.gvsig.vectorediting.lib.prov.extendline / src / main / java / org / gvsig / vectorediting / lib / prov / extendline / operation / ExtendLineOperation.java @ 2603
History | View | Annotate | Download (4.02 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.extendline.operation; |
26 |
|
27 |
import org.gvsig.fmap.dal.exception.DataException; |
28 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
29 |
import org.gvsig.fmap.geom.Geometry; |
30 |
import org.gvsig.fmap.geom.GeometryException; |
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 |
|
36 |
/**
|
37 |
* Represents an operation to extend curve.
|
38 |
*
|
39 |
* @author llmarques
|
40 |
*
|
41 |
*/
|
42 |
public interface ExtendLineOperation { |
43 |
|
44 |
/**
|
45 |
* Extend line to boundary objects received as parameters.Inserted point is the point inserted by user.It is used to determinate
|
46 |
what side of curve it must extend.If curveToBeExtended does not intersect with any geometry, the geometry will
|
47 |
not be modified.
|
48 |
*
|
49 |
*
|
50 |
* @param curveToBeExtended
|
51 |
* Curve to be extended.
|
52 |
* @param insertedPoint
|
53 |
* Point inserted by user to determinate what side of curve must
|
54 |
* be extended.
|
55 |
* @param boundaryObjects
|
56 |
* If curveToBeExtended intersects with some boundary object, it will
|
57 |
* be extend to it. If there are several boundary objects that
|
58 |
* intersects with curveToBeExtended, it will be extended to nearest
|
59 |
* point.
|
60 |
* @return extended line.
|
61 |
* @throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
|
62 |
* @throws org.gvsig.fmap.geom.operation.GeometryOperationException
|
63 |
* @throws org.gvsig.fmap.dal.exception.DataException
|
64 |
* @throws org.gvsig.fmap.geom.exception.GeometryException
|
65 |
*/
|
66 |
public Curve extendLine(Curve curveToBeExtended, Point insertedPoint, |
67 |
FeatureSelection boundaryObjects) |
68 |
throws GeometryOperationNotSupportedException,
|
69 |
GeometryOperationException, DataException, GeometryException; |
70 |
|
71 |
/**
|
72 |
* Extend line to boundary objects received as parameters.Inserted point is the point inserted by user.It is used to determinate
|
73 |
what side of curve it must extend.If curveToBeExtended does not intersect with any geometry, the geometry will
|
74 |
not be modified.
|
75 |
*
|
76 |
*
|
77 |
* @param curveToBeExtended
|
78 |
* Curve to be extended.
|
79 |
* @param insertedPoint
|
80 |
* Point inserted by user to determinate what side of curve must
|
81 |
* be extended.
|
82 |
* @param boundaryObject
|
83 |
* If curveToBeExtended intersects with boundary object, it will
|
84 |
* be extend to it.
|
85 |
* @return extended line.
|
86 |
* @throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
|
87 |
* @throws org.gvsig.fmap.geom.operation.GeometryOperationException
|
88 |
* @throws org.gvsig.fmap.dal.exception.DataException
|
89 |
* @throws org.gvsig.fmap.geom.exception.GeometryException
|
90 |
*/
|
91 |
public Curve extendLine(Curve curveToBeExtended, Point insertedPoint, |
92 |
Geometry boundaryObject) |
93 |
throws GeometryOperationNotSupportedException,
|
94 |
GeometryOperationException, DataException, GeometryException; |
95 |
|
96 |
} |