/* Copyright (C) 2001, 2006 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved. */ package gov.nasa.worldwind.layers.Earth; import gov.nasa.worldwind.avlist.*; import gov.nasa.worldwind.geom.*; import gov.nasa.worldwind.layers.BasicTiledImageLayer; import gov.nasa.worldwind.util.*; /** * @author Patrick Murris * @version $Id$ */ public class BMNG2004Layer extends BasicTiledImageLayer { private int month; public BMNG2004Layer(int month) { super(makeLevels(month)); this.month = month; this.setForceLevelZeroLoads(true); this.setRetainLevelZeroTiles(true); } private static LevelSet makeLevels(int month) { AVList params = new AVListImpl(); String month2Digit = month > 9 ? Integer.toString(month) : "0" + month; params.setValue(AVKey.TILE_WIDTH, 512); params.setValue(AVKey.TILE_HEIGHT, 512); params.setValue(AVKey.DATA_CACHE_NAME, "Earth/BMNG/BMNG(Shaded + Bathymetry) Tiled - Version 1.1 - " + month + ".2004"); params.setValue(AVKey.SERVICE, "http://worldwind25.arc.nasa.gov/tile/tile.aspx"); params.setValue(AVKey.DATASET_NAME, "bmng.topo.bathy.2004" + month2Digit); params.setValue(AVKey.FORMAT_SUFFIX, ".dds"); params.setValue(AVKey.NUM_LEVELS, 5); params.setValue(AVKey.NUM_EMPTY_LEVELS, 0); params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36d), Angle.fromDegrees(36d))); params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE); return new LevelSet(params); } @Override public String toString() { String month2Digit = month > 9 ? Integer.toString(month) : "0" + month; return "NASA Blue Marble " + month2Digit + "-2004"; } }