Revision 28990
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Circle.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
26 |
*/ |
|
27 |
|
|
1 | 28 |
package org.gvsig.fmap.geom.primitive; |
2 | 29 |
|
3 |
|
|
30 |
/** |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_Circle specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* Same as Arc, but closed to form a full circle. The "start" and "end" points are equal. |
|
35 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
36 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
37 |
*/ |
|
4 | 38 |
public interface Circle extends Surface { |
5 |
//public final static int CODE = TYPES.CIRCLE; |
|
6 | 39 |
|
40 |
/** |
|
41 |
* Sets the two values to define a circle. |
|
42 |
* @param center |
|
43 |
* The center point of the circle. |
|
44 |
* @param radious |
|
45 |
* A point that is used to calculate the radius. |
|
46 |
*/ |
|
7 | 47 |
void setPoints(Point center, Point radious); |
8 | 48 |
|
49 |
/** |
|
50 |
* Sets the two values to define a circle. |
|
51 |
* @param center |
|
52 |
* The center point of the circle. |
|
53 |
* @param radious |
|
54 |
* The radius of the circle. |
|
55 |
*/ |
|
9 | 56 |
void setPoints(Point center, double radious); |
10 | 57 |
|
58 |
/** |
|
59 |
* Sets the values to define a circle from three points. The circle |
|
60 |
* will be inside or the area defined by the three points. |
|
61 |
* @param p1 |
|
62 |
* First point |
|
63 |
* @param p2 |
|
64 |
* Second point |
|
65 |
* @param p3 |
|
66 |
* Third point |
|
67 |
*/ |
|
11 | 68 |
void setPoints(Point p1, Point p2, Point p3); |
12 | 69 |
|
70 |
/** |
|
71 |
* Returns the center of the circle. |
|
72 |
* @return |
|
73 |
* The center of the circle. |
|
74 |
*/ |
|
13 | 75 |
Point getCenter(); |
14 | 76 |
|
77 |
/** |
|
78 |
* Returns the radius of the circle |
|
79 |
* @return |
|
80 |
* The radius of the circle |
|
81 |
*/ |
|
15 | 82 |
double getRadious(); |
16 | 83 |
} |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/PointIterator.java | ||
---|---|---|
50 | 50 |
import java.awt.geom.PathIterator; |
51 | 51 |
import java.awt.geom.Point2D; |
52 | 52 |
|
53 |
import org.gvsig.fmap.geom.Geometry; |
|
53 | 54 |
|
54 |
|
|
55 |
|
|
56 | 55 |
/** |
57 |
* (Sacado de GT2) |
|
56 |
* A iterator to retrieve all the points of a |
|
57 |
* {@link Geometry} |
|
58 | 58 |
* |
59 | 59 |
* @author FJP |
60 | 60 |
*/ |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Arc.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
26 |
*/ |
|
27 |
|
|
1 | 28 |
package org.gvsig.fmap.geom.primitive; |
2 | 29 |
|
3 |
|
|
30 |
/** |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_Arc specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* A Arc is defined by 3 points, and consists of the arc of the circle determined by the 3 points, |
|
35 |
* starting at the first, passing through the second and terminating at the third. |
|
36 |
* If the 3 points are co-linear, then the arc shall be a 3-point line string, and will |
|
37 |
* not be able to return values for center, radius, start angle and end angle. |
|
38 |
* </p> |
|
39 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
41 |
*/ |
|
4 | 42 |
public interface Arc extends Curve { |
5 | 43 |
|
6 |
void setPoints(Point point1, Point point2, Point point3); |
|
44 |
/** |
|
45 |
* Sets the three points to define an arc. |
|
46 |
* @param midPoint |
|
47 |
* The middle point of an arc. |
|
48 |
* @param startPoint |
|
49 |
* The start point of an arc. |
|
50 |
* @param endPoint |
|
51 |
* The end point of an arc. |
|
52 |
*/ |
|
53 |
void setPoints(Point midPoint, Point startPoint, Point endPoint); |
|
7 | 54 |
|
8 |
void setPoints (Point center, double radius, double initAngle, double angleExt ); |
|
55 |
/** |
|
56 |
* Sets the values to define an arc. |
|
57 |
* @param center |
|
58 |
* The center of the arc. |
|
59 |
* @param radius |
|
60 |
* The radius. |
|
61 |
* @param initAngle |
|
62 |
* The start angle of the arc. |
|
63 |
* @param angleExt |
|
64 |
* The end angle of the arc. |
|
65 |
*/ |
|
66 |
void setPoints (Point center, double radius, double startAngle, double endAngle ); |
|
9 | 67 |
|
68 |
/** |
|
69 |
* Return the first point that has been used to create the arc. |
|
70 |
* @return |
|
71 |
* The first point of the arc. |
|
72 |
*/ |
|
10 | 73 |
Point getInitPoint(); |
11 | 74 |
|
75 |
/** |
|
76 |
* Return the end point that has been used to create the arc. |
|
77 |
* @return |
|
78 |
* The end point of the arc. |
|
79 |
*/ |
|
12 | 80 |
Point getEndPoint(); |
13 | 81 |
|
82 |
/** |
|
83 |
* Return the center point that has been used to create the arc. |
|
84 |
* @return |
|
85 |
* The center point of the arc. |
|
86 |
*/ |
|
14 | 87 |
Point getCenterPoint(); |
15 | 88 |
|
16 | 89 |
|
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/FShape.java | ||
---|---|---|
1 |
package org.gvsig.fmap.geom.primitive; |
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 |
*/ |
|
2 | 22 |
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
26 |
*/ |
|
3 | 27 |
|
28 |
package org.gvsig.fmap.geom.primitive; |
|
29 |
|
|
4 | 30 |
import java.awt.Shape; |
5 | 31 |
import java.awt.geom.AffineTransform; |
6 | 32 |
import java.io.Serializable; |
... | ... | |
8 | 34 |
import org.cresques.cts.ICoordTrans; |
9 | 35 |
import org.gvsig.fmap.geom.handler.Handler; |
10 | 36 |
|
11 |
|
|
12 |
|
|
13 | 37 |
/** |
14 | 38 |
* <p>The interface <code>FShape</code> extends <code>Shape</code> adding shape types, and allowing |
15 | 39 |
* to work with it as a geometry.</p> |
... | ... | |
18 | 42 |
*/ |
19 | 43 |
public interface FShape extends Shape, Serializable { |
20 | 44 |
/** |
21 |
* Unknown or not defined type. |
|
22 |
*/ |
|
23 |
public final static int NULL = 0; |
|
24 |
/** |
|
25 |
* A geometric element that has zero dimensions and a location determinable by an ordered set |
|
26 |
* of coordinates |
|
27 |
*/ |
|
28 |
public final static int POINT = 1; |
|
29 |
/** |
|
30 |
* A straight or curved geometric element that is generated by a moving point and that has extension |
|
31 |
* only along the path of the point. |
|
32 |
*/ |
|
33 |
public final static int LINE = 2; |
|
34 |
/** |
|
35 |
* A closed plane figure bounded by straight lines. |
|
36 |
*/ |
|
37 |
public final static int POLYGON = 4; |
|
38 |
/** |
|
39 |
* Solids in 3D |
|
40 |
*/ |
|
41 |
public final static int SOLID = 8; |
|
42 |
/** |
|
43 |
* Words, symbols and form of a written or printed work. |
|
44 |
*/ |
|
45 |
public final static int TEXT = 16; |
|
46 |
/** |
|
47 |
* A set that can contain points, lines and polygons. This is usual in <i>CAD</i> layers <i>(dxf, dgn, dwg)</i>. |
|
48 |
*/ |
|
49 |
public final static int MULTI = 32; |
|
50 |
/** |
|
51 |
* A set of points. |
|
52 |
*/ |
|
53 |
public final static int MULTIPOINT = 64; |
|
54 |
/** |
|
55 |
* A set of lines. |
|
56 |
*/ |
|
57 |
public final static int MULTIPOLYLINE = 128; |
|
58 |
/** |
|
59 |
* A set of polygons. |
|
60 |
*/ |
|
61 |
public final static int MULTIPOLYGON = 256; |
|
62 |
/** |
|
63 |
* A set of solids. |
|
64 |
*/ |
|
65 |
public final static int MULTISOLID = 512; |
|
66 |
/** |
|
67 |
* A closed plane curve every point of which is equidistant from a fixed point within the curve. |
|
68 |
*/ |
|
69 |
public final static int CIRCLE = 1024; |
|
70 |
/** |
|
71 |
* A continuous portion (as of a circle or ellipse) of a curved line. |
|
72 |
*/ |
|
73 |
public final static int ARC = 2048; |
|
74 |
/** |
|
75 |
* A closed plane curve generated by a point moving in such a way that the sums of its distances |
|
76 |
* from two fixed points is a constant : a plane section of a right circular cone that is a closed |
|
77 |
* curve. |
|
78 |
*/ |
|
79 |
public final static int ELLIPSE=4096; |
|
80 |
/** |
|
81 |
* Indicates third coordinate. And can be combined with other geometries via the bits enabled. |
|
82 |
*/ |
|
83 |
public final static int Z=8192; |
|
84 |
/** |
|
85 | 45 |
* Gets the geometry type of this shape. |
86 | 46 |
* |
87 | 47 |
* @return int the geometry type of this shape. |
88 | 48 |
*/ |
89 | 49 |
public int getShapeType(); |
90 |
|
|
50 |
|
|
91 | 51 |
/** |
92 | 52 |
* Creates and returns a shape equal and independent of this one. |
93 | 53 |
* |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Primitive.java | ||
---|---|---|
30 | 30 |
import org.gvsig.fmap.geom.Geometry; |
31 | 31 |
|
32 | 32 |
/** |
33 |
* A primitive is an simple and abstract geometry that can not |
|
34 |
* be and aggregate or a composed geometry. |
|
33 |
* <p> |
|
34 |
* This interface is equivalent to the GM_Object specified in |
|
35 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
36 |
* Primitive is the abstract root class of the geometric primitives. |
|
37 |
* Its main purpose is to define the basic "boundary" operation |
|
38 |
* that ties the primitives in each dimension together. |
|
39 |
* </p> |
|
40 |
* <p> |
|
41 |
* A geometric primitive is a geometric object that is not |
|
42 |
* decomposed further into other primitives in the system. |
|
43 |
* This includes curves and surfaces, even though they are |
|
44 |
* composed of curve segments and surface patches, respectively. |
|
45 |
* This composition is a strong aggregation: curve segments and |
|
46 |
* surface patches cannot exist outside the context of a primitive. |
|
47 |
* </p> |
|
48 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
35 | 49 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
36 | 50 |
*/ |
37 | 51 |
public interface Primitive extends Geometry { |
38 |
//public final static int CODE = TYPES.GEOMETRY; |
|
52 |
|
|
39 | 53 |
} |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Envelope.java | ||
---|---|---|
1 |
|
|
2 | 1 |
/* gvSIG. Geographic Information System of the Valencian Government |
3 |
* |
|
4 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
5 |
* of the Valencian Government (CIT) |
|
6 |
*
|
|
7 |
* This program is free software; you can redistribute it and/or |
|
8 |
* modify it under the terms of the GNU General Public License |
|
9 |
* as published by the Free Software Foundation; either version 2 |
|
10 |
* of the License, or (at your option) any later version. |
|
11 |
*
|
|
12 |
* This program is distributed in the hope that it will be useful, |
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 |
* GNU General Public License for more details. |
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License |
|
18 |
* along with this program; if not, write to the Free Software |
|
19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
20 |
* MA 02110-1301, USA. |
|
21 |
*
|
|
22 |
*/ |
|
2 |
*
|
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
|
4 |
* of the Valencian Government (CIT)
|
|
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 |
*/
|
|
23 | 22 |
|
24 | 23 |
/* |
25 |
* AUTHORS (In addition to CIT): |
|
26 |
* ${year} IVER T.I. S.A. {{Task}}
|
|
27 |
*/ |
|
24 |
* AUTHORS (In addition to CIT):
|
|
25 |
* 2009 {Iver T.I.} {Task}
|
|
26 |
*/
|
|
28 | 27 |
|
29 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
30 |
* |
|
31 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
32 |
* of the Valencian Government (CIT) |
|
33 |
* |
|
34 |
* This program is free software; you can redistribute it and/or |
|
35 |
* modify it under the terms of the GNU General Public License |
|
36 |
* as published by the Free Software Foundation; either version 2 |
|
37 |
* of the License, or (at your option) any later version. |
|
38 |
* |
|
39 |
* This program is distributed in the hope that it will be useful, |
|
40 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
41 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
42 |
* GNU General Public License for more details. |
|
43 |
* |
|
44 |
* You should have received a copy of the GNU General Public License |
|
45 |
* along with this program; if not, write to the Free Software |
|
46 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
47 |
* MA 02110-1301, USA. |
|
48 |
* |
|
49 |
*/ |
|
50 |
/* |
|
51 |
* AUTHORS (In addition to CIT): |
|
52 |
* ${year} IVER T.I. S.A. {{Task}} |
|
53 |
*/ |
|
54 | 28 |
package org.gvsig.fmap.geom.primitive; |
55 | 29 |
|
56 | 30 |
import org.cresques.cts.ICoordTrans; |
57 | 31 |
import org.gvsig.fmap.geom.Geometry; |
58 | 32 |
|
59 |
|
|
60 |
|
|
61 | 33 |
/** |
34 |
* <p> |
|
35 |
* This interface is equivalent to the GM_Envelope specified in |
|
36 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
62 | 37 |
* A minimum bounding box or rectangle. Regardless of dimension, an Envelope |
63 | 38 |
* can be represented without ambiguity as two direct positions (coordinate |
64 | 39 |
* points). To encode an Envelope, it is sufficient to encode these two |
65 | 40 |
* points. This is consistent with all of the data types in this |
66 | 41 |
* specification, their state is represented by their publicly accessible |
67 | 42 |
* attributes. |
43 |
* </p> |
|
44 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
45 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
68 | 46 |
*/ |
69 | 47 |
public interface Envelope { |
70 | 48 |
/** |
71 | 49 |
* Returns the center ordinate along the specified dimension. |
72 |
* |
|
73 |
* @param dimension DOCUMENT ME!
|
|
74 |
* |
|
75 |
* @return DOCUMENT ME!
|
|
50 |
* @param dimension.
|
|
51 |
* The dimension
|
|
52 |
* @return
|
|
53 |
* The value of the ordinate.
|
|
76 | 54 |
*/ |
77 | 55 |
double getCenter(int dimension); |
78 | 56 |
|
79 | 57 |
/** |
80 | 58 |
* The length of coordinate sequence (the number of entries) in this |
81 | 59 |
* envelope. |
82 |
* |
|
83 |
* @return DOCUMENT ME!
|
|
60 |
* @return
|
|
61 |
* The dimension of the envelope.
|
|
84 | 62 |
*/ |
85 | 63 |
int getDimension(); |
86 | 64 |
|
87 | 65 |
/** |
88 | 66 |
* Returns the envelope length along the specified dimension. |
89 |
* |
|
90 | 67 |
* @param dimension |
91 |
* |
|
68 |
* The dimension.
|
|
92 | 69 |
* @return |
70 |
* The envelope length along a dimension. |
|
93 | 71 |
*/ |
94 | 72 |
double getLength(int dimension); |
95 | 73 |
|
96 | 74 |
/** |
97 | 75 |
* A coordinate position consisting of all the minimal ordinates for each |
98 | 76 |
* dimension for all points within the Envelope. |
99 |
* |
|
100 | 77 |
* @return |
78 |
* The lower corner. |
|
101 | 79 |
*/ |
102 | 80 |
Point getLowerCorner(); |
103 | 81 |
|
82 |
/** |
|
83 |
* Sets the coordinate position consisting of all the minimal ordinates for each |
|
84 |
* dimension for all points within the Envelope. |
|
85 |
* @param point |
|
86 |
* The lower corner. |
|
87 |
*/ |
|
104 | 88 |
void setLowerCorner(Point point); |
105 | 89 |
|
106 | 90 |
/** |
107 | 91 |
* Returns the maximal ordinate along the specified dimension. |
108 |
* |
|
109 | 92 |
* @param dimension |
110 |
* |
|
93 |
* The dimension.
|
|
111 | 94 |
* @return |
95 |
* The maximum value |
|
112 | 96 |
*/ |
113 | 97 |
double getMaximum(int dimension); |
114 | 98 |
|
115 | 99 |
/** |
116 | 100 |
* Returns the minimal ordinate along the specified dimension. |
117 |
* |
|
118 |
* @param dimension |
|
119 |
* |
|
101 |
* @param dimension |
|
102 |
* The dimension. |
|
120 | 103 |
* @return |
104 |
* The minimum value. |
|
121 | 105 |
*/ |
122 | 106 |
double getMinimum(int dimension); |
123 | 107 |
|
124 | 108 |
/** |
125 | 109 |
* A coordinate position consisting of all the maximal ordinates for each |
126 | 110 |
* dimension for all points within the Envelope. |
127 |
* |
|
128 | 111 |
* @return |
112 |
* The upper corner |
|
129 | 113 |
*/ |
130 | 114 |
Point getUpperCorner(); |
131 | 115 |
|
116 |
/** |
|
117 |
* Sets the coordinate position consisting of all the maximal ordinates for each |
|
118 |
* dimension for all points within the Envelope. |
|
119 |
* @param point |
|
120 |
* The upper corner. |
|
121 |
*/ |
|
132 | 122 |
void setUpperCorner(Point upperCorner); |
133 | 123 |
|
134 |
void add(Envelope boundsShp); |
|
124 |
/** |
|
125 |
* Adds a envelope to the current envelope. |
|
126 |
* @param envelope |
|
127 |
* The envelope to add. |
|
128 |
*/ |
|
129 |
void add(Envelope envelope); |
|
135 | 130 |
|
131 |
/** |
|
132 |
* This method exists by historical reasons. It return the same |
|
133 |
* instance of the Envelope. |
|
134 |
* @deprecated |
|
135 |
* @return |
|
136 |
* The envelope. |
|
137 |
*/ |
|
136 | 138 |
Geometry getGeometry(); |
137 | 139 |
|
140 |
/** |
|
141 |
* Returns <code>true</code> if the new envelope is contained in the |
|
142 |
* current envelope. |
|
143 |
* @param envelope |
|
144 |
* The envelope to compare. |
|
145 |
* @return |
|
146 |
* If the current envelope contains the new envelope |
|
147 |
*/ |
|
138 | 148 |
boolean contains(Envelope envelope); |
139 | 149 |
|
150 |
/** |
|
151 |
* Returns <code>true</code> if the new envelope intersects with the |
|
152 |
* current envelope. |
|
153 |
* @param envelope |
|
154 |
* The envelope to compare. |
|
155 |
* @return |
|
156 |
* If the current envelope intersects with the new envelope |
|
157 |
*/ |
|
140 | 158 |
boolean intersects(Envelope envelope); |
141 | 159 |
|
160 |
/** |
|
161 |
* Converts the envelope to other coordinate reference system |
|
162 |
* @param trans |
|
163 |
* The CRS conversor |
|
164 |
* @return |
|
165 |
* A new envelope in other CRS |
|
166 |
*/ |
|
142 | 167 |
Envelope convert(ICoordTrans trans); |
143 | 168 |
} |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/OrientablePrimitive.java | ||
---|---|---|
1 |
package org.gvsig.fmap.geom.primitive; |
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
6 | 2 |
* |
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
9 | 6 |
* This program is free software; you can redistribute it and/or |
10 | 7 |
* modify it under the terms of the GNU General Public License |
11 | 8 |
* as published by the Free Software Foundation; either version 2 |
12 | 9 |
* of the License, or (at your option) any later version. |
13 |
* |
|
10 |
*
|
|
14 | 11 |
* This program is distributed in the hope that it will be useful, |
15 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | 14 |
* GNU General Public License for more details. |
18 |
* |
|
15 |
*
|
|
19 | 16 |
* You should have received a copy of the GNU General Public License |
20 | 17 |
* along with this program; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
44 | 21 |
*/ |
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: OrientablePrimitive.java,v 1.1 2008/03/12 08:46:20 cvs Exp $ |
|
48 |
* $Log: OrientablePrimitive.java,v $ |
|
49 |
* Revision 1.1 2008/03/12 08:46:20 cvs |
|
50 |
* *** empty log message *** |
|
51 |
* |
|
52 |
* |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
53 | 26 |
*/ |
27 |
|
|
28 |
package org.gvsig.fmap.geom.primitive; |
|
29 |
|
|
54 | 30 |
/** |
55 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_OrientablePrimitive specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* Orientable primitives are those that can be mirrored into new |
|
35 |
* geometric objects in terms of their internal local coordinate |
|
36 |
* systems (manifold charts). |
|
37 |
* </p> |
|
38 |
* <p> |
|
39 |
* For curves, the orientation reflects the direction in which the curve is traversed, |
|
40 |
* that is, the sense of its parameterization. When used as boundary curves, |
|
41 |
* the surface being bounded is to the "left" of the oriented curve. |
|
42 |
* </p> |
|
43 |
* <p> |
|
44 |
* For surfaces, the orientation reflects from which direction the local coordinate |
|
45 |
* system can be viewed as right handed, the "top" or the surface being the direction |
|
46 |
* of a completing z-axis that would form a right-handed system. |
|
47 |
* </p> |
|
48 |
* <p> |
|
49 |
* When used as a boundary surface, the bounded solid is "below" the surface. |
|
50 |
* The orientation of points and solids has no immediate geometric interpretation |
|
51 |
* in 3-dimensional space. |
|
52 |
* </p> |
|
53 |
* <p> OrientablePrimitive objects are essentially references to geometric primitives |
|
54 |
* that carry an "orientation" reversal flag (either "+" or "-") that determines whether |
|
55 |
* this primitive agrees or disagrees with the orientation of the referenced object. |
|
56 |
* </p> |
|
57 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
58 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
56 | 59 |
*/ |
57 | 60 |
public interface OrientablePrimitive extends Primitive { |
58 | 61 |
|
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Curve.java | ||
---|---|---|
1 |
package org.gvsig.fmap.geom.primitive; |
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
7 | 2 |
* |
8 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
9 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
10 | 6 |
* This program is free software; you can redistribute it and/or |
11 | 7 |
* modify it under the terms of the GNU General Public License |
12 | 8 |
* as published by the Free Software Foundation; either version 2 |
13 | 9 |
* of the License, or (at your option) any later version. |
14 |
* |
|
10 |
*
|
|
15 | 11 |
* This program is distributed in the hope that it will be useful, |
16 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | 14 |
* GNU General Public License for more details. |
19 |
* |
|
15 |
*
|
|
20 | 16 |
* You should have received a copy of the GNU General Public License |
21 | 17 |
* along with this program; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
23 |
* |
|
24 |
* For more information, contact: |
|
25 |
* |
|
26 |
* Generalitat Valenciana |
|
27 |
* Conselleria d'Infraestructures i Transport |
|
28 |
* Av. Blasco Ib??ez, 50 |
|
29 |
* 46010 VALENCIA |
|
30 |
* SPAIN |
|
31 |
* |
|
32 |
* +34 963862235 |
|
33 |
* gvsig@gva.es |
|
34 |
* www.gvsig.gva.es |
|
35 |
* |
|
36 |
* or |
|
37 |
* |
|
38 |
* IVER T.I. S.A |
|
39 |
* Salamanca 50 |
|
40 |
* 46005 Valencia |
|
41 |
* Spain |
|
42 |
* |
|
43 |
* +34 963163400 |
|
44 |
* dac@iver.es |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
45 | 21 |
*/ |
46 |
/* CVS MESSAGES: |
|
47 |
* |
|
48 |
* $Id: Curve.java,v 1.1 2008/03/12 08:46:20 cvs Exp $ |
|
49 |
* $Log: Curve.java,v $ |
|
50 |
* Revision 1.1 2008/03/12 08:46:20 cvs |
|
51 |
* *** empty log message *** |
|
52 |
* |
|
53 |
* |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
54 | 26 |
*/ |
27 |
|
|
28 |
package org.gvsig.fmap.geom.primitive; |
|
29 |
|
|
55 | 30 |
/** |
56 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_Curve and the GM_CurveSegment specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* Curve is a descendent subtype of {@link Primitive} through {@link OrientablePrimitive}. |
|
35 |
* It is the basis for 1-dimensional geometry. |
|
36 |
* </p> |
|
37 |
* <p> |
|
38 |
* A curve is a continuous image of an open interval |
|
39 |
* and so could be written as a parameterized function such as c(t):(a, b) -> E^n where "t" is a real |
|
40 |
* parameter and E^n is Euclidean space of dimension n (usually 2 or 3, as determined by |
|
41 |
* the coordinate reference system). Any other parameterization that results in the same image curve, |
|
42 |
* traced in the same direction, such as any linear shifts and positive scales such as |
|
43 |
* e(t) = c(a + t(b-a)):(0,1) -> E^n, is an equivalent representation of the same curve. |
|
44 |
* </p> |
|
45 |
* <p> |
|
46 |
* Curves are continuous, connected, and have a measurable length in terms of |
|
47 |
* the coordinate system. The orientation of the curve is determined by this |
|
48 |
* parameterization, and is consistent with the tangent function, which |
|
49 |
* approximates the derivative function of the parameterization and shall |
|
50 |
* always point in the "forward" direction. The parameterization of the reversal of |
|
51 |
* the curve defined by c(t):(a, b) -> E^n would be defined by a function of the |
|
52 |
* form s(t) = c(a + b - t):(a, b) - >E^n. |
|
53 |
* </p> |
|
54 |
* <p> |
|
55 |
* In the ISO model a curve is composed of one or more curve segments. |
|
56 |
* In gvSIG a curve is not composed by curve segments: a curve is |
|
57 |
* one and only one curve segment. |
|
58 |
* </p> |
|
59 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
60 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
57 | 61 |
*/ |
58 | 62 |
public interface Curve extends OrientableCurve{ |
59 | 63 |
|
64 |
/** |
|
65 |
* Sets all the coordinates of the curve |
|
66 |
* @param generalPathX |
|
67 |
* The generalPath that contains all the coordinates |
|
68 |
*/ |
|
60 | 69 |
public void setGeneralPath(GeneralPathX generalPathX); |
61 | 70 |
|
62 |
public void setPoints(Point startPoint, Point endPoint); |
|
71 |
/** |
|
72 |
* Sets the initial point and the end point of the curve. On this case, |
|
73 |
* the curve is a single line |
|
74 |
* @param initialPoint |
|
75 |
* The initial point |
|
76 |
* @param endPoint |
|
77 |
* The end point |
|
78 |
*/ |
|
79 |
public void setPoints(Point initialPoint, Point endPoint); |
|
63 | 80 |
|
81 |
/** |
|
82 |
* Gets the one of the values of a coordinate (direct position) |
|
83 |
* in a concrete dimension |
|
84 |
* @param index |
|
85 |
* The index of the direct position to set |
|
86 |
* @param dimension |
|
87 |
* The dimension of the direct position |
|
88 |
* @return |
|
89 |
* The value of the coordinate |
|
90 |
*/ |
|
64 | 91 |
public double getCoordinateAt(int index, int dimension); |
65 | 92 |
|
93 |
/** |
|
94 |
* Sets the value of a coordinate (direct position) in a concrete dimension |
|
95 |
* @param index |
|
96 |
* The index of the direct position to set |
|
97 |
* @param dimension |
|
98 |
* The dimension of the direct position |
|
99 |
* @param value |
|
100 |
* The value to set |
|
101 |
*/ |
|
66 | 102 |
public void setCoordinateAt(int index, int dimension, double value); |
67 | 103 |
|
104 |
/** |
|
105 |
* Adds a vertex (or direct position) to the curve |
|
106 |
* @param point |
|
107 |
* The new point to add |
|
108 |
*/ |
|
68 | 109 |
public void addVertex(Point point); |
69 | 110 |
|
111 |
/** |
|
112 |
* Remove a vertex (direct position) to the curve |
|
113 |
* @param index |
|
114 |
* The index of the vertex to remove |
|
115 |
*/ |
|
70 | 116 |
public void removeVertex(int index); |
71 | 117 |
|
118 |
/** |
|
119 |
* Gets a vertex (direct position) |
|
120 |
* @param index |
|
121 |
* The index of the vertex to get |
|
122 |
* @return |
|
123 |
* One point |
|
124 |
*/ |
|
72 | 125 |
public Point getVertex(int index); |
73 | 126 |
|
127 |
/** |
|
128 |
* Gets the number of vertices (direct positions) of the curve |
|
129 |
* @return |
|
130 |
* The number of vertices |
|
131 |
*/ |
|
74 | 132 |
public int getNumVertices(); |
75 | 133 |
|
134 |
/** |
|
135 |
* Inserts a vertex (direct position) to the curve |
|
136 |
* @param index |
|
137 |
* The index of the vertex where the new point has to be added |
|
138 |
* @param p |
|
139 |
* The vertex to add |
|
140 |
*/ |
|
76 | 141 |
public void insertVertex(int index, Point p); |
77 | 142 |
} |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/NullGeometry.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.fmap.geom.primitive; |
29 | 29 |
/** |
30 |
* This interface is used to represent the null geometry, that means |
|
31 |
* a geometry that has been not set yet. |
|
30 | 32 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
31 | 33 |
*/ |
32 | 34 |
public interface NullGeometry extends Primitive{ |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Surface.java | ||
---|---|---|
1 |
package org.gvsig.fmap.geom.primitive; |
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
6 | 2 |
* |
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
9 | 6 |
* This program is free software; you can redistribute it and/or |
10 | 7 |
* modify it under the terms of the GNU General Public License |
11 | 8 |
* as published by the Free Software Foundation; either version 2 |
12 | 9 |
* of the License, or (at your option) any later version. |
13 |
* |
|
10 |
*
|
|
14 | 11 |
* This program is distributed in the hope that it will be useful, |
15 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | 14 |
* GNU General Public License for more details. |
18 |
* |
|
15 |
*
|
|
19 | 16 |
* You should have received a copy of the GNU General Public License |
20 | 17 |
* along with this program; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
44 | 21 |
*/ |
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: Surface.java,v 1.1 2008/03/12 08:46:20 cvs Exp $ |
|
48 |
* $Log: Surface.java,v $ |
|
49 |
* Revision 1.1 2008/03/12 08:46:20 cvs |
|
50 |
* *** empty log message *** |
|
51 |
* |
|
52 |
* |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
53 | 26 |
*/ |
27 |
|
|
28 |
package org.gvsig.fmap.geom.primitive; |
|
29 |
|
|
54 | 30 |
/** |
55 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_Surface specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* Surface is a subclass of {@link Primitive} and is the basis for 2-dimensional geometry. |
|
35 |
* Unorientable surfaces such as the M?bius band are not allowed. |
|
36 |
* <p/> |
|
37 |
* <p> |
|
38 |
* The orientation of a surface chooses an "up" direction through the choice of the upward normal, |
|
39 |
* which, if the surface is not a cycle, is the side of the surface from which the exterior boundary |
|
40 |
* appears counterclockwise. Reversal of the surface orientation reverses the curve orientation of |
|
41 |
* each boundary component, and interchanges the conceptual "up" and "down" direction of the surface. |
|
42 |
* </p> |
|
43 |
* <p> |
|
44 |
* If the surface is the boundary of a solid, the "up" direction is usually outward. |
|
45 |
* For closed surfaces, which have no boundary, the up direction is that of the surface patches, |
|
46 |
* which must be consistent with one another. |
|
47 |
* </p> |
|
48 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
49 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
56 | 50 |
*/ |
57 | 51 |
public interface Surface extends OrientableSurface { |
58 |
|
|
52 |
|
|
53 |
/** |
|
54 |
* Sets all the coordinates of the surface. |
|
55 |
* @param generalPathX |
|
56 |
* The generalPath that contains all the coordinates. |
|
57 |
*/ |
|
59 | 58 |
public void setGeneralPath(GeneralPathX generalPathX); |
60 | 59 |
|
60 |
/** |
|
61 |
* Gets the one of the values of a coordinate (direct position) |
|
62 |
* in a concrete dimension. |
|
63 |
* @param index |
|
64 |
* The index of the direct position to set. |
|
65 |
* @param dimension |
|
66 |
* The dimension of the direct position. |
|
67 |
* @return |
|
68 |
* The value of the coordinate |
|
69 |
*/ |
|
61 | 70 |
public double getCoordinateAt(int index, int dimension); |
62 | 71 |
|
72 |
/** |
|
73 |
* Sets the value of a coordinate (direct position) in a concrete dimension. |
|
74 |
* @param index |
|
75 |
* The index of the direct position to set. |
|
76 |
* @param dimension |
|
77 |
* The dimension of the direct position. |
|
78 |
* @param value |
|
79 |
* The value to set |
|
80 |
*/ |
|
63 | 81 |
public void setCoordinateAt(int index, int dimension, double value); |
64 | 82 |
|
83 |
/** |
|
84 |
* Adds a vertex (or direct position) to the curve. |
|
85 |
* @param point |
|
86 |
* The new point to add. |
|
87 |
*/ |
|
65 | 88 |
public void addVertex(Point point); |
66 | 89 |
|
90 |
/** |
|
91 |
* Remove a vertex (direct position) to the curve. |
|
92 |
* @param index |
|
93 |
* The index of the vertex to remove. |
|
94 |
*/ |
|
67 | 95 |
public void removeVertex(int index); |
68 | 96 |
|
97 |
/** Gets a vertex (direct position). |
|
98 |
* @param index |
|
99 |
* The index of the vertex to get. |
|
100 |
* @return |
|
101 |
* One point. |
|
102 |
*/ |
|
69 | 103 |
public Point getVertex(int index); |
70 | 104 |
|
105 |
/** |
|
106 |
* Gets the number of vertices (direct positions) of the curve. |
|
107 |
* @return |
|
108 |
* The number of vertices. |
|
109 |
*/ |
|
71 | 110 |
public int getNumVertices(); |
72 | 111 |
|
112 |
/** |
|
113 |
* Inserts a vertex (direct position) to the curve. |
|
114 |
* @param index |
|
115 |
* The index of the vertex where the new point has to be added. |
|
116 |
* @param p |
|
117 |
* The vertex to add. |
|
118 |
*/ |
|
73 | 119 |
public void insertVertex(int index, Point p); |
74 | 120 |
} |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/OrientableCurve.java | ||
---|---|---|
1 |
package org.gvsig.fmap.geom.primitive; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
3 | 2 |
* |
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
5 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
* |
|
10 |
*
|
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
* |
|
15 |
*
|
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
41 | 21 |
*/ |
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: OrientableCurve.java,v 1.1 2008/03/12 08:46:20 cvs Exp $ |
|
45 |
* $Log: OrientableCurve.java,v $ |
|
46 |
* Revision 1.1 2008/03/12 08:46:20 cvs |
|
47 |
* *** empty log message *** |
|
48 |
* |
|
49 |
* |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
50 | 26 |
*/ |
27 |
|
|
28 |
package org.gvsig.fmap.geom.primitive; |
|
29 |
|
|
51 | 30 |
/** |
52 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_OrientableCurve specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* OrientableCurve consists of a curve and an orientation inherited from |
|
35 |
* {@link OrientablePrimitive}. |
|
36 |
* </p> |
|
37 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
38 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
53 | 39 |
*/ |
54 | 40 |
public interface OrientableCurve extends OrientablePrimitive{ |
55 | 41 |
|
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Point.java | ||
---|---|---|
30 | 30 |
import org.gvsig.fmap.geom.DirectPosition; |
31 | 31 |
|
32 | 32 |
/** |
33 |
* <p> |
|
34 |
* This interface is equivalent to the GM_Point specified in |
|
35 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
36 |
* It is the basic data type for a geometric object consisting |
|
37 |
* of one and only one point. |
|
38 |
* </p> |
|
39 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
33 | 40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
34 | 41 |
*/ |
35 | 42 |
public interface Point extends Primitive { |
36 |
//public final static int CODE = TYPES.POINT; |
|
37 | 43 |
|
44 |
/** |
|
45 |
* Gets the {@link DirectPosition of a point}, that is |
|
46 |
* composed by a set of ordinates |
|
47 |
* @return |
|
48 |
* The direct position |
|
49 |
*/ |
|
38 | 50 |
public DirectPosition getDirectPosition(); |
39 | 51 |
|
52 |
/** |
|
53 |
* Sets a ordinate in a concrete dimension |
|
54 |
* @param dimension |
|
55 |
* The dimension to set |
|
56 |
* @param value |
|
57 |
* The value to set |
|
58 |
*/ |
|
40 | 59 |
void setCoordinateAt(int dimension, double value); |
41 | 60 |
|
61 |
/** |
|
62 |
* Sets the point coordinates |
|
63 |
* @param values |
|
64 |
* The coordinates to set |
|
65 |
*/ |
|
42 | 66 |
void setCoordinates(double[] values); |
43 | 67 |
|
68 |
/** |
|
69 |
* Sets the X coordinate |
|
70 |
* @param x |
|
71 |
* The value to set |
|
72 |
*/ |
|
44 | 73 |
void setX(double x); |
45 | 74 |
|
75 |
/** |
|
76 |
* Sets the Y coordinate |
|
77 |
* @param y |
|
78 |
* The value to set |
|
79 |
*/ |
|
46 | 80 |
void setY(double y); |
47 | 81 |
|
82 |
/** |
|
83 |
* Gets the coordinate in a concrete dimension |
|
84 |
* @param dimension |
|
85 |
* The ordinate dimension |
|
86 |
* @return |
|
87 |
* The value of the ordinate |
|
88 |
*/ |
|
48 | 89 |
double getCoordinateAt(int dimension); |
49 | 90 |
|
91 |
/** |
|
92 |
* Returns an array of coordinates |
|
93 |
* @return |
|
94 |
* The point coordinates |
|
95 |
*/ |
|
50 | 96 |
double[] getCoordinates(); |
51 | 97 |
|
98 |
/** |
|
99 |
* Returns the X coordinate |
|
100 |
* @return |
|
101 |
* The X coordinate |
|
102 |
*/ |
|
52 | 103 |
double getX(); |
53 | 104 |
|
105 |
/** |
|
106 |
* Returns the Y coordinate |
|
107 |
* @return |
|
108 |
* The Y coordinate |
|
109 |
*/ |
|
54 | 110 |
double getY(); |
55 | 111 |
|
56 | 112 |
} |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/EllipticArc.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.fmap.geom.primitive; |
29 | 29 |
|
30 |
import java.awt.geom.Point2D; |
|
31 | 30 |
|
32 |
|
|
33 | 31 |
/** |
34 | 32 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
35 | 33 |
*/ |
36 | 34 |
public interface EllipticArc extends Surface{ |
37 | 35 |
|
36 |
/** |
|
37 |
* Sets the values to define a ellipticArc |
|
38 |
* @param axis1Start |
|
39 |
* The point where the first axis starts. |
|
40 |
* @param axis1End |
|
41 |
* The point where the first axis ends. |
|
42 |
* @param semiAxis2Dist |
|
43 |
* @param angSt |
|
44 |
* @param angExt |
|
45 |
*/ |
|
38 | 46 |
void setPoints(Point axis1Start, Point axis1End, double semiAxis2Dist, double angSt, double angExt); |
39 | 47 |
|
48 |
/** |
|
49 |
* Returns the point where the first axis starts. |
|
50 |
* @return |
|
51 |
* The point where the first axis starts. |
|
52 |
*/ |
|
40 | 53 |
Point getAxis1Start(); |
41 | 54 |
|
55 |
/** |
|
56 |
* Returns the point where the first axis ends. |
|
57 |
* @return |
|
58 |
* The point where the first axis ends. |
|
59 |
*/ |
|
42 | 60 |
Point getAxis1End(); |
43 | 61 |
|
44 | 62 |
double getAxis2Dist(); |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Ellipse.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
|
31 | 31 |
/** |
32 |
* <p> |
|
33 |
* An ellipse is the finite or bounded case of a conic section, |
|
34 |
* the geometric shape that results from cutting a circular conical |
|
35 |
* or cylindrical surface with an oblique plane (the other two cases being |
|
36 |
* the parabola and the hyperbola). It is also the locus of all points of |
|
37 |
* the plane whose distances to two fixed points add to the same constant. |
|
38 |
* </p> |
|
39 |
* @see <a href="http://en.wikipedia.org/wiki/Ellipse">Full definition from Wikipedia</a> |
|
32 | 40 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
33 | 41 |
*/ |
34 | 42 |
public interface Ellipse extends Surface { |
35 |
//public final static int CODE = TYPES.ELLIPSE; |
|
36 |
|
|
43 |
|
|
44 |
/** |
|
45 |
* Sets the values to define a ellipse. |
|
46 |
* @param axis1Start |
|
47 |
* The point where the first axis starts. |
|
48 |
* @param axis1End |
|
49 |
* The point where the first axis ends. |
|
50 |
* @param axis2Length |
|
51 |
* The length of the second axis. |
|
52 |
*/ |
|
37 | 53 |
void setPoints(Point axis1Start, Point axis1End, double axis2Length); |
38 | 54 |
|
55 |
/** |
|
56 |
* Returns the point where the first axis starts. |
|
57 |
* @return |
|
58 |
* The point where the first axis starts. |
|
59 |
*/ |
|
39 | 60 |
Point getAxis1Start(); |
40 | 61 |
|
62 |
/** |
|
63 |
* Returns the point where the first axis ends. |
|
64 |
* @return |
|
65 |
* The point where the first axis ends. |
|
66 |
*/ |
|
41 | 67 |
Point getAxis1End(); |
42 | 68 |
|
69 |
/** |
|
70 |
* Returns the length of the second axis. |
|
71 |
* @return |
|
72 |
* The length of the second axis. |
|
73 |
*/ |
|
43 | 74 |
double getAxis2Dist(); |
44 | 75 |
} |
45 | 76 |
|
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/OrientableSurface.java | ||
---|---|---|
1 |
package org.gvsig.fmap.geom.primitive; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
3 | 2 |
* |
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
5 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
* |
|
10 |
*
|
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
* |
|
15 |
*
|
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
41 | 21 |
*/ |
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: OrientableSurface.java,v 1.1 2008/03/12 08:46:20 cvs Exp $ |
|
45 |
* $Log: OrientableSurface.java,v $ |
|
46 |
* Revision 1.1 2008/03/12 08:46:20 cvs |
|
47 |
* *** empty log message *** |
|
48 |
* |
|
49 |
* |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {Iver T.I.} {Task} |
|
50 | 26 |
*/ |
27 |
|
|
28 |
package org.gvsig.fmap.geom.primitive; |
|
29 |
|
|
51 | 30 |
/** |
52 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
31 |
* <p> |
|
32 |
* This interface is equivalent to the GM_OrientableSurface specified in |
|
33 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>. |
|
34 |
* OrientableSurface consists of a surface and an orientation inherited from |
|
35 |
* {@link OrientablePrimitive}. |
|
36 |
* </p> |
|
37 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a> |
|
38 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
53 | 39 |
*/ |
54 | 40 |
public interface OrientableSurface extends OrientablePrimitive { |
55 | 41 |
|
Also available in: Unified diff