public class TLcdEarthAssetGXYViewTileSet extends ALcdEarthTileSet
TLcdEarthGXYViewTileSet
but uses a model with ILcdEarthAsset
s instead of a ILcdGXYLayer
s to generate image tiles.
To produce or update a tile only the assets that have ILcdEarthTileSetCoverage.CoverageType.IMAGE
as coverage type and overlap with the tile are used. The gxy layers of these assets are created
lazily by using their model decoder to create a model and passing this model to the layer
factory. The order of the overlapping assets is determined using their natural
ordering
.
Changes to the asset model are taken into account in subsequent produced or updated tiles.
This class is thread-safe.TLcdEarthGXYViewTileSet
Constructor and Description |
---|
TLcdEarthAssetGXYViewTileSet(ILcdBounds aBounds,
int aLevels,
long aLevel0RowCount,
long aLevel0ColCount,
int aImageTileResolution,
ILcdGeoReference aTileSetReference,
ILcdModel aAssetModel,
ILcdGXYLayerFactory aLayerFactory)
Constructs a new
TLcdEarthAssetGXYViewTileSet with the specified settings. |
TLcdEarthAssetGXYViewTileSet(ILcdBounds aBounds,
int aLevels,
long aLevel0RowCount,
long aLevel0ColCount,
int aImageTileWidth,
int aImageTileHeight,
ILcdGeoReference aTileSetReference,
ILcdModel aAssetModel,
ILcdGXYLayerFactory aLayerFactory)
Constructs a new
TLcdEarthAssetGXYViewTileSet with the specified settings. |
Modifier and Type | Method and Description |
---|---|
void |
cancelTile(int aLevel,
long aTileX,
long aTileY,
ILcdEarthTileSetCoverage aCoverage,
ILcdGeoReference aGeoReference,
TLcdEarthTileFormat aFormat,
ILcdEarthTileSetCallback aCallback,
Object aContext)
Cancels any pending tile requests for the given parameters.
|
boolean |
containsTile(ILcdEarthTileSetCoverage aCoverage,
int aLevel,
long aX,
long aY,
Object aContext)
Returns true if the repository contains the specified tile.
|
boolean |
containsTileSetCoverage(String aCoverageName)
Returns true if the repository contains a coverage with the specified name.
|
void |
dispose()
This method releases all resources held by the
repository, such as file locks, threads or server connections.
|
ILcdBounds |
getBounds()
Returns the bounds of this tile set, expressed in the model reference of the model that
contains this tile set.
|
ILcdGXYLayerFactory |
getGXYLayerFactory()
Returns the GXY layer factory used for creating layers for the models.
|
TLcdEarthGXYViewTileSet |
getGXYViewTileSet()
Returns the
TLcdEarthGXYViewTileSet that is used to generate the tiles. |
ILcdEarthModelDecoderFactory |
getModelDecoderFactory()
Returns the model decoder factory used for decoding the assets.
|
ILcdEarthTileSetCoverage |
getTileSetCoverage(int aIndex)
Returns the coverage at the specified index.
|
ILcdEarthTileSetCoverage |
getTileSetCoverage(String aCoverageName)
Returns the tileset coverage with the specified name.
|
int |
getTileSetCoverageCount()
Returns the number of coverages this tileset contains.
|
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.
|
ALcdEarthTile |
produceTile(ILcdEarthTileSetCoverage aCoverage,
int aLevel,
long aX,
long aY,
ILcdGeoReference aGeoReference,
TLcdEarthTileFormat aFormat,
Object aContext)
Gets a tile from the repository.
|
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 |
setModelDecoderFactory(ILcdEarthModelDecoderFactory aModelDecoderFactory)
Sets the model decoder factory used for decoding the assets.
|
ALcdEarthTile |
updateTile(ALcdEarthTile aEarthTile,
Object aContext)
Returns an updated version of the specified tile.
|
void |
updateTile(ALcdEarthTile aTile,
TLcdEarthTileOperationMode aMode,
ILcdEarthTileSetCallback aCallback,
Object aContext)
Produces an updated version of the given tile, if necessary.
|
getLevelCount, getTileBoundsSFCT, getTileColumnCount, getTileRowCount
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TLcdEarthAssetGXYViewTileSet(ILcdBounds aBounds, int aLevels, long aLevel0RowCount, long aLevel0ColCount, int aImageTileWidth, int aImageTileHeight, ILcdGeoReference aTileSetReference, ILcdModel aAssetModel, ILcdGXYLayerFactory aLayerFactory)
TLcdEarthAssetGXYViewTileSet
with the specified settings.aBounds
- the bounds of the tileset in the model referenceaLevels
- the number of tile levelsaLevel0RowCount
- the number of tile rows at level 0aLevel0ColCount
- the number of tile columns at level 0aImageTileWidth
- the X-resolution of a single tileaImageTileHeight
- the Y-resolution of a single tileaTileSetReference
- the reference in which the tileset's bounds and tile pyramid are
definedaAssetModel
- the asset modelaLayerFactory
- the layer factory that will be used to create layer's from the
modelspublic TLcdEarthAssetGXYViewTileSet(ILcdBounds aBounds, int aLevels, long aLevel0RowCount, long aLevel0ColCount, int aImageTileResolution, ILcdGeoReference aTileSetReference, ILcdModel aAssetModel, ILcdGXYLayerFactory aLayerFactory)
TLcdEarthAssetGXYViewTileSet
with the specified settings.aBounds
- the bounds of the tileset in the model referenceaLevels
- the number of tile levelsaLevel0RowCount
- the number of tile rows at level 0aLevel0ColCount
- the number of tile columns at level 0aImageTileResolution
- the resolution of a single tile, both for X- and Y-resolutionsaTileSetReference
- the reference in which the tileset's bounds and tile pyramid are
definedaAssetModel
- the asset modelaLayerFactory
- the layer factory that will be used to create layer's from the
modelspublic void setModelDecoderFactory(ILcdEarthModelDecoderFactory aModelDecoderFactory)
aModelDecoderFactory
- the model decoder factorypublic ILcdEarthModelDecoderFactory getModelDecoderFactory()
setModelDecoderFactory(com.luciad.earth.model.ILcdEarthModelDecoderFactory)
public ILcdGXYLayerFactory getGXYLayerFactory()
public TLcdEarthGXYViewTileSet getGXYViewTileSet()
TLcdEarthGXYViewTileSet
that is used to generate the tiles.TLcdEarthGXYViewTileSet
that is used to generate the tiles.public void dispose()
ILcdEarthTileSet
dispose
in interface ILcdEarthTileSet
dispose
in interface ILcdDisposable
dispose
in class ALcdEarthTileSet
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 ALcdEarthTile produceTile(ILcdEarthTileSetCoverage aCoverage, int aLevel, long aX, long aY, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, Object aContext) throws IOException
ILcdEarthTileSet
produceTile
in interface ILcdEarthTileSet
produceTile
in class ALcdEarthTileSet
aCoverage
- the coverage from which to query a tileaLevel
- the detail level for which to query a tileaX
- the column index at which to query a tileaY
- the row index at which to query a tileaGeoReference
- the georeference of the requested tileaFormat
- the format of the requested tileaContext
- application-specific data to be used by the tileset, if anyIOException
- if the tile cannot be producedpublic void updateTile(ALcdEarthTile aTile, TLcdEarthTileOperationMode aMode, ILcdEarthTileSetCallback aCallback, Object aContext)
ILcdEarthTileSet
updateTile
in interface ILcdEarthTileSet
updateTile
in class ALcdEarthTileSet
aTile
- tile to checkaMode
- 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 ALcdEarthTile updateTile(ALcdEarthTile aEarthTile, Object aContext) throws IOException
ILcdEarthTileSet
updateTile
in interface ILcdEarthTileSet
updateTile
in class ALcdEarthTileSet
aEarthTile
- the tile to checkaContext
- application-specific data to be used by the tileset, if anyIOException
- if the tile cannot be updatedpublic boolean containsTile(ILcdEarthTileSetCoverage aCoverage, int aLevel, long aX, long aY, Object aContext)
ILcdEarthTileSet
containsTile
in interface ILcdEarthTileSet
containsTile
in class ALcdEarthTileSet
aCoverage
- the coverage from which to query a tileaLevel
- the detail level for which to query a tileaX
- the column index at which to query a tileaY
- the row index at which to query a tileaContext
- application-specific data to be used by the tileset, if anypublic void cancelTile(int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, ILcdEarthTileSetCallback aCallback, Object aContext)
ILcdEarthTileSet
cancelTile()
is called, the tileset is no longer required
to invoke the ILcdEarthTileSetCallback
for the tile in question.
The tileset is not obligated to honor the cancelTile()
request, but if cancelTile()
is not called, then it
is required to invoke the ILcdEarthTileSetCallback
at some
point.cancelTile
in interface ILcdEarthTileSet
cancelTile
in class ALcdEarthTileSet
aLevel
- the level from which the tile is requestedaTileX
- the column index of the requested tileaTileY
- the row index of the requested tileaCoverage
- the coverage from which the tile is requestedaGeoReference
- the reference system in which the tile is requestedaFormat
- the format in which the tile is requestedaCallback
- would be invoked when the tile would have been available to be usedaContext
- application-specific data to be used by the tileset, if anypublic 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 forpublic ILcdEarthTileSetCoverage getTileSetCoverage(String aCoverageName)
ILcdEarthTileSet
getTileSetCoverage
in interface ILcdEarthTileSet
getTileSetCoverage
in class ALcdEarthTileSet
aCoverageName
- the name of the coverage to look forpublic boolean containsTileSetCoverage(String aCoverageName)
ILcdEarthTileSet
containsTileSetCoverage
in interface ILcdEarthTileSet
containsTileSetCoverage
in class ALcdEarthTileSet
aCoverageName
- the name of the coverage to look forpublic ILcdEarthTileSetCoverage getTileSetCoverage(int aIndex)
ILcdEarthTileSet
aIndex
- the index of the coverage to returnILcdEarthTileSetCoverage
public int getTileSetCoverageCount()
ILcdEarthTileSet
public ILcdBounds getBounds()
ILcdEarthTileSet
ILcdBounded.getBounds()