Class TLcdEarthCompositeImageTileSet
- All Implemented Interfaces:
ILcdEarthTileSet,ILcdBounded,ILcdDisposable,AutoCloseable
- Since:
- 8.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn image layer based on a coverage in a tileset.static enumAn enumeration of modes used to steer the tile production behaviour. -
Constructor Summary
ConstructorsConstructorDescriptionTLcdEarthCompositeImageTileSet(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.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. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite) Adds an image layer after the last image layer.voiddispose()Disposes each of the registered tilesets.Returns the bounds of this tile set, expressed in the model reference of the model that contains this tile set.Returns the raster coverage for the composed images.intReturns the default image type of the produced BufferedImage's.getImageLayer(int aIndex) Returns the image layer at the given index.getImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage) Returns the first image layer with the specified tileset and coverage ornullif no such image layer is present.intReturns the number of image layers that are composited.intReturns the image type of the produced BufferedImage's.Returns the mode for producing tiles.getTileSetCoverage(int aIndex) Returns the coverage at the specified index.intReturns the number of coverages this tileset contains.intindexOfImageLayer(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.intReturns the index of the specified image layer or -1 if it is not present.voidinsertImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite, int aIndex) Inserts an image layer at the given index.booleanisFormatSupported(ILcdEarthTileSetCoverage aCoverage, TLcdEarthTileFormat aFormat) Returns true only for the coverage's native format.booleanisGeoReferenceSupported(ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference) Returns true only for the coverage's native georeference.booleanisSupported(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp) Returns whether an image layer with the given parameters is supported.voidmoveImageLayer(int aIndex, TLcdEarthCompositeImageTileSet.ImageLayer aImageLayer) Moves the specified image layer to the specified index.voidproduceTile(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.voidremoveImageLayer(int aIndex) Removes the image layer at the given index.voidsetImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite, int aIndex) Sets the image layer at the given index.voidsetResultImageType(int aImageType) Sets the image type of the produced BufferedImage's.voidSets the mode for producing tiles.Methods inherited from class com.luciad.earth.tileset.ALcdEarthTileSet
cancelTile, containsTile, containsTileSetCoverage, getLevelCount, getTileBoundsSFCT, getTileColumnCount, getTileRowCount, getTileSetCoverage, produceTile, updateTile, updateTileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.util.ILcdDisposable
close
-
Constructor Details
-
TLcdEarthCompositeImageTileSet
public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, int aTileNumXPixels, int aTileNumYPixels) Creates a new composite image tileset with the given parameters. The native reference of the composite image coverage will be a geodetic reference. All added tilesets will need to support this reference and the other parameters.- Parameters:
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.
-
TLcdEarthCompositeImageTileSet
public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, long aLevel0Rows, long aLevel0Columns, int aTileNumXPixels, int aTileNumYPixels) Creates a new composite image tileset with the given parameters. The native reference of the composite image coverage will be a geodetic reference. All added tilesets will need to support this reference and the other parameters.- Parameters:
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.
-
TLcdEarthCompositeImageTileSet
public TLcdEarthCompositeImageTileSet(ILcdBounds aBounds, int aLevels, int aTileNumXPixels, int aTileNumYPixels, ILcdGeoReference aNativeReference) Creates a new composite image tileset with the given parameters. All added tilesets will need to support these.- Parameters:
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.
-
TLcdEarthCompositeImageTileSet
public 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. All added tilesets will need to support these.- Parameters:
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.
-
TLcdEarthCompositeImageTileSet
public TLcdEarthCompositeImageTileSet(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage) Creates a new composite image tileset with the given tileset and coverage as first image. All added tilesets will need to support the parameters (i.e. bounds, tile layout and reference).- Parameters:
aTileSet- The tile set for the first image.aCoverage- The coverage in this tile set for the first image ornullto use the first compatible coverage.
-
TLcdEarthCompositeImageTileSet
public TLcdEarthCompositeImageTileSet(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite) Creates a new composite image tileset with the given tileset and coverage as first image. All added tilesets will need to support the parameters (i.e. bounds, tile layout and reference).- Parameters:
aTileSet- The tile set for the first image.aCoverage- The coverage in this tile set for the first image ornullto use the first compatible coverage.aBufferedImageOp- The operation to perform on the tile image ornullto perform none.aComposite- The composite operation to perform ornullto use the default mode.
-
-
Method Details
-
getTileProductionMode
Returns the mode for producing tiles.- Returns:
- the mode for producing tiles.
-
setTileProductionMode
Sets the mode for producing tiles.- Parameters:
aMode- the mode that should be used for producing tiles.
-
getImageLayerCount
public int getImageLayerCount()Returns the number of image layers that are composited.- Returns:
- The number of image layers.
-
getImageLayer
Returns the image layer at the given index. Image layers are composited from the lowest index to highest index.- Parameters:
aIndex- An index in [0,getImageLayerCount()[.- Returns:
- The i'th image layer.
- Throws:
IndexOutOfBoundsException- If the given index is out of bounds.
-
removeImageLayer
public void removeImageLayer(int aIndex) Removes the image layer at the given index.- Parameters:
aIndex- An index in [0,getImageLayerCount()[.- Throws:
IndexOutOfBoundsException- If the given index is out of bounds.
-
indexOfImageLayer
Returns the index of the specified image layer or -1 if it is not present.- Parameters:
aImageLayer- An image layer.- Returns:
- An index in [0,
getImageLayerCount()[ or -1.
-
indexOfImageLayer
Returns the index of the first image layer with the specified tileset and coverage or -1 if no such image layer is not present.- Parameters:
aTileSet- A tileset.aCoverage- A coverage ornullif any coverage is allowed.- Returns:
- An index in [0,
getImageLayerCount()[ or -1.
-
getImageLayer
public TLcdEarthCompositeImageTileSet.ImageLayer getImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage) Returns the first image layer with the specified tileset and coverage ornullif no such image layer is present.- Parameters:
aTileSet- A tileset.aCoverage- A coverage ornullif any coverage is allowed.- Returns:
- An image layer or
null.
-
moveImageLayer
Moves the specified image layer to the specified index.- Parameters:
aIndex- An index in [0,getImageLayerCount()[.aImageLayer- An image layer.- Throws:
NoSuchElementException- ifaImageLayeris not an image layer of this tileset.IndexOutOfBoundsException- ifaIndexis out of bounds.
-
addImageLayer
public void addImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite) Adds an image layer after the last image layer.- Parameters:
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.- Throws:
IllegalArgumentException- If the an image layer with the given parameters is not supported.- See Also:
-
insertImageLayer
public void insertImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite, int aIndex) Inserts an image layer at the given index.- Parameters:
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()[.- Throws:
IndexOutOfBoundsException- If the given index is out of bounds.IllegalArgumentException- If the an image layer with the given parameters is not supported.- See Also:
-
setImageLayer
public void setImageLayer(ILcdEarthTileSet aTileSet, ILcdEarthRasterTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp, Composite aComposite, int aIndex) Sets the image layer at the given index.- Parameters:
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()[.- Throws:
IndexOutOfBoundsException- If the given index is out of bounds.- See Also:
-
isSupported
public boolean isSupported(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage, BufferedImageOp aBufferedImageOp) Returns whether an image layer with the given parameters is supported. The image layer is supported if the tileset has the same tile structure as this tileset (e.g. bounds, levels, rows and columns) and the coverage (or a coverage of the tileset if it is not specified) is a raster coverage that is compatible withgetComposedImageCoverage().- Parameters:
aTileSet- The tileset for the image.aCoverage- The coverage in the tileset ornullto use the first compatible coverage.aBufferedImageOp- The operation to perform on the image ornullto perform none.- Returns:
- whether the image layer is supported.
-
getResultImageType
public int getResultImageType()Returns the image type of the produced BufferedImage's.- Returns:
- An image type.
- See Also:
-
setResultImageType
public void setResultImageType(int aImageType) Sets the image type of the produced BufferedImage's. It is assumed that the given type is a valid image type for a BufferedImage.- Parameters:
aImageType- An image type.- See Also:
-
getDefaultResultImageType
public int getDefaultResultImageType()Returns the default image type of the produced BufferedImage's.- Returns:
- An image type.
- See Also:
-
getComposedImageCoverage
Returns the raster coverage for the composed images.- Returns:
- The composed image coverage.
-
produceTile
public void produceTile(ILcdEarthTileSetCoverage aCoverage, int aLevel, long aTileX, long aTileY, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, TLcdEarthTileOperationMode aMode, ILcdEarthTileSetCallback aCallback, Object aContext) Description copied from interface:ILcdEarthTileSetProduces the requested tile, and invoke the supplied callback when done. The resulting tile is passed to the call back'stileAvailable()method. If the tile cannot be produced for some reason, the methodtileNotAvailable()should be called instead.If the tileset supports it and
aModeisTLcdEarthTileOperationMode.PREFER_ASYNCHRONOUS, the tile request may be executed asynchronously. However, the callback must be invoked at some point in time, unless thecancelTile()method is used to cancel the tile request before it is executed. IfaModeisTLcdEarthTileOperationMode.FORCE_SYNCHRONOUS, the request must be executed synchronously and the callback must be invoked beforeproduceTile()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 calltileNotAvailable(). If the tileset callstileAvailable(), the geo reference of the resulting tile must be equal toaGeoReference, 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, useisFormatSupported(). If the specified format is not supported, the tileset should calltileNotAvailable().The context parameter may be used to pass application-specific data into the tileset. If it is not needed, its value may be
null.- Parameters:
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 any
-
dispose
public void dispose()Disposes each of the registered tilesets.- Specified by:
disposein interfaceILcdDisposable- Specified by:
disposein interfaceILcdEarthTileSet- Overrides:
disposein classALcdEarthTileSet
-
getBounds
Description copied from interface:ILcdEarthTileSetReturns the bounds of this tile set, expressed in the model reference of the model that contains this tile set.- Returns:
- the bounds of this tile set
- See Also:
-
getTileSetCoverageCount
public int getTileSetCoverageCount()Description copied from interface:ILcdEarthTileSetReturns the number of coverages this tileset contains.- Returns:
- the number of coverages this tileset contains
-
getTileSetCoverage
Description copied from interface:ILcdEarthTileSetReturns the coverage at the specified index.- Parameters:
aIndex- the index of the coverage to return- Returns:
- the requested
ILcdEarthTileSetCoverage
-
isGeoReferenceSupported
public boolean isGeoReferenceSupported(ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference) Description copied from class:ALcdEarthTileSetReturns true only for the coverage's native georeference.- Specified by:
isGeoReferenceSupportedin interfaceILcdEarthTileSet- Overrides:
isGeoReferenceSupportedin classALcdEarthTileSet- Parameters:
aCoverage- the coverage to check foraGeoReference- the reference to check for- Returns:
- true if the given coverage can be queried with the given reference
-
isFormatSupported
Description copied from class:ALcdEarthTileSetReturns true only for the coverage's native format.- Specified by:
isFormatSupportedin interfaceILcdEarthTileSet- Overrides:
isFormatSupportedin classALcdEarthTileSet- Parameters:
aCoverage- the coverage to check foraFormat- the format to check for- Returns:
- true if the given coverage can be queried with the given format
-