NASA World Wind WMS

gov.nasa.worldwind.servers.wms.generators
Class BILGenerator

java.lang.Object
  extended by gov.nasa.worldwind.servers.wms.generators.BILGenerator
All Implemented Interfaces:
MapGenerator

public class BILGenerator
extends java.lang.Object


Nested Class Summary
 class BILGenerator.BILServiceInstance
           
 class BILGenerator.TiledElevationMosaicer
           
 
Nested classes/interfaces inherited from interface gov.nasa.worldwind.servers.wms.MapGenerator
MapGenerator.ServiceInstance
 
Field Summary
static java.lang.String DATA_SOURCE_DESCRIPTOR
           
protected  boolean debug
           
static java.lang.Double DEFAULT_MISSING_DATA_COLOR
           
static double DEPTH_OF_MARIANAS_TRENCH
           
static short DTED_MISSING_DATA_COLOR
           
static double HEIGHT_OF_MT_EVEREST
           
protected  MapSource mapSource
           
static short SRTM_MISSING_DATA_COLOR
           
protected  java.lang.String threadId
           
static double WWCLIENT_MISSING_DATA_COLOR
           
 
Constructor Summary
BILGenerator()
           
 
Method Summary
protected static gov.nasa.worldwind.data.DataRaster createDataRaster(int width, int height, gov.nasa.worldwind.geom.Sector sector, gov.nasa.worldwind.avlist.AVList params)
           
 gov.nasa.worldwind.geom.Sector getBBox()
          Returns the bounding-box for the geospatial dataset managed by the MapGenerator instance.
 java.lang.String[] getCRS()
          Returns the coordinate-reference systems (CRS) that the MapGenerator is capable of using to generate map requests.
 java.lang.String getDataType()
          Returns 'true' if the MapSource returns imagery data, and 'false' for elevation data
 java.awt.image.BufferedImage getImageFromSource(java.lang.String sourceFile, gov.nasa.worldwind.geom.Sector extent, int width, int height)
           
 MapSource getMapSource()
           
 double getPixelSize()
           
 java.lang.String getPixelType(java.lang.String format)
           
protected  double getProperty(java.util.Properties props, java.lang.String key, double defaultVal, java.lang.String name)
           
protected  int getProperty(java.util.Properties props, java.lang.String key, int defaultVal, java.lang.String name)
           
protected  java.lang.String getProperty(java.util.Properties props, java.lang.String key, java.lang.String defaultVal, java.lang.String name)
           
 MapGenerator.ServiceInstance getServiceInstance()
          Called by the WMS to return an instance of ServiceInstance to field a GetMap request.
 java.lang.String getThreadId()
           
 boolean hasCoverage(gov.nasa.worldwind.geom.Sector sector)
          Returns 'true' if the MapSource has imagery or elevation available for a given sector.
 boolean initialize(MapSource mapSource)
          Gives the MapGenerator implementation an opportunity to perform any needed initialization, prior to fielding GetMap requests.
 java.awt.image.BufferedImage mosaic(java.io.File[] sourceFiles, gov.nasa.worldwind.geom.Sector extent, int width, int height, short srcNoData, short destNoData)
           
