NASA World Wind

gov.nasa.worldwind.terrain
Class WMSBasicElevationModel

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.terrain.AbstractElevationModel
              extended by gov.nasa.worldwind.terrain.BasicElevationModel
                  extended by gov.nasa.worldwind.terrain.WMSBasicElevationModel
All Implemented Interfaces:
AVList, Disposable, MessageListener, ElevationModel, Restorable, BulkRetrievable, WWObject, PropertyChangeListener, EventListener

public class WMSBasicElevationModel
extends BasicElevationModel


Nested Class Summary
protected static class WMSBasicElevationModel.CompositionRetrievalPostProcessor
           
protected static class WMSBasicElevationModel.URLBuilder
           
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.terrain.BasicElevationModel
BasicElevationModel.DownloadPostProcessor, BasicElevationModel.Elevations, BasicElevationModel.ElevationTile, BasicElevationModel.RequestTask
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.terrain.BasicElevationModel
detailHint, elevationDataByteOrder, elevationDataType, extremes, extremesLevel, extremesLookupCache, fileLock, levels, levelZeroTiles, maxElevation, memoryCache, minElevation, RESOURCE_ID_OGC_CAPABILITIES
 
Fields inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel
dataFileStore, enabled, expiryTime, missingDataFlag, missingDataValue, networkRetrievalEnabled
 
Constructor Summary
WMSBasicElevationModel(AVList params)
           
WMSBasicElevationModel(Element domElement, AVList params)
           
WMSBasicElevationModel(String restorableStateInXml)
           
WMSBasicElevationModel(WMSCapabilities caps, AVList params)
           
 
Method Summary
 void composeElevations(Sector sector, List<? extends LatLon> latlons, int tileWidth, double[] buffer)
          Determines the elevations at specified locations within a specified Sector.
protected  Document createConfigurationDocument(AVList params)
          Appends WMS basic elevation model configuration elements to the superclass configuration document.
protected  void downloadElevations(gov.nasa.worldwind.terrain.WMSBasicElevationModel.ElevationCompositionTile tile)
           
 void getRestorableStateForAVPair(String key, Object value, RestorableSupport rs, RestorableSupport.StateObject context)
           
static AVList getWMSElevationModelConfigParams(WMSCapabilities caps, String[] formatOrderPreference, AVList params)
          Parses WMSBasicElevationModel configuration parameters from a specified WMS Capabilities source.
protected static AVList wmsGetParamsFromCapsDoc(WMSCapabilities caps, AVList params)
           
protected static AVList wmsGetParamsFromDocument(Element domElement, AVList params)
           
protected static AVList wmsRestorableStateToParams(String stateInXml)
           
protected static void wmsRestoreStateForParams(RestorableSupport rs, RestorableSupport.StateObject context, AVList params)
           
protected static void wmsSetFallbacks(AVList params)
           
 
Methods inherited from class gov.nasa.worldwind.terrain.BasicElevationModel
addTileToCache, areElevationsInMemory, checkElevationExpiration, checkElevationExpiration, computeExtremeElevations, contains, convertImageToElevations, createBasicElevationModelConfigDocument, createBasicElevationModelConfigElements, createMemoryCache, createTile, determineExtremes, doGetRestorableState, doRestoreState, doRestoreStateForObject, downloadElevations, downloadElevations, doWriteConfigurationParams, generateExtremeElevations, getBasicElevationModelConfigParams, getBestResolution, getConfigurationParams, getDetailHint, getElevationDataByteOrder, getElevationDataType, getElevations, getElevations, getElevations, getEstimatedMissingDataSize, getEstimatedMissingDataSize, getExtremeElevations, getExtremeElevations, getExtremes, getExtremesLevel, getExtremesLookupCache, getLevels, getLevelZeroTiles, getLocalDataAvailability, getMaxElevation, getMemoryCache, getMinElevation, getRestorableState, getTargetLevel, getTileFromMemory, getUnmappedElevation, getUnmappedElevations, getValue, initFromOGCCapabilitiesResource, intersects, isFileExpired, isRetrieveResources, isTileLocalOrAbsent, loadElevations, loadExtremeElevations, lookupElevation, makeLocal, makeLocal, needsConfigurationFile, readElevations, requestTile, restorableStateToParams, restoreState, restoreStateForParams, retrieveElevations, retrieveLocalElevations, retrieveRemoteElevations, retrieveResources, setByteOrder, setDetailHint, setElevationDataType, setExpiryTime, setFallbacks, setValue, startResourceRetrieval, writeConfigurationFile, writeConfigurationParams
 
