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 / Surface.java @ 42309

History | View | Annotate | Download (3.22 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
package org.gvsig.fmap.geom.primitive;
25

    
26
/**
27
 * <p>
28
 * This interface is equivalent to the GM_Surface specified in <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012"
29
 * >ISO 19107</a>. Surface is a subclass of {@link Primitive} and is the basis
30
 * for 2-dimensional geometry. Unorientable surfaces such as the M�bius band
31
 * are not allowed.
32
 * <p/>
33
 * <p>
34
 * The orientation of a surface chooses an "up" direction through the choice of
35
 * the upward normal, which, if the surface is not a cycle, is the side of the
36
 * surface from which the exterior boundary appears counterclockwise. Reversal
37
 * of the surface orientation reverses the curve orientation of each boundary
38
 * component, and interchanges the conceptual "up" and "down" direction of the
39
 * surface.
40
 * </p>
41
 * <p>
42
 * If the surface is the boundary of a solid, the "up" direction is usually
43
 * outward. For closed surfaces, which have no boundary, the up direction is
44
 * that of the surface patches, which must be consistent with one another.
45
 * </p>
46
 *
47
 * @see <a
48
 *      href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO
49
 *      19107</a>
50
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
51
 * @author <a href="mailto:jtorres@ai2.upv.es">Jordi Torres Fabra</a>
52
 */
53
public interface Surface extends OrientableSurface {
54

    
55
        /**
56
         * Sets the appearance of the Surface
57
         *
58
         * @param app
59
         *            The appearance of the surface
60
         */
61
        public void setSurfaceAppearance(SurfaceAppearance app);
62

    
63
        /**
64
         * Gets surface appearance
65
         *
66
         * @return the surface appearance
67
         *
68
         */
69
        public SurfaceAppearance getSurfaceAppearance();
70

    
71
        public int getNumInteriorRings();
72

    
73
        public Ring getInteriorRing(int index);
74

    
75
        public void addInteriorRing(Ring ring);
76

    
77
        /**
78
         * Creates a ring from the coordinates of the line and adds it to the surface like an inner ring.
79
         *
80
         * @param ring
81
         */
82
        public void addInteriorRing(Line line);
83

    
84
        /**
85
         * Creates a ring from the coordinates of the shell of the polygon and adds it to the surface like an inner ring.
86
         *
87
         * @param polygon
88
         */
89
        public void addInteriorRing(Polygon polygon);
90

    
91
        public void removeInteriorRing(int index);
92

    
93
}