Statistics
| Revision:

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 @ 43002

History | View | Annotate | Download (6.86 KB)

1 42278 fdiaz
/**
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 42281 fdiaz
import org.gvsig.fmap.geom.operation.GeometryOperationException;
43
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
44 42278 fdiaz
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
        return null;
142
    }
143
144
    public void transform(AffineTransform at) {
145
146
    }
147
148
    public PathIterator getPathIterator(AffineTransform at, double flatness) {
149
        return null;
150
    }
151
152
    public boolean contains(double arg0, double arg1) {
153
        return false;
154
    }
155
156
    public boolean contains(double arg0, double arg1, double arg2, double arg3) {
157
        return false;
158
    }
159
160
    public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
161
        return false;
162
    }
163
164
    public Rectangle getBounds() {
165
        return null;
166
    }
167
168
    public boolean contains(Point2D arg0) {
169
        return false;
170
    }
171
172
    public boolean contains(Rectangle2D arg0) {
173
        return false;
174
    }
175
176
    /*
177
     * (non-Javadoc)
178
     *
179
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#isSimple()
180
     */
181
    public boolean isSimple() {
182
        return false;
183
    }
184
185
    /*
186
     * (non-Javadoc)
187
     *
188
     * @see org.gvsig.geometries.iso.GM_Object#coordinateDimension()
189
     */
190
    public int getDimension() {
191
        return 0;
192
    }
193
194
    public Envelope getEnvelope() {
195
        return null;
196
    }
197
198
    public GeneralPathX getGeneralPath() {
199
        return null;
200
    }
201
202
    public boolean isValid() {
203
        return false;
204
    }
205
206
    public ValidationStatus getValidationStatus() {
207
        return validationStatus;
208
    }
209
210
    /* (non-Javadoc)
211
     * @see org.gvsig.fmap.geom.Geometry#toPoints()
212
     */
213
    public MultiPoint toPoints() throws GeometryException {
214
        return null;
215
    }
216
217
    /* (non-Javadoc)
218
     * @see org.gvsig.fmap.geom.Geometry#toLines()
219
     */
220
    public MultiLine toLines() throws GeometryException {
221
        return null;
222
    }
223
224
    /* (non-Javadoc)
225
     * @see org.gvsig.fmap.geom.Geometry#toPolygons()
226
     */
227
    public MultiPolygon toPolygons() throws GeometryException {
228
        return null;
229
    }
230
231
    /* (non-Javadoc)
232
     * @see org.gvsig.fmap.geom.jts.GeometryJTS#getJTS()
233
     */
234
    public Geometry getJTS() {
235
        return null;
236
    }
237
238
    /* (non-Javadoc)
239
     * @see org.gvsig.fmap.geom.jts.GeometryJTS#is3D()
240
     */
241
    public boolean is3D() {
242
        return false;
243
    }
244
245 42281 fdiaz
    /* (non-Javadoc)
246
     * @see org.gvsig.fmap.geom.jts.GeometryJTS#flip()
247
     */
248
    public void flip() throws GeometryOperationNotSupportedException, GeometryOperationException {
249
        // do nothing
250
    }
251
252 42441 fdiaz
    /* (non-Javadoc)
253
     * @see org.gvsig.fmap.geom.Geometry#offset(double)
254
     */
255
    public org.gvsig.fmap.geom.Geometry offset(double distance) throws GeometryOperationNotSupportedException,
256
        GeometryOperationException {
257
        //FIXME: ?this, null o qu??
258
        return this;
259
    }
260
261 43002 fdiaz
262
    @Override
263
    public boolean canBeTransformed(AffineTransform at) {
264
        return false;
265
    }
266
267
    @Override
268
    public boolean canBeReprojected(ICoordTrans ct) {
269
        return false;
270
    }
271
272 42278 fdiaz
}