Methods inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel
createElevationModelConfigElements, dispose, getDataFileStore, getElevation, getElevationModelConfigParams, getExpiryTime, getMissingDataReplacement, getMissingDataSignal, getName, isElevationModelConfigDocument, isEnabled, isNetworkRetrievalEnabled, isTransparentValue, setDataFileStore, setEnabled, setMissingDataReplacement, setMissingDataSignal, setName, setNetworkRetrievalEnabled, 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, getStringValue, getStringValue, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, 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.retrieve.BulkRetrievable
getName
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
 

Constructor Detail

WMSBasicElevationModel

public WMSBasicElevationModel(AVList params)

WMSBasicElevationModel

public WMSBasicElevationModel(Element domElement,
                              AVList params)

WMSBasicElevationModel

public WMSBasicElevationModel(String restorableStateInXml)

WMSBasicElevationModel

public WMSBasicElevationModel(WMSCapabilities caps,
                              AVList params)
Method Detail

composeElevations

public void composeElevations(Sector sector,
                              List<? extends LatLon> latlons,
                              int tileWidth,
                              double[] buffer)
                       throws Exception
Description copied from interface: ElevationModel
Determines the elevations at specified locations within a specified Sector.

Specified by:
composeElevations in interface ElevationModel
Overrides:
composeElevations in class AbstractElevationModel
Parameters:
sector - 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.
Throws:
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.

createConfigurationDocument

protected Document createConfigurationDocument(AVList params)
Appends WMS basic elevation model configuration elements to the superclass configuration document.

Overrides:
createConfigurationDocument in class BasicElevationModel
Parameters:
params - configuration parameters describing this WMS basic elevation model.
Returns:
a WMS basic elevation model configuration document.

downloadElevations

protected void downloadElevations(gov.nasa.worldwind.terrain.WMSBasicElevationModel.ElevationCompositionTile tile)
                           throws Exception
Throws:
Exception

getRestorableStateForAVPair

public void getRestorableStateForAVPair(String key,
                                        Object value,
                                        RestorableSupport rs,
                                        RestorableSupport.StateObject context)
Overrides:
getRestorableStateForAVPair in class BasicElevationModel

getWMSElevationModelConfigParams

public static AVList getWMSElevationModelConfigParams(WMSCapabilities caps,
                                                      String[] formatOrderPreference,
                                                      AVList params)
Parses WMSBasicElevationModel configuration parameters from a specified WMS Capabilities source. This writes output as key-value pairs to params. Supported key and parameter names are:
ParameterValueType
AVKey.ELEVATION_MAXWMS layer's maximum extreme elevationDouble
AVKey.ELEVATION_MINWMS layer's minimum extreme elevationDouble
AVKey.DATA_TYPETranslate WMS layer's image format to a matching data typeString
This also parses common WMS layer parameters by invoking DataConfigurationUtils.getWMSLayerConfigParams(gov.nasa.worldwind.ogc.wms.WMSCapabilities, String[], gov.nasa.worldwind.avlist.AVList).

Parameters:
caps - the WMS Capabilities source to parse for WMSBasicElevationModel configuration parameters.
formatOrderPreference - an ordered array of preferred image formats, or null to use the default format.
params - the output key-value pairs which recieve the WMSBasicElevationModel configuration parameters.
Returns:
a reference to params.
Throws:
IllegalArgumentException - if either the document or params are null, or if params does not contain the required key-value pairs.
WWRuntimeException - if the Capabilities document does not contain any of the required information.

wmsGetParamsFromCapsDoc

protected static AVList wmsGetParamsFromCapsDoc(WMSCapabilities caps,
                                                AVList params)

wmsGetParamsFromDocument

protected static AVList wmsGetParamsFromDocument(Element domElement,
                                                 AVList params)

wmsRestorableStateToParams

protected static AVList wmsRestorableStateToParams(String stateInXml)

wmsRestoreStateForParams

protected static void wmsRestoreStateForParams(RestorableSupport rs,
                                               RestorableSupport.StateObject context,
                                               AVList params)

wmsSetFallbacks

protected static void wmsSetFallbacks(AVList params)

NASA World Wind