|
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.data.BasicRasterServer
public class BasicRasterServer
BasicRasterServer maintains a list of data sources and their properties in the BasicRasterServerCache and is used to compose (mosaic) a data raster of the given region of interest from data sources.
| Field Summary | |
|---|---|
protected static MemoryCache |
cache
|
protected List<DataRaster> |
dataRasterList
|
protected DataRasterReaderFactory |
readerFactory
|
protected String |
XPATH_RASTER_SERVER
|
protected String |
XPATH_RASTER_SERVER_PROPERTY
|
protected String |
XPATH_RASTER_SERVER_SOURCE
|
protected String |
XPATH_RASTER_SERVER_SOURCE_SECTOR
|
| Constructor Summary | |
|---|---|
BasicRasterServer(Object o,
AVList params)
BasicRasterServer constructor reads a list of data raster sources from *.RasterServer.xml (the file that accompanies layer description XML file), reads sector of each source and maintains a list of data sources, their properties, |
|
| Method Summary | |
|---|---|
DataRaster |
composeRaster(AVList reqParams)
Composes a DataRaster of the given width and height for the specific geographic region of interest (ROI). |
protected void |
extractProperties(Element domElement,
XPath xpath)
Extracts all |
protected DataRasterReader |
findDataRasterReader(Object source,
AVList params)
|
MemoryCache |
getCache()
Returns an instance of the MemoryCache that contains DataRasters and their properties |
protected String |
getDataSetName()
|
protected String |
getDataSetPixelFormat()
Returns DataSet's pixel format (AVKey.IMAGE or AVKey.ELEVATION), or empty string if not set |
ByteBuffer |
getRasterAsByteBuffer(AVList params)
Composes a DataRaster of the given width and height for the specific geographic region of interest (ROI), in the requested file format (AVKey.IMAGE_FORMAT) and returns as a ByteBuffer |
Sector |
getSector()
Returns a Geographic extend (coverage) of the composer |
boolean |
hasDataRasters()
Returns TRUE, if the DataRaster list is not empty |
protected void |
init(Object o)
|
protected boolean |
readRasterSources(Element domElement,
XPath xpath)
Reads XML document and extracts raster sources |
protected void |
setDataSetPixelFormat(String pixelFormat)
|
| 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, toString, wait, wait, wait |
| 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 |
| Field Detail |
|---|
protected static final MemoryCache cache
protected List<DataRaster> dataRasterList
protected DataRasterReaderFactory readerFactory
protected final String XPATH_RASTER_SERVER
protected final String XPATH_RASTER_SERVER_PROPERTY
protected final String XPATH_RASTER_SERVER_SOURCE
protected final String XPATH_RASTER_SERVER_SOURCE_SECTOR
| Constructor Detail |
|---|
public BasicRasterServer(Object o,
AVList params)
o - the RasterServer.xml source to read. May by a File, a file path, a URL or an
Elementparams - optional metadata associated with the data source that might be useful to the BasicRasterServer.| Method Detail |
|---|
public DataRaster composeRaster(AVList reqParams)
throws IllegalArgumentException,
WWRuntimeException
reqParams - This is a required parameter, must not be null or empty; Must contain AVKey.WIDTH, AVKey.HEIGHT,
and AVKey.SECTOR values.
Optional keys are: AVKey.PIXEL_FORMAT (AVKey.ELEVATION | AVKey.IMAGE) AVKey.DATA_TYPE
AVKey.BYTE_ORDER (AVKey.BIG_ENDIAN | AVKey.LITTLE_ENDIAN )
WWRuntimeException - if there is no intersection of the source rasters with the requested ROI or the
source format is unknown or not supported by currently loaded drivers
IllegalArgumentException - if any of the required parameters or values are missing
protected void extractProperties(Element domElement,
XPath xpath)
domElement - XML object as DOMxpath - XPath instance
protected DataRasterReader findDataRasterReader(Object source,
AVList params)
public MemoryCache getCache()
protected String getDataSetName()
protected String getDataSetPixelFormat()
public ByteBuffer getRasterAsByteBuffer(AVList params)
getRasterAsByteBuffer in interface RasterServerparams - This is a required parameter, must not be null or empty; Must contain AVKey.WIDTH, AVKey.HEIGHT,
AVKey.SECTOR, and AVKey.IMAGE_FORMAT (mime type) values. Supported mime types are: "image/png",
"image/jpeg", "image/dds".
Optional keys are: AVKey.PIXEL_FORMAT (AVKey.ELEVATION | AVKey.IMAGE) AVKey.DATA_TYPE
AVKey.BYTE_ORDER (AVKey.BIG_ENDIAN | AVKey.LITTLE_ENDIAN )
WWRuntimeException - if there is no intersection of the source rasters with the requested ROI or the
source format is unknown or not supported by currently loaded drivers
IllegalArgumentException - if any of the required parameters or values are missingpublic Sector getSector()
RasterServer
getSector in interface RasterServerpublic boolean hasDataRasters()
protected void init(Object o)
protected boolean readRasterSources(Element domElement,
XPath xpath)
domElement - DOM elementxpath - XPath instance
protected void setDataSetPixelFormat(String pixelFormat)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||