svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.jts / src / main / java / org / gvsig / fmap / geom / jts / primitive / DefaultNullGeometry.java @ 42281
History | View | Annotate | Download (6.42 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 modify it under
|
7 |
* the terms of the GNU General Public License as published by the Free Software
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later
|
9 |
* version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
14 |
* details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License along with
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us at info AT
|
21 |
* gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.fmap.geom.jts.primitive; |
24 |
|
25 |
import java.awt.Rectangle; |
26 |
import java.awt.Shape; |
27 |
import java.awt.geom.AffineTransform; |
28 |
import java.awt.geom.PathIterator; |
29 |
import java.awt.geom.Point2D; |
30 |
import java.awt.geom.Rectangle2D; |
31 |
|
32 |
import com.vividsolutions.jts.geom.Geometry; |
33 |
|
34 |
import org.cresques.cts.ICoordTrans; |
35 |
|
36 |
import org.gvsig.fmap.geom.GeometryException; |
37 |
import org.gvsig.fmap.geom.aggregate.MultiLine; |
38 |
import org.gvsig.fmap.geom.aggregate.MultiPoint; |
39 |
import org.gvsig.fmap.geom.aggregate.MultiPolygon; |
40 |
import org.gvsig.fmap.geom.handler.Handler; |
41 |
import org.gvsig.fmap.geom.jts.DefaultValidationStatus; |
42 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
43 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
44 |
import org.gvsig.fmap.geom.primitive.Envelope; |
45 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
46 |
import org.gvsig.fmap.geom.primitive.NullGeometry; |
47 |
import org.gvsig.fmap.geom.type.GeometryType; |
48 |
|
49 |
/**
|
50 |
* DOCUMENT ME!
|
51 |
*
|
52 |
* @author Vicente Caballero Navarro
|
53 |
*/
|
54 |
public class DefaultNullGeometry extends AbstractPrimitive implements NullGeometry { |
55 |
|
56 |
/**
|
57 |
*
|
58 |
*/
|
59 |
private static final long serialVersionUID = -7307693394018682067L; |
60 |
|
61 |
private static final ValidationStatus validationStatus = new DefaultValidationStatus(ValidationStatus.UNKNOW, "Null-geometry is not a valid geometry."); |
62 |
|
63 |
/**
|
64 |
* The constructor with the GeometryType like and argument is used by the
|
65 |
* {@link GeometryType}{@link #create()} to create the geometry
|
66 |
*
|
67 |
* @param type The geometry type
|
68 |
*/
|
69 |
public DefaultNullGeometry(GeometryType geometryType) {
|
70 |
super(geometryType.getType(), geometryType.getSubType());
|
71 |
} |
72 |
|
73 |
public Shape getShape() { |
74 |
return null; |
75 |
} |
76 |
|
77 |
public Shape getShape(AffineTransform affineTransform) { |
78 |
return null; |
79 |
} |
80 |
|
81 |
|
82 |
/*
|
83 |
* (non-Javadoc)
|
84 |
*
|
85 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#intersects(java.awt.geom.Rectangle2D)
|
86 |
*/
|
87 |
public boolean intersects(Rectangle2D r) { |
88 |
return false; |
89 |
} |
90 |
|
91 |
/*
|
92 |
* (non-Javadoc)
|
93 |
*
|
94 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#getBounds2D()
|
95 |
*/
|
96 |
public Rectangle2D getBounds2D() { |
97 |
return null; |
98 |
} |
99 |
|
100 |
/*
|
101 |
* (non-Javadoc)
|
102 |
*
|
103 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#cloneGeometry()
|
104 |
*/
|
105 |
public org.gvsig.fmap.geom.Geometry cloneGeometry() {
|
106 |
return this; |
107 |
} |
108 |
|
109 |
/*
|
110 |
* (non-Javadoc)
|
111 |
*
|
112 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#reProject(org.cresques.cts.ICoordTrans)
|
113 |
*/
|
114 |
public void reProject(ICoordTrans ct) { |
115 |
} |
116 |
|
117 |
/**
|
118 |
* @see org.gvsig.fmap.geom.Geometry#getPathIterator(AffineTransform)
|
119 |
*/
|
120 |
public PathIterator getPathIterator(AffineTransform at) { |
121 |
// TODO falta implementar.
|
122 |
return null; |
123 |
} |
124 |
|
125 |
/*
|
126 |
* (non-Javadoc)
|
127 |
*
|
128 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#fastIntersects(double,
|
129 |
* double, double, double)
|
130 |
*/
|
131 |
public boolean fastIntersects(double x, double y, double w, double h) { |
132 |
return false; |
133 |
} |
134 |
|
135 |
/*
|
136 |
* (non-Javadoc)
|
137 |
*
|
138 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#getHandlers(int)
|
139 |
*/
|
140 |
public Handler[] getHandlers(int type) { |
141 |
// TODO Auto-generated method stub
|
142 |
return null; |
143 |
} |
144 |
|
145 |
public void transform(AffineTransform at) { |
146 |
|
147 |
} |
148 |
|
149 |
public PathIterator getPathIterator(AffineTransform at, double flatness) { |
150 |
return null; |
151 |
} |
152 |
|
153 |
public boolean contains(double arg0, double arg1) { |
154 |
return false; |
155 |
} |
156 |
|
157 |
public boolean contains(double arg0, double arg1, double arg2, double arg3) { |
158 |
return false; |
159 |
} |
160 |
|
161 |
public boolean intersects(double arg0, double arg1, double arg2, double arg3) { |
162 |
return false; |
163 |
} |
164 |
|
165 |
public Rectangle getBounds() { |
166 |
return null; |
167 |
} |
168 |
|
169 |
public boolean contains(Point2D arg0) { |
170 |
return false; |
171 |
} |
172 |
|
173 |
public boolean contains(Rectangle2D arg0) { |
174 |
return false; |
175 |
} |
176 |
|
177 |
/*
|
178 |
* (non-Javadoc)
|
179 |
*
|
180 |
* @see com.iver.cit.gvsig.fmap.core.IGeometry#isSimple()
|
181 |
*/
|
182 |
public boolean isSimple() { |
183 |
return false; |
184 |
} |
185 |
|
186 |
/*
|
187 |
* (non-Javadoc)
|
188 |
*
|
189 |
* @see org.gvsig.geometries.iso.GM_Object#coordinateDimension()
|
190 |
*/
|
191 |
public int getDimension() { |
192 |
return 0; |
193 |
} |
194 |
|
195 |
public Envelope getEnvelope() {
|
196 |
return null; |
197 |
} |
198 |
|
199 |
public GeneralPathX getGeneralPath() {
|
200 |
return null; |
201 |
} |
202 |
|
203 |
public boolean isValid() { |
204 |
return false; |
205 |
} |
206 |
|
207 |
public ValidationStatus getValidationStatus() {
|
208 |
return validationStatus;
|
209 |
} |
210 |
|
211 |
/* (non-Javadoc)
|
212 |
* @see org.gvsig.fmap.geom.Geometry#toPoints()
|
213 |
*/
|
214 |
public MultiPoint toPoints() throws GeometryException { |
215 |
return null; |
216 |
} |
217 |
|
218 |
/* (non-Javadoc)
|
219 |
* @see org.gvsig.fmap.geom.Geometry#toLines()
|
220 |
*/
|
221 |
public MultiLine toLines() throws GeometryException { |
222 |
return null; |
223 |
} |
224 |
|
225 |
/* (non-Javadoc)
|
226 |
* @see org.gvsig.fmap.geom.Geometry#toPolygons()
|
227 |
*/
|
228 |
public MultiPolygon toPolygons() throws GeometryException { |
229 |
return null; |
230 |
} |
231 |
|
232 |
/* (non-Javadoc)
|
233 |
* @see org.gvsig.fmap.geom.jts.GeometryJTS#getJTS()
|
234 |
*/
|
235 |
public Geometry getJTS() {
|
236 |
return null; |
237 |
} |
238 |
|
239 |
/* (non-Javadoc)
|
240 |
* @see org.gvsig.fmap.geom.jts.GeometryJTS#is3D()
|
241 |
*/
|
242 |
public boolean is3D() { |
243 |
return false; |
244 |
} |
245 |
|
246 |
/* (non-Javadoc)
|
247 |
* @see org.gvsig.fmap.geom.jts.GeometryJTS#flip()
|
248 |
*/
|
249 |
public void flip() throws GeometryOperationNotSupportedException, GeometryOperationException { |
250 |
// do nothing
|
251 |
} |
252 |
|
253 |
} |