|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.terrain.AbstractElevationModel
public abstract class AbstractElevationModel
| Field Summary | |
|---|---|
protected FileStore |
dataFileStore
|
protected boolean |
enabled
|
protected long |
expiryTime
|
protected double |
missingDataFlag
|
protected double |
missingDataValue
|
protected boolean |
networkRetrievalEnabled
|
| Constructor Summary | |
|---|---|
AbstractElevationModel()
|
|
| Method Summary | |
|---|---|
void |
composeElevations(Sector sector,
List<? extends LatLon> latlons,
int tileWidth,
double[] buffer)
Determines the elevations at specified locations within a specified Sector. |
static Element |
createElevationModelConfigElements(AVList params,
Element context)
Appends elevation model configuration parameters as elements to the specified context. |
void |
dispose()
Disposes of any internal resources allocated by the object. |
FileStore |
getDataFileStore()
|
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. |
static AVList |
getElevationModelConfigParams(Element domElement,
AVList params)
Parses elevation model configuration parameters from the specified DOM document. |
long |
getExpiryTime()
Returns the current expiry time. |
double |
getLocalDataAvailability(Sector sector,
Double targetResolution)
Returns the proportion of this elevation model's data that is local -- in the computer's data cache or installed data filestore -- for a specified sector and target resolution. |
double |
getMissingDataReplacement()
Returns the elevation used for missing values in the elevation model. |
double |
getMissingDataSignal()
Returns the current missing-data signal. |
String |
getName()
Returns the elevation model's name. |
String |
getRestorableState()
Returns an XML document string describing the object's state. |
static boolean |
isElevationModelConfigDocument(Element domElement)
Returns true if a specified DOM document is an ElevationModel configuration document, and false otherwise. |
boolean |
isEnabled()
Indicates whether this elevation model is used or ignored. |
boolean |
isNetworkRetrievalEnabled()
Indicates whether the elevation model is allowed to retrieve data from the network. |
protected boolean |
isTransparentValue(Double value)
|
void |
restoreState(String stateInXml)
Restores the object's state to what is described in the specified XML document string. |
void |
setDataFileStore(FileStore dataFileStore)
|
void |
setEnabled(boolean enabled)
Indicates whether this elevation model is used or ignored. |
void |
setExpiryTime(long expiryTime)
Specifies the time of the elevation model's most recent dataset update. |
void |
setMissingDataReplacement(double missingDataValue)
Specifies the elevation used for missing values in the elevation model. |
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 |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, 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, getUnmappedElevations, 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 |
| Methods inherited from interface gov.nasa.worldwind.event.MessageListener |
|---|
onMessage |
| Field Detail |
|---|
protected FileStore dataFileStore
protected boolean enabled
protected long expiryTime
protected double missingDataFlag
protected double missingDataValue
protected boolean networkRetrievalEnabled
| Constructor Detail |
|---|
public AbstractElevationModel()
| Method Detail |
|---|
public void composeElevations(Sector sector,
List<? extends LatLon> latlons,
int tileWidth,
double[] buffer)
throws Exception
ElevationModelSector.
composeElevations in interface ElevationModelsector - the sector containing the locations.latlons - the locations for which to return elevations.tileWidth - the number of locations that comprise one row in the latlons argument.buffer - a buffer in which to put the elevations. The buffer must have at least as many elements as the
number of specified locations.
Exception - if the method fails. Different elevation models may fail for different reasons.
IllegalArgumentException - if either the sector, list of locations or buffer is null, if the buffer size is
not at least as large as the location list, or the tile width is greater than
the locations list length or less than 1.
public static Element createElevationModelConfigElements(AVList params,
Element context)
| Parameter | Element Path | Type |
AVKey.DISPLAY_NAME | DisplayName | String |
AVKey.NETWORK_RETRIEVAL_ENABLED | NetworkRetrievalEnabled | Boolean |
AVKey.MISSING_DATA_SIGNAL | MissingData/@signal | Double |
AVKey.MISSING_DATA_REPLACEMENT | MissingData/@replacement | Double |
AVKey.DETAIL_HINT | DataDetailHint | Double |
params - the key-value pairs which define the elevation model configuration parameters.context - the XML document root on which to append elevation model configuration elements.
IllegalArgumentException - if either the parameters or the context are null.public void dispose()
Disposable
dispose in interface Disposablepublic FileStore getDataFileStore()
public double getDetailHint(Sector sector)
ElevationModel
getDetailHint in interface ElevationModelsector - the sector in question.
public double getElevation(Angle latitude,
Angle longitude)
ElevationModel
getElevation in interface ElevationModellatitude - the latitude of the location in question.longitude - the longitude of the location in question.
ElevationModel.setMissingDataSignal(double),
ElevationModel.getUnmappedElevation(gov.nasa.worldwind.geom.Angle, gov.nasa.worldwind.geom.Angle)
public static AVList getElevationModelConfigParams(Element domElement,
AVList params)
| Parameter | Element Path | Type |
AVKey.DISPLAY_NAME | DisplayName | String |
AVKey.NETWORK_RETRIEVAL_ENABLED | NetworkRetrievalEnabled | Boolean |
AVKey.MISSING_DATA_SIGNAL | MissingData/@signal | Double |
AVKey.MISSING_DATA_REPLACEMENT | MissingData/@replacement | Double |
AVKey.DETAIL_HINT | DataDetailHint | Double |
domElement - the XML document root to parse for elevation model configuration elements.params - the output key-value pairs which recieve the elevation model configuration parameters. A null
reference is permitted.
IllegalArgumentException - if the document is null.public long getExpiryTime()
ElevationModel
getExpiryTime in interface ElevationModelElevationModel.setExpiryTime(long)
public double getLocalDataAvailability(Sector sector,
Double targetResolution)
ElevationModel
getLocalDataAvailability in interface ElevationModelsector - the sector of interest.targetResolution - the desired horizontal resolution, in radians, of the raster or other elevation sample
from which elevations are drawn. (To compute radians from a distance, divide the distance
by the radius of the globe, ensuring that both the distance and the radius are in the
same units.) Specify null to use this elevation model's best resolution.
public double getMissingDataReplacement()
ElevationModel
getMissingDataReplacement in interface ElevationModelElevationModel.setMissingDataSignal(double),
ElevationModel.getMissingDataSignal()public double getMissingDataSignal()
ElevationModel
getMissingDataSignal in interface ElevationModelElevationModel.getMissingDataReplacement()public String getName()
ElevationModel
getName in interface ElevationModelElevationModel.setName(String)public String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface Restorablepublic static boolean isElevationModelConfigDocument(Element domElement)
domElement - the DOM document in question.
IllegalArgumentException - if document is null.public boolean isEnabled()
ElevationModel
isEnabled in interface ElevationModelpublic boolean isNetworkRetrievalEnabled()
ElevationModel
isNetworkRetrievalEnabled in interface ElevationModeltrue if the elevation model is enabled to retrieve network data, else false.protected boolean isTransparentValue(Double value)
public void restoreState(String stateInXml)
Restorable
restoreState in interface RestorablestateInXml - an XML document string describing an object's state.public void setDataFileStore(FileStore dataFileStore)
public void setEnabled(boolean enabled)
ElevationModel
setEnabled in interface ElevationModelenabled - true if this elevation model is used, otherwise false.public void setExpiryTime(long expiryTime)
ElevationModel
setExpiryTime in interface ElevationModelexpiryTime - the expiry time of any cached data, expressed as a number of milliseconds beyond the epoch.for a description of milliseconds beyond the epoch.public void setMissingDataReplacement(double missingDataValue)
ElevationModel
setMissingDataReplacement in interface ElevationModelmissingDataValue - the value that indicates that no data is available at a location.ElevationModel.setMissingDataSignal(double)public void setMissingDataSignal(double missingDataFlag)
ElevationModelElevationModel.setMissingDataReplacement(double).
The missing-data value is often specified by the metadata of the data set, in which case the elevation model
automatically defines that value to be the missing-data signal. When the missing-data signal is not specified in
the metadata, the application may specify it via this method.
setMissingDataSignal in interface ElevationModelmissingDataFlag - the missing-data signal value. The default is -Double.MAX_VALUE.ElevationModel.setMissingDataReplacement(double),
ElevationModel.getMissingDataSignal()public void setName(String name)
ElevationModel
setName in interface ElevationModelname - the name to give the elevation model.public void setNetworkRetrievalEnabled(boolean enabled)
ElevationModel
setNetworkRetrievalEnabled in interface ElevationModelenabled - true if network retrieval is allowed, else false.public String toString()
toString in class Object
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||