Revision 28990 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/Surface.java

View differences:

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
}

Also available in: Unified diff