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 / primitive / impl / Surface2D.java @ 40559
History | View | Annotate | Download (2.8 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
|
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 |
package org.gvsig.fmap.geom.primitive.impl; |
25 |
|
26 |
import java.awt.geom.Rectangle2D; |
27 |
|
28 |
import org.cresques.cts.IProjection; |
29 |
|
30 |
import org.gvsig.fmap.geom.Geometry; |
31 |
import org.gvsig.fmap.geom.primitive.FShape; |
32 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
33 |
import org.gvsig.fmap.geom.primitive.Surface; |
34 |
import org.gvsig.fmap.geom.primitive.SurfaceAppearance; |
35 |
import org.gvsig.fmap.geom.type.GeometryType; |
36 |
|
37 |
/**
|
38 |
* Pol�gono 2D.
|
39 |
*
|
40 |
* @author Vicente Caballero Navarro
|
41 |
*/
|
42 |
public class Surface2D extends OrientableSurface2D implements Surface { |
43 |
private static final long serialVersionUID = -8448256617197415743L; |
44 |
|
45 |
/**
|
46 |
* The constructor with the GeometryType like and argument
|
47 |
* is used by the {@link GeometryType}{@link #create()}
|
48 |
* to create the geometry
|
49 |
* @param type
|
50 |
* The geometry type
|
51 |
*/
|
52 |
public Surface2D(GeometryType geomType) {
|
53 |
super(geomType);
|
54 |
} |
55 |
|
56 |
/**
|
57 |
* Constructor used in the {@link Geometry#cloneGeometry()} method.
|
58 |
* @param geomType
|
59 |
* @param id
|
60 |
* @param projection
|
61 |
* @param gpx
|
62 |
*/
|
63 |
Surface2D(GeometryType geomType, String id, IProjection projection, GeneralPathX gpx) {
|
64 |
super(geomType, id, projection, gpx);
|
65 |
} |
66 |
|
67 |
/*
|
68 |
* (non-Javadoc)
|
69 |
* @see org.gvsig.fmap.geom.Geometry#getShapeType()
|
70 |
*/
|
71 |
public int getShapeType() { |
72 |
return TYPES.SURFACE;
|
73 |
} |
74 |
|
75 |
/*
|
76 |
* (non-Javadoc)
|
77 |
* @see org.gvsig.fmap.geom.primitive.FShape#cloneFShape()
|
78 |
*/
|
79 |
public FShape cloneFShape() {
|
80 |
return new Surface2D(getGeometryType(), id, projection, (GeneralPathX) gp.clone()); |
81 |
} |
82 |
|
83 |
/*
|
84 |
* (non-Javadoc)
|
85 |
* @see org.gvsig.fmap.geom.primitive.impl.OrientablePrimitive2D#intersects(java.awt.geom.Rectangle2D)
|
86 |
*/
|
87 |
public boolean intersects(Rectangle2D r) { |
88 |
return gp.intersects(r);
|
89 |
} |
90 |
|
91 |
public SurfaceAppearance getSurfaceAppearance() {
|
92 |
// TODO Auto-generated method stub
|
93 |
return null; |
94 |
} |
95 |
|
96 |
public void setSurfaceAppearance(SurfaceAppearance app) { |
97 |
// TODO Auto-generated method stub
|
98 |
|
99 |
} |
100 |
} |