PageRenderTime 27ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/worldwind/kml/model/KMLPoint.java

http://wwj-kml.googlecode.com/
Java | 46 lines | 30 code | 9 blank | 7 comment | 2 complexity | 6cc73a7bd3d61b8b53ab4c4c18d1ae6f MD5 | raw file
 1package worldwind.kml.model;
 2
 3import gov.nasa.worldwind.geom.Sector;
 4
 5/**
 6 * Created by IntelliJ IDEA.
 7 * User: tgleason
 8 * Date: Sep 1, 2008
 9 * Time: 10:30:51 PM
10 * To change this template use File | Settings | File Templates.
11 */
12public class KMLPoint extends KMLGraphic {
13    KMLCoord coord;
14    Sector sector;
15    int altitudeMode = CLAMP_TO_GROUND;
16
17    public static final int CLAMP_TO_GROUND = 1;
18    public static final int RELATIVE_TO_GROUND = 2;
19    public static final int ABSOLUTE = 3;
20
21    public KMLPoint() {
22    }
23
24    public KMLCoord getCoord() {
25        return coord;
26    }
27
28    public void setCoord(KMLCoord coord) {
29        this.coord = coord;
30    }
31
32    public Sector getSector() {
33        if (sector == null) {
34            sector = Sector.fromDegrees(coord.lat-.01, coord.lat+.01, coord.lon-.01, coord.lon+.01);
35        }
36        return sector;
37    }
38
39    public int getAltitudeMode() {
40        return altitudeMode;
41    }
42
43    public void setAltitudeMode(int altitudeMode) {
44        this.altitudeMode = altitudeMode;
45    }
46}