Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / OrientablePrimitive.java @ 38545

History | View | Annotate | Download (5.19 KB)

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

    
28
package org.gvsig.fmap.geom.primitive;
29

    
30
/**
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>
59
 */
60
public interface OrientablePrimitive extends Primitive {
61
    
62
    /**
63
     * Sets all the coordinates of the curve 
64
     * @param generalPathX
65
     * The generalPath that contains all the coordinates
66
     */
67
    public void setGeneralPath(GeneralPathX generalPathX);
68
    
69
    /**
70
     * Gets the one of the values of a coordinate (direct position) in a
71
     * concrete dimension.
72
     * 
73
     * @param index
74
     *            The index of the direct position to set.
75
     * @param dimension
76
     *            The dimension of the direct position.
77
     * @return The value of the coordinate
78
     */
79
    public double getCoordinateAt(int index, int dimension);
80
    
81
    
82
    /**
83
     * Sets the value of a coordinate (direct position) 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
     * @param value
89
     * The value to set
90
     */
91
    public void setCoordinateAt(int index, int dimension, double value);
92
    
93
    /**
94
     * Adds a vertex (or direct position) to the curve
95
     * @param point
96
     * The new point to add
97
     */
98
    public void addVertex(Point point);
99
    
100
    /**
101
     * Adds a vertex (or direct position) to the curve
102
     * @param point
103
     * The new point to add
104
     * @deprecated
105
     *      create a multigeometry or use methods to
106
     *      add an inner surface
107
     */
108
    public void addMoveToVertex(Point point);
109
    
110
    /**
111
     * Closes the geometry
112
     * @deprecated
113
     *      create a multigeometry, and it is not necessary to close a
114
     *      geometry.
115
     */
116
    public void closePrimitive();
117
    
118
    /**
119
     * Remove a vertex (direct position) to the curve
120
     * @param index
121
     * The index of the vertex to remove
122
     */
123
    public void removeVertex(int index);
124
        
125
    /**
126
     * Gets a vertex (direct position) 
127
     * @param index
128
     * The index of the vertex to get
129
     * @return
130
     * One point
131
     */
132
    public Point getVertex(int index);
133
    
134
    /**
135
     * Gets the number of vertices (direct positions) of the curve
136
     * @return
137
     * The number of vertices
138
     */
139
    public int getNumVertices();
140
        
141
    /**
142
     * Inserts a vertex (direct position) to the curve.
143
     * @param index
144
     * The index of the vertex where the new point has to be added.
145
     * @param p
146
     * The vertex to add.
147
     */
148
    public void insertVertex(int index, Point p);
149
    
150
    /**
151
     * Sets a vertex in a concrete position and replaces the
152
     * previous one that was in this position.
153
     * @param index
154
     * The index of the vertex where the new point has to be replaced.
155
     * @param p
156
     * The vertex to set.
157
     */
158
    public void setVertex(int index, Point p);
159

    
160
}