public class TLcdEarthCompositeImageTileSet extends ALcdEarthTileSet
Modifier and Type | Class and Description |
---|---|
static class |
TLcdEarthCompositeImageTileSet.ImageLayer
An image layer based on a coverage in a tileset.
|
static class |
TLcdEarthCompositeImageTileSet.TileProductionMode
An enumeration of modes used to steer the tile production behaviour.
|
Constructor and Description |
---|
TLcdEarthCompositeImageTileSet(ILcdBounds aBounds,
int aLevels,
int aTileNumXPixels,
int aTileNumYPixels)
Creates a new composite image tileset with the given parameters.
|
TLcdEarthCompositeImageTileSet(ILcdBounds aBounds,
int aLevels,
int aTileNumXPixels,
int aTileNumYPixels,
ILcdGeoReference aNativeReference)
Creates a new composite image tileset with the given parameters.
|
TLcdEarthCompositeImageTileSet(ILcdBounds aBounds,
int aLevels,
long aLevel0Rows,
long aLevel0Columns,
int aTileNumXPixels,
int aTileNumYPixels)
Creates a new composite image tileset with the given parameters.
|
TLcdEarthCompositeImageTileSet(ILcdBounds aBounds,
int aLevels,
long aLevel0Rows,
long aLevel0Columns,
int aTileNumXPixels,
int aTileNumYPixels,
ILcdGeoReference aNativeReference)
Creates a new composite image tileset with the given parameters.
|
TLcdEarthCompositeImageTileSet(ILcdEarthTileSet aTileSet,
ILcdEarthRasterTileSetCoverage aCoverage)
Creates a new composite image tileset with the given tileset and coverage as first image.
|
TLcdEarthCompositeImageTileSet(ILcdEarthTileSet aTileSet,
ILcdEarthRasterTileSetCoverage aCoverage,
BufferedImageOp aBufferedImageOp,
Composite aComposite)
Creates a new composite image tileset with the given tileset and coverage as first image.
|
Modifier and Type | Method and Description |
---|---|
void |
addImageLayer(ILcdEarthTileSet aTileSet,
ILcdEarthRasterTileSetCoverage aCoverage,
BufferedImageOp aBufferedImageOp,
Composite aComposite)
Adds an image layer after the last image layer.
|
void |
dispose()
Disposes each of the registered tilesets.
|
ILcdBounds |
getBounds()
Returns the bounds of this tile set, expressed in the model reference of the model that
contains this tile set.
|
ILcdEarthRasterTileSetCoverage |
getComposedImageCoverage()
Returns the raster coverage for the composed images.
|
int |
getDefaultResultImageType()
Returns the default image type of the produced BufferedImage's.
|
TLcdEarthCompositeImageTileSet.ImageLayer |
getImageLayer(ILcdEarthTileSet aTileSet,
ILcdEarthTileSetCoverage aCoverage)
Returns the first image layer with the specified tileset and coverage or
null if
no such image layer is present. |
TLcdEarthCompositeImageTileSet.ImageLayer |
getImageLayer(int aIndex)
Returns the image layer at the given index.
|
int |
getImageLayerCount()
Returns the number of image layers that are composited.
|
int |
getResultImageType()
Returns the image type of the produced BufferedImage's.
|
TLcdEarthCompositeImageTileSet.TileProductionMode |
getTileProductionMode()
Returns the mode for producing tiles.
|
ILcdEarthTileSetCoverage |
getTileSetCoverage(int aIndex)
Returns the coverage at the specified index.
|
int |
getTileSetCoverageCount()
Returns the number of coverages this tileset contains.
|
int |
indexOfImageLayer(ILcdEarthTileSet aTileSet,
ILcdEarthTileSetCoverage aCoverage)
Returns the index of the first image layer with the specified tileset and coverage or -1 if no
such image layer is not present.
|
int |
indexOfImageLayer(TLcdEarthCompositeImageTileSet.ImageLayer aImageLayer)
Returns the index of the specified image layer or -1 if it is not present.
|
void |
insertImageLayer(ILcdEarthTileSet aTileSet,
ILcdEarthRasterTileSetCoverage aCoverage,
BufferedImageOp aBufferedImageOp,
Composite aComposite,
int aIndex)
Inserts an image layer at the given index.
|
boolean |
isFormatSupported(ILcdEarthTileSetCoverage aCoverage,
TLcdEarthTileFormat aFormat)
Returns true only for the coverage's native format.
|
boolean |
isGeoReferenceSupported(ILcdEarthTileSetCoverage aCoverage,
ILcdGeoReference aGeoReference)
Returns true only for the coverage's native georeference.
|
boolean |
isSupported(ILcdEarthTileSet aTileSet,
ILcdEarthTileSetCoverage aCoverage,
BufferedImageOp aBufferedImageOp)
Returns whether an image layer with the given parameters is supported.
|
void |
moveImageLayer(int aIndex,
TLcdEarthCompositeImageTileSet.ImageLayer aImageLayer)
Moves the specified image layer to the specified index.
|
void |
produceTile(ILcdEarthTileSetCoverage aCoverage,
int aLevel,
long aTileX,
long aTileY,
ILcdGeoReference aGeoReference,
TLcdEarthTileFormat aFormat,
TLcdEarthTileOperationMode aMode,
ILcdEarthTileSetCallback aCallback,
Object aContext)
Produces the requested tile, and invoke the supplied callback when done.
|
void |
removeImageLayer(int aIndex)
Removes the image layer at the given index.
|
void |
setImageLayer(ILcdEarthTileSet aTileSet,
ILcdEarthRasterTileSetCoverage aCoverage,
BufferedImageOp aBufferedImageOp,
Composite aComposite,
int aIndex)
Sets the image layer at the given index.
|
void |
setResultImageType(int aImageType)
Sets the image type of the produced BufferedImage's.
|
void |
setTileProductionMode(TLcdEarthCompositeImageTileSet.TileProductionMode aMode)
Sets the mode for producing tiles.
|
cancelTile, containsTile, containsTileSetCoverage, getLevelCount, getTileBoundsSFCT, getTileColumnCount, getTileRowCount, getTileSetCoverage, produceTile, updateTile, updateTile
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, int aTileNumXPixels, int aTileNumYPixels)
aBounds
- The bounds of this composite tileset in geodetic coordinates.aLevels
- The number of levels for this composite tileset.aTileNumXPixels
- The tile width in pixels of this composite tileset.aTileNumYPixels
- The tile height in pixels of this composite tileset.public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, long aLevel0Rows, long aLevel0Columns, int aTileNumXPixels, int aTileNumYPixels)
aBounds
- The bounds of this composite tileset in geodetic coordinates.aLevels
- The number of levels for this composite tileset.aLevel0Rows
- The number of tile rows at level 0.aLevel0Columns
- The number of tile columns at level 0.aTileNumXPixels
- The tile width in pixels of this composite tileset.aTileNumYPixels
- The tile height in pixels of this composite tileset.public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, int aTileNumXPixels, int aTileNumYPixels, ILcdGeoReference aNativeReference)
aBounds
- The bounds of this composite tileset in geodetic coordinates.aLevels
- The number of levels for this composite tileset.aTileNumXPixels
- The tile width in pixels of this composite tileset.aTileNumYPixels
- The tile height in pixels of this composite tileset.aNativeReference
- The native reference of the composite image coverage.public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, long aLevel0Rows, long aLevel0Columns, int aTileNumXPixels, int aTileNumYPixels, ILcdGeoReference aNativeReference)
aBounds
- The bounds of this composite tileset in geodetic coordinates.aLevels
- The number of levels for this composite tileset.aLevel0Rows
- The number of rows at level 0.aLevel0Columns
- The number of columns at level 0.aTileNumXPixels
- The tile width in pixels of this composite tileset.aTileNumYPixels
- The tile height in pixels of this composite tileset.aNativeReference
- The native reference of the composite image coverage.public TLcdEarthCompositeImageTileSet(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage)
aTileSet
- The tile set for the first image.aCoverage
- The coverage in this tile set for the first image or null
to use
the first compatible coverage.public TLcdEarthCompositeImageTileSet(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite)
aTileSet
- The tile set for the first image.aCoverage
- The coverage in this tile set for the first image or null
to use the first compatible coverage.aBufferedImageOp
- The operation to perform on the tile image or null
to
perform none.aComposite
- The composite operation to perform or null
to use the
default mode.public TLcdEarthCompositeImageTileSet.TileProductionMode getTileProductionMode()
public void setTileProductionMode(TLcdEarthCompositeImageTileSet.TileProductionMode aMode)
aMode
- the mode that should be used for producing tiles.public int getImageLayerCount()
public TLcdEarthCompositeImageTileSet.ImageLayer getImageLayer(int aIndex)
aIndex
- An index in [0,getImageLayerCount()
[.IndexOutOfBoundsException
- If the given index is out of bounds.public void removeImageLayer(int aIndex)
aIndex
- An index in [0,getImageLayerCount()
[.IndexOutOfBoundsException
- If the given index is out of bounds.public int indexOfImageLayer(TLcdEarthCompositeImageTileSet.ImageLayer aImageLayer)
aImageLayer
- An image layer.getImageLayerCount()
[ or -1.public int indexOfImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage)
aTileSet
- A tileset.aCoverage
- A coverage or null
if any coverage is allowed.getImageLayerCount()
[ or -1.public TLcdEarthCompositeImageTileSet.ImageLayer getImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage)
null
if
no such image layer is present.aTileSet
- A tileset.aCoverage
- A coverage or null
if any coverage is allowed.null
.public void moveImageLayer(int aIndex, TLcdEarthCompositeImageTileSet.ImageLayer aImageLayer)
aIndex
- An index in [0,getImageLayerCount()
[.aImageLayer
- An image layer.NoSuchElementException
- if aImageLayer
is not an image layer of this
tileset.IndexOutOfBoundsException
- if aIndex
is out of bounds.public void addImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite)
aTileSet
- The tileset for the image layer.aCoverage
- The coverage in the tileset or null to use the first compatible
coverage.aBufferedImageOp
- The operation to perform on the tile image or null to perform none.aComposite
- The composite operation to perform or null to use the default mode.IllegalArgumentException
- If the an image layer with the given parameters is not
supported.isSupported(com.luciad.earth.tileset.ILcdEarthTileSet, com.luciad.earth.tileset.ILcdEarthTileSetCoverage
, java.awt.image.BufferedImageOp)
public void insertImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite, int aIndex)
aTileSet
- The tileset for the image layer.aCoverage
- The coverage in the tileset or null to use the first compatible
coverage.aBufferedImageOp
- The operation to perform on the tile images or null to perform none.aComposite
- The composite operation to perform or null to use the default mode.aIndex
- An index in [0,getImageLayerCount()
[.IndexOutOfBoundsException
- If the given index is out of bounds.IllegalArgumentException
- If the an image layer with the given parameters is not
supported.isSupported(com.luciad.earth.tileset.ILcdEarthTileSet, com.luciad.earth.tileset.ILcdEarthTileSetCoverage
, java.awt.image.BufferedImageOp)
public void setImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite, int aIndex)
aTileSet
- The tileset for the image layer.aCoverage
- The coverage in the tileset or null to use the first compatible
coverage.aBufferedImageOp
- The operation to perform on the tile images or null to perform none.aComposite
- The composite operation to perform or null to use the default mode.aIndex
- An index in [0,getImageLayerCount()
[.IndexOutOfBoundsException
- If the given index is out of bounds.isSupported(com.luciad.earth.tileset.ILcdEarthTileSet, com.luciad.earth.tileset.ILcdEarthTileSetCoverage
, java.awt.image.BufferedImageOp)
public boolean isSupported(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp)
getComposedImageCoverage()
.aTileSet
- The tileset for the image.aCoverage
- The coverage in the tileset or null
to use the first
compatible coverage.aBufferedImageOp
- The operation to perform on the image or null
to perform
none.public int getResultImageType()
BufferedImage.getType()
public void setResultImageType(int aImageType)
aImageType
- An image type.BufferedImage.getType()
public int getDefaultResultImageType()
BufferedImage.getType()
public ILcdEarthRasterTileSetCoverage getComposedImageCoverage()
public void produceTile(ILcdEarthTileSetCoverage aCoverage, int aLevel, long aTileX, long aTileY, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, TLcdEarthTileOperationMode aMode, ILcdEarthTileSetCallback aCallback, Object aContext)
ILcdEarthTileSet
tileAvailable()
method. If the tile cannot be produced for some reason, the method tileNotAvailable()
should be called instead.
If the tileset supports it and aMode
is TLcdEarthTileOperationMode.PREFER_ASYNCHRONOUS
,
the tile request may be executed asynchronously. However, the callback
must be invoked at some point in time, unless the
cancelTile()
method is used to cancel the tile request before it is executed. If
aMode
is TLcdEarthTileOperationMode.FORCE_SYNCHRONOUS
,
the request must be executed synchronously and the callback must be
invoked before produceTile()
returns.
Tiles may be requested in reference systems other than the native
geo reference of the underlying data, provided that the isGeoReferenceSupported()
method returns true for the requested reference. If this is not the case,
the tileset should call tileNotAvailable()
. If the tileset
calls tileAvailable()
, the geo reference of the resulting tile
must be equal to aGeoReference
, and the tile's bounds
must likewise be expressed in this reference.
Similarly, tiles may be requested in different data formats, as described
by TLcdEarthTileFormat
. The format
determines the type of the data object that will be contained in the
requested tile. To check if a format is supported, use isFormatSupported()
.
If the specified format is not supported, the tileset should call
tileNotAvailable()
.
The context parameter may be used to pass application-specific data into
the tileset. If it is not needed, its value may be null
.
aCoverage
- the coverage from which the tile is requestedaLevel
- the level from which the tile is requestedaTileX
- the column index of the requested tileaTileY
- the row index of the requested tileaGeoReference
- the reference system in which the tile should be returnedaFormat
- the desired format of the tile's dataaMode
- controls the synchronous or asynchronous behaviour of the tilesetaCallback
- will be invoked when the tile is available to be usedaContext
- application-specific data to be used by the tileset, if anypublic void dispose()
dispose
in interface ILcdEarthTileSet
dispose
in interface ILcdDisposable
dispose
in class ALcdEarthTileSet
public ILcdBounds getBounds()
ILcdEarthTileSet
ILcdBounded.getBounds()
public int getTileSetCoverageCount()
ILcdEarthTileSet
public ILcdEarthTileSetCoverage getTileSetCoverage(int aIndex)
ILcdEarthTileSet
aIndex
- the index of the coverage to returnILcdEarthTileSetCoverage
public boolean isGeoReferenceSupported(ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference)
ALcdEarthTileSet
isGeoReferenceSupported
in interface ILcdEarthTileSet
isGeoReferenceSupported
in class ALcdEarthTileSet
aCoverage
- the coverage to check foraGeoReference
- the reference to check forpublic boolean isFormatSupported(ILcdEarthTileSetCoverage aCoverage, TLcdEarthTileFormat aFormat)
ALcdEarthTileSet
isFormatSupported
in interface ILcdEarthTileSet
isFormatSupported
in class ALcdEarthTileSet
aCoverage
- the coverage to check foraFormat
- the format to check for