/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

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