NASA World Wind

gov.nasa.worldwind.terrain
Class ElevationModelConfiguration

java.lang.Object
  extended by gov.nasa.worldwind.BasicDataConfiguration
      extended by gov.nasa.worldwind.terrain.ElevationModelConfiguration
All Implemented Interfaces:
DataConfiguration

public class ElevationModelConfiguration
extends BasicDataConfiguration

An implementation of the DataConfiguration interface, which uses a ElevationModel configuration document as its backing store.


Field Summary
 
Fields inherited from class gov.nasa.worldwind.BasicDataConfiguration
dom, xpath
 
Constructor Summary
ElevationModelConfiguration(Element domElement)
          Creates an instance of ElevationModelConfiguration backed by a specified DOM Element.
 
Method Summary
static Document createBasicElevationModelDocument(AVList params)
          Creates a configuration document for the basic elevation model described by the specified params.
static Element createBasicElevationModelElements(AVList params, Element context)
          Appends basic elevation model parameters as elements to a specified context.
protected  DataConfiguration createChildConfigInfo(Element domElement)
           
static Element createElevationModelElements(AVList params, Element context)
          Appends elevation model parameters as elements to a specified context.
static Element createWMSBasicElevationModelElements(AVList params, Element context)
          Appends WMS basic elevation model parameters as elements to a specified context.
static AVList getBasicElevationModelParams(Element domElement, AVList params)
          Parses basic elevation model parameters from a specified DOM document.
static AVList getElevationModelParams(Element domElement, AVList params)
          Parses elevation model parameters from a specified DOM document.
 String getName()
          Returns the text content of the DisplayName element.
 String getType()
          Returns the string "ElevationModel".
 String getVersion()
          Returns the elevation model's version.
static AVList getWMSElevationModelParams(Capabilities caps, String[] formatOrderPreference, AVList params)
          Parses WMS elevation model parameters from a specified WMS Capabilities document.
static AVList getWMSElevationModelParams(Element domElement, AVList params)
          Parses WMS elevation model parameters from a specified DOM document.
static boolean isElevationModelDocument(Element domElement)
          Returns true if a specified DOM document should be accepted as an ElevationModel configuration document, and false otherwise.
 
Methods inherited from class gov.nasa.worldwind.BasicDataConfiguration
getBoolean, getChild, getChildren, getDouble, getInteger, getLatLon, getLong, getSector, getSectorResolutionLimit, getSource, getString, getStringArray, getTimeInMillis, getUniqueStrings, getXPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElevationModelConfiguration

public ElevationModelConfiguration(Element domElement)
Creates an instance of ElevationModelConfiguration backed by a specified DOM Element.

Parameters:
domElement - the backing DOM Element.
Method Detail

createBasicElevationModelDocument

public static Document createBasicElevationModelDocument(AVList params)
Creates a configuration document for the basic elevation model described by the specified params. This document's root element may be passed to a ElevationModelConfiguration constructor, and it may be passed to the constructor of a BasicElevationModel.

Parameters:
params - parameters describing the basic elevation model.
Returns:
a configuration document for the basic elevation model.

createBasicElevationModelElements

public static Element createBasicElevationModelElements(AVList params,
                                                        Element context)
Appends basic elevation model parameters as elements to a specified context. If a parameter key exists, that parameter is appended to the context. This also writes LevelSet parameters by invoking DataConfigurationUtils.createLevelSetElements(gov.nasa.worldwind.avlist.AVList, org.w3c.dom.Element). Supported key and element paths are:
KeyNameType
AVKey.SERVICE_NAMEService/@serviceNameString
AVKey.PIXEL_TYPEPixelTypeString
AVKey.BYTE_ORDERByteOrderString
AVKey.ELEVATION_EXTREMES_FILEExtremeElevations/FileNameString
AVKey.ELEVATION_MAXExtremeElevations/@maxDouble
AVKey.ELEVATION_MINExtremeElevations/@minDouble

Parameters:
params - the key-value pairs which define the basic elevation model parameters.
context - the XML document root on which to append parameter elements.
Returns:
a reference to context.
Throws:
IllegalArgumentException - if either the parameters or the context are null.

createChildConfigInfo

protected DataConfiguration createChildConfigInfo(Element domElement)
Overrides:
createChildConfigInfo in class BasicDataConfiguration

createElevationModelElements

public static Element createElevationModelElements(AVList params,
                                                   Element context)
Appends elevation model parameters as elements to a specified context. If a parameter key exists, that parameter is appended to the context. Supported key and element paths are:
KeyNameType
AVKey.DISPLAY_NAMEDisplayNameString
AVKey.NETWORK_RETRIEVAL_ENABLEDNetworkRetrievalEnabledBoolean
AVKey.MISSING_DATA_SIGNALMissingData/@signalDouble
AVKey.MISSING_DATA_REPLACEMENTMissingData/@replacementDouble
AVKey.DETAIL_HINTDataDetailHintDouble

Parameters:
params - the key-value pairs which define the elevation model parameters.
context - the XML document root on which to append parameter elements.
Returns:
a reference to context.
Throws:
IllegalArgumentException - if either the parameters or the context are null.

createWMSBasicElevationModelElements

public static Element createWMSBasicElevationModelElements(AVList params,
                                                           Element context)
