Statistics
| Revision:

root / trunk / libraries / libGPE / src-test / org / gvsig / gpe / containers / Polygon.java @ 11247

History | View | Annotate | Download (2.75 KB)

1
package org.gvsig.gpe.containers;
2

    
3
import java.util.ArrayList;
4

    
5
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
6
 *
7
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * 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
44
 */
45
/* CVS MESSAGES:
46
 *
47
 * $Id: Polygon.java 11247 2007-04-19 07:30:40Z jorpiell $
48
 * $Log$
49
 * Revision 1.2  2007-04-19 07:23:20  jorpiell
50
 * Add the add methods to teh contenhandler and change the register mode
51
 *
52
 * Revision 1.1  2007/04/14 16:06:35  jorpiell
53
 * Add the container classes
54
 *
55
 *
56
 */
57
/**
58
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
59
 */
60
public class Polygon extends Geometry {
61
        private double[] x;
62
        private double[] y;
63
        private double[] z;
64
        private String srs;
65
        private ArrayList innerBoundary = new ArrayList();
66
        
67
        /**
68
         * @return the innerBoundary
69
         */
70
        public ArrayList getInnerBoundary() {
71
                return innerBoundary;
72
        }
73
        
74
        /**
75
         * Adds a new layer
76
         * @param layer
77
         */
78
        public void addInnerBoundary(Polygon polygon){
79
                innerBoundary.add(polygon);
80
        }
81
        
82
        /**
83
         * Adds a new layer
84
         * @param layer
85
         */
86
        public void addInnerBoundary(Object polygon){
87
                if (polygon instanceof Polygon){
88
                        innerBoundary.add(polygon);
89
                }
90
        }
91
        
92
        
93
        /**
94
         * @return the srs
95
         */
96
        public String getSrs() {
97
                return srs;
98
        }
99
        /**
100
         * @param srs the srs to set
101
         */
102
        public void setSrs(String srs) {
103
                this.srs = srs;
104
        }
105
        /**
106
         * @return the x
107
         */
108
        public double[] getX() {
109
                return x;
110
        }
111
        /**
112
         * @param x the x to set
113
         */
114
        public void setX(double[] x) {
115
                this.x = x;
116
        }
117
        /**
118
         * @return the y
119
         */
120
        public double[] getY() {
121
                return y;
122
        }
123
        /**
124
         * @param y the y to set
125
         */
126
        public void setY(double[] y) {
127
                this.y = y;
128
        }
129
        /**
130
         * @return the z
131
         */
132
        public double[] getZ() {
133
                return z;
134
        }
135
        /**
136
         * @param z the z to set
137
         */
138
        public void setZ(double[] z) {
139
                this.z = z;
140
        }
141
}