|
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.layers.AbstractLayer
gov.nasa.worldwind.layers.RenderableLayer
gov.nasa.worldwind.layers.SurfaceImageLayer
public class SurfaceImageLayer
Displays a collecion of local images on the globe.
| Field Summary | |
|---|---|
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList<SurfaceImage>> |
imageTable
|
protected ImageTiler |
imageTiler
|
| Fields inherited from class gov.nasa.worldwind.layers.RenderableLayer |
|---|
delegateOwner, pickSupport |
| Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
changeSupport |
| Constructor Summary | |
|---|---|
SurfaceImageLayer()
|
|
| Method Summary | |
|---|---|
void |
addImage(java.lang.String imagePath)
Add an image to the collection, reprojecting it to geographic (latitude & longitude) coordinates if necessary. |
void |
addImage(java.lang.String name,
java.awt.image.BufferedImage image,
java.util.List<? extends LatLon> corners)
Add a BufferedImage to the collection at an explicitly specified location. |
void |
addImage(java.lang.String name,
java.awt.image.BufferedImage image,
Sector sector)
Add a BufferedImage to the collection at an explicitly specified location. |
void |
addImage(java.lang.String imagePath,
java.util.List<? extends LatLon> corners)
Add an image to the collection at an explicitly specified location. |
void |
addImage(java.lang.String imagePath,
Sector sector)
Add an image to the collection at an explicitly specified location. |
java.awt.image.BufferedImage |
composeImageForSector(Sector sector,
int canvasWidth,
int canvasHeight,
double aspectRatio,
java.awt.image.BufferedImage image)
Create an image for the portion of this layer lying within a specified sector. |
void |
dispose()
Disposes the contents of this layer's internal Renderable collection, but does not remove any elements from that collection. |
int |
getNumImages()
|
void |
removeImage(java.lang.String imagePath)
|
void |
setOpacity(double opacity)
Opacity is not applied to layers of this type because each renderable typically has its own opacity control. |
| Methods inherited from class gov.nasa.worldwind.layers.RenderableLayer |
|---|
addRenderable, addRenderables, clearRenderables, disposeRenderables, doPick, doPick, doPreRender, doPreRender, doRender, doRender, getActiveRenderables, getDelegateOwner, getNumRenderables, getOpacity, getRenderables, removeAllRenderables, removeRenderable, setRenderables, toString |
| Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
|---|
getDataFileStore, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setPickEnabled, setScreenCredit |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, 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.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 |
| Field Detail |
|---|
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList<SurfaceImage>> imageTable
protected ImageTiler imageTiler
| Constructor Detail |
|---|
public SurfaceImageLayer()
| Method Detail |
|---|
public void addImage(java.lang.String imagePath)
throws java.io.IOException
imagePath - the path to the image file.
java.lang.IllegalArgumentException - if the image path is null.
java.io.IOException - if an error occurs reading the image file.
java.lang.IllegalStateException - if an error occurs while reprojecting or otherwise processing the image.
WWRuntimeException - if the image type is unsupported.
public void addImage(java.lang.String name,
java.awt.image.BufferedImage image,
java.util.List<? extends LatLon> corners)
BufferedImage to the collection at an explicitly specified location. The image is assumed to be in
geographic projection (latitude & longitude).
name - a unique name to associate with the image so that it can be subsequently referred to without
having to keep a reference to the image itself. Use this name in calls to removeImage(java.lang.String).image - the image to add.corners - the geographic location of the image's corners, specified in order of lower-left, lower-right,
upper-right, lower-left.
java.lang.IllegalArgumentException - if the image path is null, the corners list is null, contains null values or
fewer than four locations.
WWRuntimeException - if the image type is unsupported.
public void addImage(java.lang.String name,
java.awt.image.BufferedImage image,
Sector sector)
BufferedImage to the collection at an explicitly specified location. The image is assumed to be in
geographic projection (latitude & longitude).
name - a unique name to associate with the image so that it can be subsequently referred to without having
to keep a reference to the image itself. Use this name in calls to removeImage(java.lang.String).image - the image to add.sector - the geographic location of the image.
java.lang.IllegalArgumentException - if the image path or sector is null.
WWRuntimeException - if the image type is unsupported.
public void addImage(java.lang.String imagePath,
java.util.List<? extends LatLon> corners)
throws java.io.IOException
imagePath - the path to the image file.corners - the geographic location of the image's corners, specified in order of lower-left, lower-right,
upper-right, lower-left.
java.lang.IllegalArgumentException - if the image path or sector is null.
java.io.IOException - if an error occurs reading the image file.
WWRuntimeException - if the image type is unsupported.
public void addImage(java.lang.String imagePath,
Sector sector)
throws java.io.IOException
imagePath - the path to the image file.sector - the geographic location of the image.
java.lang.IllegalArgumentException - if the image path or sector is null.
java.io.IOException - if an error occurs reading the image file.
WWRuntimeException - if the image type is unsupported.
public java.awt.image.BufferedImage composeImageForSector(Sector sector,
int canvasWidth,
int canvasHeight,
double aspectRatio,
java.awt.image.BufferedImage image)
sector - the sector of interest.canvasWidth - the width of the canvas.canvasHeight - the height of the canvas.aspectRatio - the aspect ratio, width/height, of the window. If the aspect ratio is greater or equal to
one, the full width of the canvas is used for the image; the height used is proportional to
the inverse of the aspect ratio. If the aspect ratio is less than one, the full height of the
canvas is used, and the width used is proportional to the aspect ratio.image - if non-null, a BufferedImage in which to place the image. If null, a new buffered
image of type BufferedImage.TYPE_INT_RGB is created. The image must be the width and
height specified in the canvasWidth and canvasHeight arguments.
canvasWidth and
canvasHeight. If the specified aspect ratio is one, all pixels contain values. If the aspect
ratio is greater than one, a full-width segment along the top of the canvas is blank. If the aspect ratio
is less than one, a full-height segment along the right side of the canvase is blank. If the
image argument was non-null, that buffered image is returned.ImageUtil.mergeImage(gov.nasa.worldwind.geom.Sector, gov.nasa.worldwind.geom.Sector, double, java.awt.image.BufferedImage, java.awt.image.BufferedImage)public void dispose()
RenderableLayer
dispose in interface Disposabledispose in class RenderableLayerpublic int getNumImages()
public void removeImage(java.lang.String imagePath)
public void setOpacity(double opacity)
RenderableLayer
setOpacity in interface LayersetOpacity in class RenderableLayeropacity - the current opacity value, which is ignored by this layer.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||