Appends WMS basic elevation model parameters as elements to a specified context. If a parameter key exists, that parameter is appended to the context. This also writes common WMS layer elements by invoking DataConfigurationUtils.createWMSLayerElements(gov.nasa.worldwind.avlist.AVList, org.w3c.dom.Element).
KeyNameType
AVKey.PIXEL_TYPEPixelTypeString

Parameters:
params - the key-value pairs which define the WMS basic elevation model parameters.
context - the XML document root on which to append parameter elements.
Returns:
a reference to context.
Throws:
IllegalArgumentException - if either the parameters or the context are null.

getBasicElevationModelParams

public static AVList getBasicElevationModelParams(Element domElement,
                                                  AVList params)
Parses basic elevation model parameters from a specified DOM document. This also parses LevelSet parameters by invoking DataConfigurationUtils.getLevelSetParams(org.w3c.dom.Element, gov.nasa.worldwind.avlist.AVList). This writes output as key-value pairs to params. If a parameter from the XML document already exists in params, that parameter is ignored. Supported key and parameter names are:
KeyNameType
AVKey.SERVICE_NAMEService/@serviceNameString
AVKey.PIXEL_TYPEDataTypeString
AVKey.BYTE_ORDERDataType/@byteOrderString
AVKey.ELEVATION_EXTREMES_FILEExtremeElevations/FileNameString
AVKey.ELEVATION_MAXExtremeElevations/@maxDouble
AVKey.ELEVATION_MINExtremeElevations/@minDouble

Parameters:
domElement - the XML document root to parse for basic elevation model parameters.
params - the output key-value pairs which recieve the basic elevation model parameters. A null reference is permitted.
Returns:
a reference to params, or a new AVList if params is null.
Throws:
IllegalArgumentException - if the document is null.

getElevationModelParams

public static AVList getElevationModelParams(Element domElement,
                                             AVList params)
Parses elevation model parameters from a specified DOM document. This writes output as key-value pairs to params. If a parameter from the XML document already exists in params, that parameter is ignored. Supported key and parameter names are:
KeyNameType
AVKey.DISPLAY_NAMEDisplayNameString
AVKey.NETWORK_RETRIEVAL_ENABLEDNetworkRetrievalEnabledBoolean
AVKey.MISSING_DATA_SIGNALMissingData/@signalDouble
AVKey.MISSING_DATA_REPLACEMENTMissingData/@replacementDouble
AVKey.DETAIL_HINTDataDetailHintDouble

Parameters:
domElement - the XML document root to parse for elevaiton model parameters.
params - the output key-value pairs which recieve the elevation model parameters. A null reference is permitted.
Returns:
a reference to params, or a new AVList if params is null.
Throws:
IllegalArgumentException - if the document is null.

getName

public String getName()
Returns the text content of the DisplayName element.

Specified by:
getName in interface DataConfiguration
Overrides:
getName in class BasicDataConfiguration
Returns:
elevation model's display name.

getType

public String getType()
Returns the string "ElevationModel".

Specified by:
getType in interface DataConfiguration
Overrides:
getType in class BasicDataConfiguration
Returns:
"ElevationModel"

getVersion

public String getVersion()
Returns the elevation model's version.

Specified by:
getVersion in interface DataConfiguration
Overrides:
getVersion in class BasicDataConfiguration
Returns:
elevation model's version.

getWMSElevationModelParams

public static AVList getWMSElevationModelParams(Capabilities caps,
                                                String[] formatOrderPreference,
                                                AVList params)
Parses WMS elevation model parameters from a specified WMS Capabilities document. This also parses common WMS layer parameters by invoking DataConfigurationUtils.getWMSLayerParams(gov.nasa.worldwind.wms.Capabilities, String[], gov.nasa.worldwind.avlist.AVList). This writes output as key-value pairs to params. Supported key and parameter names are:
KeyValueType
AVKey.ELEVATION_MAXWMS layer's maximum extreme elevationDouble
AVKey.ELEVATION_MINWMS layer's minimum extreme elevationDouble
AVKey.PIXEL_TYPETranslate WMS layer's image format to a matching pixel typeString

Parameters:
caps - the WMS Capabilities document to parse for WMS layer 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 WMS layer 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.

getWMSElevationModelParams

public static AVList getWMSElevationModelParams(Element domElement,
                                                AVList params)
Parses WMS elevation model parameters from a specified DOM document. This also parses common WMS layer parameters by invoking DataConfigurationUtils.getWMSLayerParams(org.w3c.dom.Element, gov.nasa.worldwind.avlist.AVList). This writes output as key-value pairs to params. If a parameter from the XML document already exists in params, that parameter is ignored. Supported key and parameter names are:
KeyNameType
AVKey.PIXEL_TYPEPixelTypeString

Parameters:
domElement - the XML document root to parse for tiled image layer parameters.
params - the output key-value pairs which recieve the tiled image layer parameters. A null reference is permitted.
Returns:
a reference to params, or a new AVList if params is null.
Throws:
IllegalArgumentException - if the document is null.

isElevationModelDocument

public static boolean isElevationModelDocument(Element domElement)
Returns true if a specified DOM document should be accepted as an ElevationModel configuration document, and false otherwise.

Parameters:
domElement - the DOM document in question.
Returns:
true if the document is an ElevationModel configuration document; false otherwise.
Throws:
IllegalArgumentException - if document is null.

NASA World Wind

Hosted by docs.bugaco.com