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

History | View | Annotate | Download (7.25 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
    @Override
74
    public org.gvsig.fmap.geom.Geometry force2D() throws GeometryOperationNotSupportedException, GeometryOperationException {
75
        return this;
76
    }
77

    
78
    
79
    public Shape getShape() {
80
        return null;
81
    }
82

    
83
    public Shape getShape(AffineTransform affineTransform) {
84
        return null;
85
    }
86

    
87

    
88
    /*
89
     * (non-Javadoc)
90
     *
91
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#intersects(java.awt.geom.Rectangle2D)
92
     */
93
    public boolean intersects(Rectangle2D r) {
94
        return false;
95
    }
96

    
97
    /*
98
     * (non-Javadoc)
99
     *
100
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#getBounds2D()
101
     */
102
    public Rectangle2D getBounds2D() {
103
        return null;
104
    }
105

    
106
    /*
107
     * (non-Javadoc)
108
     *
109
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#cloneGeometry()
110
     */
111
    @Override
112
    public org.gvsig.fmap.geom.Geometry cloneGeometry() {
113
        return this;
114
    }
115

    
116
    /*
117
     * (non-Javadoc)
118
     *
119
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#reProject(org.cresques.cts.ICoordTrans)
120
     */
121
    public void reProject(ICoordTrans ct) {
122
    }
123

    
124
    /**
125
     * @see org.gvsig.fmap.geom.Geometry#getPathIterator(AffineTransform)
126
     */
127
    public PathIterator getPathIterator(AffineTransform at) {
128
        // TODO falta implementar.
129
        return null;
130
    }
131

    
132
    /*
133
     * (non-Javadoc)
134
     *
135
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#fastIntersects(double,
136
     *      double, double, double)
137
     */
138
    public boolean fastIntersects(double x, double y, double w, double h) {
139
        return false;
140
    }
141

    
142
    /*
143
     * (non-Javadoc)
144
     *
145
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#getHandlers(int)
146
     */
147
    public Handler[] getHandlers(int type) {
148
        return null;
149
    }
150

    
151
    public void transform(AffineTransform at) {
152

    
153
    }
154

    
155
    public PathIterator getPathIterator(AffineTransform at, double flatness) {
156
        return null;
157
    }
158

    
159
    public boolean contains(double arg0, double arg1) {
160
        return false;
161
    }
162

    
163
    public boolean contains(double arg0, double arg1, double arg2, double arg3) {
164
        return false;
165
    }
166

    
167
    public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
168
        return false;
169
    }
170

    
171
    public Rectangle getBounds() {
172
        return null;
173
    }
174

    
175
    public boolean contains(Point2D arg0) {
176
        return false;
177
    }
178

    
179
    public boolean contains(Rectangle2D arg0) {
180
        return false;
181
    }
182

    
183
    /*
184
     * (non-Javadoc)
185
     *
186
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#isSimple()
187
     */
188
    public boolean isSimple() {
189
        return false;
190
    }
191

    
192
    /*
193
     * (non-Javadoc)
194
     *
195
     * @see org.gvsig.geometries.iso.GM_Object#coordinateDimension()
196
     */
197
    public int getDimension() {
198
        return 0;
199
    }
200

    
201
    public Envelope getEnvelope() {
202
        return null;
203
    }
204

    
205
    public GeneralPathX getGeneralPath() {
206
        return null;
207
    }
208

    
209
    public boolean isValid() {
210
        return false;
211
    }
212

    
213
    public ValidationStatus getValidationStatus() {
214
        return validationStatus;
215
    }
216

    
217
    /* (non-Javadoc)
218
     * @see org.gvsig.fmap.geom.Geometry#toPoints()
219
     */
220
    public MultiPoint toPoints() throws GeometryException {
221
        return null;
222
    }
223

    
224
    /* (non-Javadoc)
225
     * @see org.gvsig.fmap.geom.Geometry#toLines()
226
     */
227
    public MultiLine toLines() throws GeometryException {
228
        return null;
229
    }
230

    
231
    /* (non-Javadoc)
232
     * @see org.gvsig.fmap.geom.Geometry#toPolygons()
233
     */
234
    public MultiPolygon toPolygons() throws GeometryException {
235
        return null;
236
    }
237

    
238
    /* (non-Javadoc)
239
     * @see org.gvsig.fmap.geom.jts.GeometryJTS#getJTS()
240
     */
241
    public Geometry getJTS() {
242
        return null;
243
    }
244

    
245
    /* (non-Javadoc)
246
     * @see org.gvsig.fmap.geom.jts.GeometryJTS#is3D()
247
     */
248
    public boolean is3D() {
249
        return false;
250
    }
251

    
252
    /* (non-Javadoc)
253
     * @see org.gvsig.fmap.geom.jts.GeometryJTS#flip()
254
     */
255
    public void flip() throws GeometryOperationNotSupportedException, GeometryOperationException {
256
        // do nothing
257
    }
258

    
259
    /* (non-Javadoc)
260
     * @see org.gvsig.fmap.geom.Geometry#offset(double)
261
     */
262
    public org.gvsig.fmap.geom.Geometry offset(double distance) throws GeometryOperationNotSupportedException,
263
        GeometryOperationException {
264
        //FIXME: ?this, null o qu??
265
        return this;
266
    }
267

    
268
    @Override
269
    public org.gvsig.fmap.geom.Geometry offset(int joinStyle, double distance) throws GeometryOperationNotSupportedException, GeometryOperationException {
270
        return offset(distance);
271
    }
272
    
273

    
274
    @Override
275
    public boolean canBeTransformed(AffineTransform at) {
276
        return false;
277
    }
278

    
279
    @Override
280
    public boolean canBeReprojected(ICoordTrans ct) {
281
        return false;
282
    }
283

    
284

    
285
}