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 / surface / ellipticarc / EllipticArc2DM.java @ 47432
History | View | Annotate | Download (2.11 KB)
1 | 42304 | fdiaz | /* gvSIG. Desktop Geographic Information System.
|
---|---|---|---|
2 | *
|
||
3 | * Copyright ? 2007-2015 gvSIG Association
|
||
4 | *
|
||
5 | * This program is free software; you can redistribute it and/or
|
||
6 | * modify it under the terms of the GNU General Public License
|
||
7 | * as published by the Free Software Foundation; either version 2
|
||
8 | * of the License, or (at your option) any later version.
|
||
9 | *
|
||
10 | * This program is distributed in the hope that it will be useful,
|
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
13 | * GNU General Public License for more details.
|
||
14 | *
|
||
15 | * You should have received a copy of the GNU General Public License
|
||
16 | * along with this program; if not, write to the Free Software
|
||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
18 | * MA 02110-1301, USA.
|
||
19 | *
|
||
20 | * For any additional information, do not hesitate to contact us
|
||
21 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
22 | */
|
||
23 | package org.gvsig.fmap.geom.jts.primitive.surface.ellipticarc; |
||
24 | |||
25 | import org.gvsig.fmap.geom.Geometry; |
||
26 | import org.gvsig.fmap.geom.jts.util.ArrayListCoordinateSequence; |
||
27 | import org.gvsig.fmap.geom.jts.util.JTSUtils; |
||
28 | import org.gvsig.fmap.geom.primitive.EllipticArc; |
||
29 | import org.gvsig.fmap.geom.primitive.Point; |
||
30 | |||
31 | |||
32 | /**
|
||
33 | * @author fdiaz
|
||
34 | *
|
||
35 | */
|
||
36 | 47432 | fdiaz | public class EllipticArc2DM extends BaseEllipticArc2DM implements EllipticArc { |
37 | 42304 | fdiaz | |
38 | /**
|
||
39 | * @param subtype
|
||
40 | */
|
||
41 | 47432 | fdiaz | public EllipticArc2DM() {
|
42 | 42440 | fdiaz | super(Geometry.TYPES.ELLIPTICARC);
|
43 | 42304 | fdiaz | } |
44 | |||
45 | |||
46 | /* (non-Javadoc)
|
||
47 | * @see org.gvsig.fmap.geom.Geometry#cloneGeometry()
|
||
48 | */
|
||
49 | 47346 | fdiaz | @Override
|
50 | 42304 | fdiaz | public Geometry cloneGeometry() {
|
51 | 47432 | fdiaz | EllipticArc2DM clone = new EllipticArc2DM();
|
52 | 42304 | fdiaz | clone.setPoints((Point)axis1Start.cloneGeometry(), (Point)axis1End.cloneGeometry(), semiAxis2Length, angSt, angExt); |
53 | 47346 | fdiaz | clone.setProjection(this.getProjection());
|
54 | 42304 | fdiaz | return clone;
|
55 | } |
||
56 | |||
57 | /* (non-Javadoc)
|
||
58 | * @see org.gvsig.fmap.geom.jts.GeometryJTS#getJTS()
|
||
59 | */
|
||
60 | public com.vividsolutions.jts.geom.Geometry getJTS() {
|
||
61 | ArrayListCoordinateSequence coordinates = getJTSCoordinates(); |
||
62 | return JTSUtils.createJTSPolygon(coordinates);
|
||
63 | } |
||
64 | } |