NASA World Wind

gov.nasa.worldwind
Class BasicElevationModel

java.lang.Object
  extended by gov.nasa.worldwind.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.BasicElevationModel
All Implemented Interfaces:
AVList, ElevationModel, WWObject, PropertyChangeListener, EventListener
Direct Known Subclasses:
EarthElevationModel

public class BasicElevationModel
extends WWObjectImpl
implements ElevationModel

This class represents a single tile in the data set and contains the information that needs to be cached.


Nested Class Summary
 
Nested classes/interfaces inherited from interface gov.nasa.worldwind.ElevationModel
ElevationModel.Elevations
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.AVListImpl
changeSupport
 
Constructor Summary
BasicElevationModel(LevelSet levels, double minElevation, double maxElevation)
           
 
Method Summary
 double getElevation(Angle latitude, Angle longitude)
           
 ElevationModel.Elevations getElevations(Sector sector, int resolution)
          Computes and returns an ElevationModel.Elevations object for the specified Sector and target resolution.
 LevelSet getLevels()
           
 double getMaximumElevation()
          Returns the maximum elevation contained in the elevevation model.
 double getMinimumElevation()
          Returns the minimum elevation contained in the elevevation model.
 long getNumExpectedValuesPerTile()
           
 int getTargetResolution(DrawContext dc, Sector sector, int density)
          Returns the resolution appropriate to the given Sector and view parameters.
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 void setNumExpectedValuesPerTile(long numExpectedValues)
           
 
Methods inherited from class gov.nasa.worldwind.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, propertyChange, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.AVList
addPropertyChangeListener, addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, getStringValue, getValue, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

BasicElevationModel

public BasicElevationModel(LevelSet levels,
                           double minElevation,
                           double maxElevation)
Parameters:
levels -
minElevation -
maxElevation -
Throws:
IllegalArgumentException - if levels is null or invalid
Method Detail

getElevation

public final double getElevation(Angle latitude,
                                 Angle longitude)
Specified by:
getElevation in interface ElevationModel
Parameters:
latitude -
longitude -
Returns:
Throws:
IllegalArgumentException - if latitude or longitude is null

getElevations

public final ElevationModel.Elevations getElevations(Sector sector,
                                                     int resolution)
Description copied from interface: ElevationModel
Computes and returns an ElevationModel.Elevations object for the specified Sector and target resolution. If the target resolution can not currently be achieved, the best available elevations are returned.

Implementing classes of ElevationModel interpret resolution in a class-specific way. See the descriptions of those classes to learn their use of this value. The elevations returned are in the form of an ElevationModel.Elevations object. Specific elevations are returned by that object.

Specified by:
getElevations in interface ElevationModel
Parameters:
sector -
resolution -
Returns:
Throws:
IllegalArgumentException - if sector is null

getLevels

public LevelSet getLevels()

getMaximumElevation

public final double getMaximumElevation()
Description copied from interface: ElevationModel
Returns the maximum elevation contained in the elevevation model. This value is the height of the highest point on the globe.

Specified by:
getMaximumElevation in interface ElevationModel
Returns:
The maximum elevation of the model

getMinimumElevation

public final double getMinimumElevation()
Description copied from interface: ElevationModel
Returns the minimum elevation contained in the elevevation model. This value is the height of the lowest point on the globe. It may be negative, indicating a value below mean surface level. (Sea level in the case of Earth.)

Specified by:
getMinimumElevation in interface ElevationModel
Returns:
The minimum elevation of the model

getNumExpectedValuesPerTile

public long getNumExpectedValuesPerTile()

getTargetResolution

public final int getTargetResolution(DrawContext dc,
                                     Sector sector,
                                     int density)
Description copied from interface: ElevationModel
Returns the resolution appropriate to the given Sector and view parameters. The view parameters are read from the specified DrawContext. Implementing classes of ElevationModel interpret resolution in class-specific ways. See the descriptions of subclasses to learn their use of this value. This method is used to determine the resolution the model will use if all resources are available to compute that resolution. It is subsequently passed to ElevationModel.getElevations(Sector, int) when a sector's resolutions are queried.

Specified by:
getTargetResolution in interface ElevationModel
Parameters:
dc -
sector -
density -
Returns:
Throws:
IllegalArgumentException - if dc is null, sector is null or density is negative

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface ElevationModel

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface ElevationModel

setNumExpectedValuesPerTile

public void setNumExpectedValuesPerTile(long numExpectedValues)

NASA World Wind