Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / impl / Circle2DZ.java @ 29018

History | View | Annotate | Download (1.24 KB)

1
/**
2
 *
3
 */
4
package org.gvsig.fmap.geom.primitive.impl;
5

    
6
import java.awt.geom.Point2D;
7

    
8
import org.cresques.cts.IProjection;
9
import org.gvsig.fmap.geom.GeometryLocator;
10
import org.gvsig.fmap.geom.primitive.Circle;
11
import org.gvsig.fmap.geom.primitive.GeneralPathX;
12
import org.gvsig.fmap.geom.type.GeometryType;
13

    
14
/**
15
 * @author paco
16
 *
17
 */
18
public class Circle2DZ extends Circle2D implements Circle {
19
        private static final long serialVersionUID = 5806439460681368421L;
20

    
21
        private static GeometryType geomType = GeometryLocator.getGeometryManager()
22
        .registerGeometryType(Circle2DZ.class, null, TYPES.CIRCLE, SUBTYPES.GEOM2DZ);
23
        
24
        private double z;
25

    
26
        /**
27
         * Constructor without arguments. It is necessary to create
28
         * geometries using the {@link GeometryType}{@link #create()}
29
         * method
30
         */
31
        public Circle2DZ() {
32
                super();                
33
        }
34
        
35
        public Circle2DZ(String id, IProjection projection, GeneralPathX gpx, Point2D c, double r, double z) {
36
                super(id, projection, gpx, c, r);
37
                this.z = z;
38
        }
39

    
40
        /* (non-Javadoc)
41
         * @see org.gvsig.fmap.geom.primitive.Circle2D#setCoordinateAt(int, int, double)
42
         */
43
        public void setCoordinateAt(int index, int dimension, double value) {
44
                if (dimension == 2){
45
                        z = value;
46
                }else{
47
                        super.setCoordinateAt(index, dimension, value);
48
                }
49
        }
50

    
51
        
52

    
53
}