NASA World Wind

gov.nasa.worldwind.terrain
Class AbstractElevationModel

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.terrain.AbstractElevationModel
All Implemented Interfaces:
AVList, ElevationModel, Restorable, WWObject, PropertyChangeListener, EventListener
Direct Known Subclasses:
BasicElevationModel, CompoundElevationModel, LocalElevationModel, ZeroElevationModel

public abstract class AbstractElevationModel
extends WWObjectImpl
implements ElevationModel


Field Summary
protected  double missingDataFlag
           
protected  double missingDataValue
           
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
AbstractElevationModel()
           
 
Method Summary
 double getDetailHint(Sector sector)
          Returns the detail hint associated with the specified sector.
 double getElevation(Angle latitude, Angle longitude)
          Returns the elevation at a specified location, or an unspecified value, typically zero, if an elevation cannot be determined.
 double getMissingDataReplacement()
           
 double getMissingDataSignal()
          Returns the current missing-data sentinel.
 String getName()
          Returns the elevation model's name, as specified in the most recent call to ElevationModel.setName(java.lang.String).
 String getRestorableState()
          Returns an XML document string describing the object’s state.
 boolean isNetworkRetrievalEnabled()
          Indicates whether the elevation model is allowed to retrieve data from the network.
 void restoreState(String stateInXml)
          Restores the object’s state to what is described in the specified XML document string.
 void setMissingDataReplacement(double missingDataValue)
           
 void setMissingDataSignal(double missingDataFlag)
          Specifies the value used to identify missing data in an elevation model.
 void setName(String name)
          Set the elevation model's name.
 void setNetworkRetrievalEnabled(boolean enabled)
          Controls whether the elevation model is allowed to retrieve data from the network.
 String toString()
           
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.globes.ElevationModel
contains, getBestResolution, getElevations, getExtremeElevations, getExtremeElevations, getMaxElevation, getMinElevation, getUnmappedElevation, intersects
 
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
 

Field Detail

missingDataFlag

protected double missingDataFlag

missingDataValue

protected double missingDataValue
Constructor Detail

AbstractElevationModel

public AbstractElevationModel()
Method Detail

getDetailHint

public double getDetailHint(Sector sector)
Description copied from interface: ElevationModel
Returns the detail hint associated with the specified sector. If the elevation model does not have any detail hint for the sector, this will return zero.

Specified by:
getDetailHint in interface ElevationModel
Parameters:
sector - the sector in question.
Returns:
The detail hint corresponding to the specified sector.

getElevation

public double getElevation(Angle latitude,
                           Angle longitude)
Description copied from interface: ElevationModel
Returns the elevation at a specified location, or an unspecified value, typically zero, if an elevation cannot be determined.

Specified by:
getElevation in interface ElevationModel
Parameters:
latitude - the latitude of the location in question.
longitude - the longitude of the location in question.
Returns:
The elevation corresponding to the specified location, or an elevation-model specific value if the elevation does not contain a value for the location or a value cannot be determined. (The value returned is typically zero, although the elevation model may choose to return some other value.)
See Also:
ElevationModel.setMissingDataSignal(double)

getMissingDataReplacement

public double getMissingDataReplacement()

getMissingDataSignal

public double getMissingDataSignal()
Description copied from interface: ElevationModel
Returns the current missing-data sentinel.

Specified by:
getMissingDataSignal in interface ElevationModel
Returns:
the missing-data sentinel, or null if no sentinel has been specified by either the application or the data set.

getName

public String getName()
Description copied from interface: ElevationModel
Returns the elevation model's name, as specified in the most recent call to ElevationModel.setName(java.lang.String).

Specified by:
getName in interface ElevationModel
Returns:
the elevation model's name.

getRestorableState

public String getRestorableState()
Description copied from interface: Restorable
Returns an XML document string describing the object’s state. This state can be restored later by calling restoreState and passing the XML document.

Specified by:
getRestorableState in interface Restorable
Returns:
an XML document string describing the object's state.

isNetworkRetrievalEnabled

public boolean isNetworkRetrievalEnabled()
Description copied from interface: ElevationModel
Indicates whether the elevation model is allowed to retrieve data from the network. Some elevation models have no need to retrieve data from the network. This state is meaningless for such elevation models.

Specified by:
isNetworkRetrievalEnabled in interface ElevationModel
Returns:
true if the elevation model is enabled to retrieve network data, else false.

restoreState

public void restoreState(String stateInXml)
Description copied from interface: Restorable
Restores the object’s state to what is described in the specified XML document string.

Specified by:
restoreState in interface Restorable
Parameters:
stateInXml - an XML document string describing an object's state.

setMissingDataReplacement

public void setMissingDataReplacement(double missingDataValue)

setMissingDataSignal

public void setMissingDataSignal(double missingDataFlag)
Description copied from interface: ElevationModel
Specifies the value used to identify missing data in an elevation model. Data entries with this value are treated as undefined. The sentinel value is often specified by the metadata of the data set, in which case the elevation model will define that value to be the missing-data sentinel. When ti's not specified in the metadata, the application may specify it via this method.

Specified by:
setMissingDataSignal in interface ElevationModel
Parameters:
missingDataFlag - a reference to the sentinel value. The default value is null, indicating that there is no missing-data sentinel and all data entry values are considered valid.

setName

public void setName(String name)
Description copied from interface: ElevationModel
Set the elevation model's name. The name is a convenience attribute typically used to identify the elevation model in user interfaces. By default, an elevation model has no name.

Specified by:
setName in interface ElevationModel
Parameters:
name - the name to assign to the elevation model.

setNetworkRetrievalEnabled

public void setNetworkRetrievalEnabled(boolean enabled)
Description copied from interface: ElevationModel
Controls whether the elevation model is allowed to retrieve data from the network. Some elevation models have no need for data from the network. This state may be set but is meaningless for such elevation models.

Specified by:
setNetworkRetrievalEnabled in interface ElevationModel
Parameters:
enabled - true if network retrieval is allowed, else false.

toString

public String toString()
Overrides:
toString in class Object

NASA World Wind