2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
7 package gov
.nasa
.worldwind
.globes
;
9 import gov
.nasa
.worldwind
.avlist
.*;
10 import gov
.nasa
.worldwind
.geom
.*;
11 import gov
.nasa
.worldwind
.util
.LevelSet
;
12 import gov
.nasa
.worldwind
.Configuration
;
16 * @version $Id: EarthElevationModel.java 2664 2007-08-23 22:17:25Z tgaskins $
18 public class EarthElevationModel
extends BasicElevationModel
20 private static double HEIGHT_OF_MT_EVEREST
= 8850d
; // meters
21 private static double DEPTH_OF_MARIANAS_TRENCH
= -11000d
; // meters
23 public EarthElevationModel()
25 super(makeLevels(), DEPTH_OF_MARIANAS_TRENCH
, HEIGHT_OF_MT_EVEREST
);
26 this.setNumExpectedValuesPerTile(22500);
27 String extremesFileName
=
28 Configuration
.getStringValue("gov.nasa.worldwind.avkey.ExtremeElevations.SRTM30Plus.FileName");
29 if (extremesFileName
!= null)
30 this.loadExtremeElevations(extremesFileName
);
33 private static LevelSet
makeLevels()
35 AVList params
= new AVListImpl();
37 params
.setValue(AVKey
.TILE_WIDTH
, 150);
38 params
.setValue(AVKey
.TILE_HEIGHT
, 150);
39 params
.setValue(AVKey
.DATA_CACHE_NAME
, "Earth/srtm30pluszip");
40 params
.setValue(AVKey
.SERVICE
, "http://worldwind25.arc.nasa.gov/wwelevation/wwelevation.aspx");
41 params
.setValue(AVKey
.DATASET_NAME
, "srtm30pluszip");
42 params
.setValue(AVKey
.FORMAT_SUFFIX
, ".bil");
43 params
.setValue(AVKey
.NUM_LEVELS
, 10);
44 params
.setValue(AVKey
.NUM_EMPTY_LEVELS
, 0);
45 params
.setValue(AVKey
.LEVEL_ZERO_TILE_DELTA
, new LatLon(Angle
.fromDegrees(20d
), Angle
.fromDegrees(20d
)));
46 params
.setValue(AVKey
.SECTOR
, Sector
.FULL_SPHERE
);
47 params
.setValue(AVKey
.SECTOR_RESOLUTION_LIMITS
, new LevelSet
.SectorResolution
[]
49 new LevelSet
.SectorResolution(Sector
.fromDegrees(24, 50, -125, -66.8), 9), // CONUS
50 new LevelSet
.SectorResolution(Sector
.fromDegrees(18.5, 22.5, -160.5, -154.5), 9), // HI
51 new LevelSet
.SectorResolution(Sector
.fromDegrees(17.8, 18.7, -67.4, -64.5), 9), // PR, VI
52 new LevelSet
.SectorResolution(Sector
.fromDegrees(48, 108, -179.9, -128), 9), // AK
53 new LevelSet
.SectorResolution(Sector
.fromDegrees(-54, 60, -180, 180), 8), // SRTM3
54 new LevelSet
.SectorResolution(Sector
.FULL_SPHERE
, 4) // SRTM30Plus
57 return new LevelSet(params
);