Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / primitive / OrientablePrimitive.java @ 41590

History | View | Annotate | Download (5.59 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 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 3
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.fmap.geom.primitive;
26

    
27
/**
28
 * <p>
29
 * This interface is equivalent to the GM_OrientablePrimitive specified in 
30
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
31
 * Orientable primitives are those that can be mirrored into new 
32
 * geometric objects in terms of their internal local coordinate 
33
 * systems (manifold charts).
34
 * </p>
35
 * <p>
36
 * For curves, the orientation reflects the direction in which the curve is traversed, 
37
 * that is, the sense of its parameterization. When used as boundary curves, 
38
 * the surface being bounded is to the "left" of the oriented curve. 
39
 * </p>
40
 * <p>
41
 * For surfaces, the orientation reflects from which direction the local coordinate 
42
 * system can be viewed as right handed, the "top" or the surface being the direction 
43
 * of a completing z-axis that would form a right-handed system.
44
 * </p>
45
 * <p>
46
 * When used as a boundary surface, the bounded solid is "below" the surface. 
47
 * The orientation of points and solids has no immediate geometric interpretation 
48
 * in 3-dimensional space.
49
 * </p>
50
 * <p> OrientablePrimitive objects are essentially references to geometric primitives 
51
 * that carry an "orientation" reversal flag (either "+" or "-") that determines whether 
52
 * this primitive agrees or disagrees with the orientation of the referenced object.
53
 * </p>
54
 * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
55
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
56
 */
57
public interface OrientablePrimitive extends Primitive {
58
    
59
    /**
60
     * Gets the one of the values of a coordinate (direct position) in a
61
     * concrete dimension.
62
     * 
63
     * @param index
64
     *            The index of the direct position to set.
65
     * @param dimension
66
     *            The dimension of the direct position.
67
     * @return The value of the coordinate
68
     */
69
    public double getCoordinateAt(int index, int dimension);
70
    
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
     */
81
    public void setCoordinateAt(int index, int dimension, double value);
82
    
83
    /**
84
     * Adds a vertex (or direct position) to the curve
85
     * @param point
86
     * The new point to add
87
     */
88
    public void addVertex(Point point);
89
    
90
    /**
91
     * Utility method for add a vertex
92
     * @param x
93
     * @param y
94
     * @see #addVertex(Point)
95
     */
96
    public void addVertex(double x, double y);
97

    
98
    /**
99
     * Utility method for add a vertex
100
     * @param x
101
     * @param y
102
     * @param z
103
     * @see #addVertex(Point)
104
     */
105
    public void addVertex(double x, double y, double z);
106
    
107
    /**
108
     * Remove a vertex (direct position) to the curve
109
     * @param index
110
     * The index of the vertex to remove
111
     */
112
    public void removeVertex(int index);
113
        
114
    /**
115
     * Gets a vertex (direct position) 
116
     * @param index
117
     * The index of the vertex to get
118
     * @return
119
     * One point
120
     */
121
    public Point getVertex(int index);
122
    
123
    /**
124
     * Gets the number of vertices (direct positions) of the curve
125
     * @return
126
     * The number of vertices
127
     */
128
    public int getNumVertices();
129
        
130
    /**
131
     * Inserts a vertex (direct position) to the curve.
132
     * @param index
133
     * The index of the vertex where the new point has to be added.
134
     * @param p
135
     * The vertex to add.
136
     */
137
    public void insertVertex(int index, Point p);
138
    
139
    /**
140
     * Sets a vertex in a concrete position and replaces the
141
     * previous one that was in this position.
142
     * @param index
143
     * The index of the vertex where the new point has to be replaced.
144
     * @param p
145
     * The vertex to set.
146
     */
147
    public void setVertex(int index, Point p);
148

    
149
    /**
150
     * Sets all the coordinates of the curve 
151
     * @param generalPathX The generalPath that contains all the coordinates
152
     * @deprecated use addVertex
153
     */
154
    public void setGeneralPath(GeneralPathX generalPathX);
155
    
156
    /**
157
     * Adds a vertex (or direct position) to the curve
158
     * @param point
159
     * The new point to add
160
     * @deprecated
161
     *      create a multigeometry or use methods to
162
     *      add an inner surface
163
     */
164
    public void addMoveToVertex(Point point);
165
    
166
    /**
167
     * Closes the geometry
168
     * @deprecated
169
     *      create a multigeometry, and it is not necessary to close a
170
     *      geometry.
171
     */
172
    public void closePrimitive();
173
    
174
    public void ensureCapacity(int capacity);
175
}