NASA World Wind

gov.nasa.worldwind.globes
Interface ElevationModel

All Superinterfaces:
AVList, EventListener, PropertyChangeListener, WWObject
All Known Implementing Classes:
BasicElevationModel, EarthElevationModel, MarsElevationModel, MoonElevationModel

public interface ElevationModel
extends WWObject

Provides the elevations of all points on a Globe . Every Globe has an elevation model implementing this interface.

Elevations are organized by Sector. Elevation models return an ElevationModel.Elevations object for requested sectors. This object is then used to query elevations at latitude/longitude positions within that sector.

An ElevationModel typically approximates elevations at multiple levels of spatial resolution. For any given viewing position the model determines an appropriate target resolution. That target resolution may not be immediately achievable, however, because the corresponding elevation data might not be locally available and must be retrieved from a remote location. When this is the case, the Elevations object returned for a sector holds the resolution achievable with the data currently available. That resolution may not be the same as the target resolution. The target resolution and the actual resolution are made available in the interface so that users of this class may use the resolution values to compare previously computed elevation sectors with newly computed ones, and thereby enable effective caching of elevations computed for the sector.


Nested Class Summary
static interface ElevationModel.Elevations
          The Elevations interface provides elevations at specified latitude and longitude positions.
 
Method Summary
 Double getBestElevation(Angle latitude, Angle longitude)
           
 ElevationModel.Elevations getBestElevations(Sector sector)
           
 double getElevation(Angle latitude, Angle longitude)
           
 Double getElevationAtResolution(Angle latitude, Angle longitude, int resolution)
           
 ElevationModel.Elevations getElevations(Sector sector, int resolution)
          Computes and returns an ElevationModel.Elevations object for the specified Sector and target resolution.
 ElevationModel.Elevations getElevationsAtResolution(Sector sector, int resolution)
           
 double getMaxElevation()
          Returns the maximum elevation contained in the elevevation model.
 double[] getMinAndMaxElevations(Sector sector)
           
 double getMinElevation()
          Returns the minimum elevation contained in the elevevation model.
 int getTargetResolution(DrawContext dc, Sector sector, int density)
          Returns the resolution appropriate to the given Sector and view parameters.
 int getTargetResolution(Globe globe, double size)
           
 int getTileCountAtResolution(Sector sector, int resolution)
           
 boolean isEnabled()
           
 void setEnabled(boolean enable)
           
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Method Detail

getBestElevation

Double getBestElevation(Angle latitude,
                        Angle longitude)

getBestElevations

ElevationModel.Elevations getBestElevations(Sector sector)

getElevation

double getElevation(Angle latitude,
                    Angle longitude)

getElevationAtResolution

Double getElevationAtResolution(Angle latitude,
                                Angle longitude,
                                int resolution)

getElevations

ElevationModel.Elevations getElevations(Sector sector,
                                        int resolution)
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.

Parameters:
sector - the sector to return elevations for.
resolution - a value interpreted in a class-specific way by implementing classes.
Returns:
An object representing the elevations for the specified sector. Its resolution value will be either the specified resolution or the best available alternative.

getElevationsAtResolution

ElevationModel.Elevations getElevationsAtResolution(Sector sector,
                                                    int resolution)

getMaxElevation

double getMaxElevation()
Returns the maximum elevation contained in the elevevation model. This value is the height of the highest point on the globe.

Returns:
The maximum elevation of the model

getMinAndMaxElevations

double[] getMinAndMaxElevations(Sector sector)

getMinElevation

double getMinElevation()
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.)

Returns:
The minimum elevation of the model

getTargetResolution

int getTargetResolution(DrawContext dc,
                        Sector sector,
                        int density)
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 getElevations(Sector, int) when a sector's resolutions are queried.

Parameters:
dc - the draw context to read the view and rendering parameters from.
sector - the Sector to compute the target resolution for.
Returns:
The appropriate resolution for the sector and draw context values.

getTargetResolution

int getTargetResolution(Globe globe,
                        double size)

getTileCountAtResolution

int getTileCountAtResolution(Sector sector,
                             int resolution)

isEnabled

boolean isEnabled()

setEnabled

void setEnabled(boolean enable)

NASA World Wind