svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.impl / src / main / java / org / gvsig / fmap / geom / aggregate / impl / MultiCurve2DZ.java @ 40559
History | View | Annotate | Download (4.11 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
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 | 40435 | jjdelcerro | package org.gvsig.fmap.geom.aggregate.impl; |
25 | |||
26 | import org.cresques.cts.IProjection; |
||
27 | import org.gvsig.fmap.geom.Geometry; |
||
28 | import org.gvsig.fmap.geom.aggregate.MultiCurve; |
||
29 | import org.gvsig.fmap.geom.primitive.Curve; |
||
30 | import org.gvsig.fmap.geom.primitive.impl.Curve2DZ; |
||
31 | import org.gvsig.fmap.geom.type.GeometryType; |
||
32 | |||
33 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
34 | *
|
||
35 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
36 | *
|
||
37 | * This program is free software; you can redistribute it and/or
|
||
38 | * modify it under the terms of the GNU General Public License
|
||
39 | * as published by the Free Software Foundation; either version 2
|
||
40 | * of the License, or (at your option) any later version.
|
||
41 | *
|
||
42 | * This program is distributed in the hope that it will be useful,
|
||
43 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
44 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
45 | * GNU General Public License for more details.
|
||
46 | *
|
||
47 | * You should have received a copy of the GNU General Public License
|
||
48 | * along with this program; if not, write to the Free Software
|
||
49 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
50 | *
|
||
51 | * For more information, contact:
|
||
52 | *
|
||
53 | * Generalitat Valenciana
|
||
54 | * Conselleria d'Infraestructures i Transport
|
||
55 | * Av. Blasco Ib??ez, 50
|
||
56 | * 46010 VALENCIA
|
||
57 | * SPAIN
|
||
58 | *
|
||
59 | * +34 963862235
|
||
60 | * gvsig@gva.es
|
||
61 | * www.gvsig.gva.es
|
||
62 | *
|
||
63 | * or
|
||
64 | *
|
||
65 | * IVER T.I. S.A
|
||
66 | * Salamanca 50
|
||
67 | * 46005 Valencia
|
||
68 | * Spain
|
||
69 | *
|
||
70 | * +34 963163400
|
||
71 | * dac@iver.es
|
||
72 | */
|
||
73 | /* CVS MESSAGES:
|
||
74 | *
|
||
75 | * $Id: FMultiPolyline2D.java,v 1.2 2008/03/25 08:47:41 cvs Exp $
|
||
76 | * $Log: FMultiPolyline2D.java,v $
|
||
77 | * Revision 1.2 2008/03/25 08:47:41 cvs
|
||
78 | * Visitors removed
|
||
79 | *
|
||
80 | * Revision 1.1 2008/03/12 08:46:20 cvs
|
||
81 | * *** empty log message ***
|
||
82 | *
|
||
83 | *
|
||
84 | */
|
||
85 | /**
|
||
86 | * @author Jorge Piera Llodr? (jorge.piera@iver.es)
|
||
87 | */
|
||
88 | public class MultiCurve2DZ extends BaseMultiPrimitive implements MultiCurve { |
||
89 | private static final long serialVersionUID = 3079910108112255174L; |
||
90 | |||
91 | /**
|
||
92 | * The constructor with the GeometryType like and argument
|
||
93 | * is used by the {@link GeometryType}{@link #create()}
|
||
94 | * to create the geometry
|
||
95 | * @param type
|
||
96 | * The geometry type
|
||
97 | */
|
||
98 | public MultiCurve2DZ(GeometryType geomType) {
|
||
99 | super(geomType);
|
||
100 | } |
||
101 | |||
102 | MultiCurve2DZ(GeometryType geomType, String id, IProjection projection) {
|
||
103 | super(geomType, id, projection);
|
||
104 | } |
||
105 | |||
106 | MultiCurve2DZ(GeometryType geomType, String id, IProjection projection, Curve2DZ[] lines) { |
||
107 | super(geomType, id, projection, lines);
|
||
108 | } |
||
109 | |||
110 | /*
|
||
111 | * (non-Javadoc)
|
||
112 | *
|
||
113 | * @see com.iver.cit.gvsig.fmap.core.FGeometryCollection#cloneGeometry()
|
||
114 | */
|
||
115 | public Geometry cloneGeometry() {
|
||
116 | MultiCurve2DZ auxCurve = new MultiCurve2DZ(geometryType, id, projection);
|
||
117 | for (int i = 0; i < getPrimitivesNumber(); i++) { |
||
118 | auxCurve.addCurve((Curve)((Curve) geometries.get(i)).cloneGeometry()); |
||
119 | } |
||
120 | return auxCurve;
|
||
121 | } |
||
122 | |||
123 | /* (non-Javadoc)
|
||
124 | * @see org.gvsig.fmap.geom.aggregate.MultiCurve#addCurve(org.gvsig.fmap.geom.primitive.Curve)
|
||
125 | */
|
||
126 | public void addCurve(Curve curve) { |
||
127 | addPrimitive(curve); |
||
128 | } |
||
129 | |||
130 | /* (non-Javadoc)
|
||
131 | * @see org.gvsig.fmap.geom.aggregate.MultiCurve#getCurveAt(int)
|
||
132 | */
|
||
133 | public Curve getCurveAt(int index) { |
||
134 | return (Curve)getPrimitiveAt(index);
|
||
135 | } |
||
136 | } |