static java.nio.ByteBuffer readFileToBuffer(java.io.File file)
           
 void setMapSource(MapSource mapSource)
           
 void setThreadId(java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_SOURCE_DESCRIPTOR

public static final java.lang.String DATA_SOURCE_DESCRIPTOR
See Also:
Constant Field Values

DEFAULT_MISSING_DATA_COLOR

public static final java.lang.Double DEFAULT_MISSING_DATA_COLOR

DEPTH_OF_MARIANAS_TRENCH

public static double DEPTH_OF_MARIANAS_TRENCH

HEIGHT_OF_MT_EVEREST

public static double HEIGHT_OF_MT_EVEREST

DTED_MISSING_DATA_COLOR

public static final short DTED_MISSING_DATA_COLOR
See Also:
Constant Field Values

SRTM_MISSING_DATA_COLOR

public static final short SRTM_MISSING_DATA_COLOR
See Also:
Constant Field Values

WWCLIENT_MISSING_DATA_COLOR

public static final double WWCLIENT_MISSING_DATA_COLOR
See Also:
Constant Field Values

debug

protected boolean debug

mapSource

protected MapSource mapSource

threadId

protected java.lang.String threadId
Constructor Detail

BILGenerator

public BILGenerator()
Method Detail

getBBox

public gov.nasa.worldwind.geom.Sector getBBox()
Description copied from interface: MapGenerator
Returns the bounding-box for the geospatial dataset managed by the MapGenerator instance.

Returns:

getCRS

public java.lang.String[] getCRS()
Description copied from interface: MapGenerator
Returns the coordinate-reference systems (CRS) that the MapGenerator is capable of using to generate map requests.

Returns:

getPixelSize

public double getPixelSize()

getServiceInstance

public MapGenerator.ServiceInstance getServiceInstance()
Description copied from interface: MapGenerator
Called by the WMS to return an instance of ServiceInstance to field a GetMap request.

Returns:

initialize

public boolean initialize(MapSource mapSource)
                   throws java.io.IOException,
                          WMSServiceException
Description copied from interface: MapGenerator
Gives the MapGenerator implementation an opportunity to perform any needed initialization, prior to fielding GetMap requests. This typically includes extraction of any MapGenerator-specific properties that were given in the MapSource configuration. Called once at WMS start-up time.

Returns:
Throws:
java.io.IOException
WMSServiceException

getDataType

public java.lang.String getDataType()
Description copied from interface: MapGenerator
Returns 'true' if the MapSource returns imagery data, and 'false' for elevation data

Returns:

getPixelType

public java.lang.String getPixelType(java.lang.String format)
                              throws WMSServiceException
Throws:
WMSServiceException

mosaic

public java.awt.image.BufferedImage mosaic(java.io.File[] sourceFiles,
                                           gov.nasa.worldwind.geom.Sector extent,
                                           int width,
                                           int height,
                                           short srcNoData,
                                           short destNoData)

readFileToBuffer

public static java.nio.ByteBuffer readFileToBuffer(java.io.File file)
                                            throws java.io.IOException
Throws:
java.io.IOException

createDataRaster

protected static gov.nasa.worldwind.data.DataRaster createDataRaster(int width,
                                                                     int height,
                                                                     gov.nasa.worldwind.geom.Sector sector,
                                                                     gov.nasa.worldwind.avlist.AVList params)

getImageFromSource

public java.awt.image.BufferedImage getImageFromSource(java.lang.String sourceFile,
                                                       gov.nasa.worldwind.geom.Sector extent,
                                                       int width,
                                                       int height)

getMapSource

public MapSource getMapSource()
Specified by:
getMapSource in interface MapGenerator

getProperty

protected double getProperty(java.util.Properties props,
                             java.lang.String key,
                             double defaultVal,
                             java.lang.String name)

getProperty

protected int getProperty(java.util.Properties props,
                          java.lang.String key,
                          int defaultVal,
                          java.lang.String name)

getProperty

protected java.lang.String getProperty(java.util.Properties props,
                                       java.lang.String key,
                                       java.lang.String defaultVal,
                                       java.lang.String name)

getThreadId

public java.lang.String getThreadId()

hasCoverage

public boolean hasCoverage(gov.nasa.worldwind.geom.Sector sector)
Description copied from interface: MapGenerator
Returns 'true' if the MapSource has imagery or elevation available for a given sector. Technically you may compare your request sector with the Bounding Box, however USGS NED or USGS Urban do not have a continuous coverage within the bounding box.

Specified by:
hasCoverage in interface MapGenerator
Returns:

setMapSource

public void setMapSource(MapSource mapSource)
Specified by:
setMapSource in interface MapGenerator

setThreadId

public void setThreadId(java.lang.String prefix)

NASA World Wind WMS