public class TLcdEarthMetadataTerrainTileSet extends Object implements ILcdEarthTileSet
ILcdEarthTileSet
which creates 3D terrain tiles based on a
model containing ILcdEarthAsset
objects.Modifier and Type | Field and Description |
---|---|
static int |
BAKEDLIGHTMAP_COVERAGE
The texture coverage blended with the lightmap coverage.
|
static int |
ELEVATION_COVERAGE
The terrain elevation coverage based on the elevation assets.
|
static int |
GEOMETRY_COVERAGE
The terrain geometry coverage based on the elevation assets.
|
static int |
LIGHTMAP_COVERAGE
The light map coverage based on the elevation assets and light parameters.
|
static int |
NORMALMAP_COVERAGE
The normal map coverage based on the elevation assets.
|
static int |
TEXTURE_COVERAGE
The terrain texture coverage based on the raster assets.
|
Constructor and Description |
---|
TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds,
int aLevels,
ILcdModel aAssetModel,
ILcdGXYLayerFactory aLayerFactory)
Creates a metadata tileset with only a texture and geometry coverage.
|
TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds,
int aLevels,
ILcdModel aAssetModel,
ILcdGXYLayerFactory aLayerFactory,
int aTextureOversamplingFactor)
Creates a metadata tileset with only a texture and geometry coverage.
|
TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds,
int aLevels,
ILcdModel aAssetModel,
ILcdGXYLayerFactory aLayerFactory,
int aTextureOversamplingFactor,
int aCoverages)
Creates a metadata tileset with the specified coverages.
|
TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds,
int aLevels,
int aLevel0Rows,
int aLevel0Columns,
ILcdModel aAssetModel,
ILcdGXYLayerFactory aLayerFactory,
int aTextureOversamplingFactor,
int aCoverages,
int aGeometryTileResolution,
int aTextureTileResolution)
Creates a metadata tileset with the specified coverages..
|
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.
|
TLcdEarthTerrainElevationTileSet |
getElevationTileSet()
The elevation tileset used to produce the geometry, elevation, normalmap and lightmap
coverages.
|
int |
getLevelCount()
Returns the number of available detail levels.
|
TLcdEarthGXYViewTileSet |
getRasterTileSet()
The raster tileset used to produce the texture coverages.
|
long |
getTileColumnCount(int aLevel)
Returns the number of columns in the tile grid at the given level.
|
long |
getTileRowCount(int aLevel)
Returns the number of rows in the tile grid at the given level.
|
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 if the tileset can produce tiles for the given coverage in the given format.
|
boolean |
isGeoReferenceSupported(ILcdEarthTileSetCoverage aCoverage,
ILcdGeoReference aGeoReference)
Returns true if the tileset can produce tiles for the given coverage in the given reference
system.
|
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 to use 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public static final int TEXTURE_COVERAGE
public static final int GEOMETRY_COVERAGE
public static final int ELEVATION_COVERAGE
public static final int NORMALMAP_COVERAGE
public static final int LIGHTMAP_COVERAGE
getElevationTileSet()
,
Constant Field Valuespublic static final int BAKEDLIGHTMAP_COVERAGE
TEXTURE_COVERAGE
,
LIGHTMAP_COVERAGE
,
Constant Field Valuespublic TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds, int aLevels, ILcdModel aAssetModel, ILcdGXYLayerFactory aLayerFactory) throws IOException
aBounds
- The bounds of the tileset in the asset model's reference.aLevels
- The number of levels in the tileset.aLayerFactory
- The layer factory to use for creating 2d layers from the assets.aAssetModel
- The raster and elevation data.IOException
- When decoding of the metadata assets fails.public TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds, int aLevels, ILcdModel aAssetModel, ILcdGXYLayerFactory aLayerFactory, int aTextureOversamplingFactor) throws IOException
aBounds
- The bounds of the tileset in the asset model's reference.aLevels
- The number of levels in the tileset.aLayerFactory
- The layer factory to use for creating 2d layers from the
assets.aAssetModel
- The raster and elevation data.aTextureOversamplingFactor
- The oversampling factor for the raster data.IOException
- When decoding of the metadata assets fails.public TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds, int aLevels, ILcdModel aAssetModel, ILcdGXYLayerFactory aLayerFactory, int aTextureOversamplingFactor, int aCoverages) throws IOException
aBounds
- The bounds of the tileset in the asset model's reference.aLevels
- The number of levels in the tileset.aLayerFactory
- The layer factory to use for creating 2d layers from the
assets.aAssetModel
- The raster and elevation data.aTextureOversamplingFactor
- The oversampling factor for the raster data.aCoverages
- The coverages that should be available.IOException
- When decoding of the metadata assets fails.public TLcdEarthMetadataTerrainTileSet(ILcdBounds aBounds, int aLevels, int aLevel0Rows, int aLevel0Columns, ILcdModel aAssetModel, ILcdGXYLayerFactory aLayerFactory, int aTextureOversamplingFactor, int aCoverages, int aGeometryTileResolution, int aTextureTileResolution) throws IOException
aBounds
- The bounds of the tileset in the asset model's reference.aLevels
- The number of levels in the tileset.aLevel0Rows
- The number of rows in the tileset at level 0.aLevel0Columns
- The number of columns in the tileset at level 0.aLayerFactory
- The layer factory to use for creating 2d layers from the
assets.aAssetModel
- The raster and elevation data.aTextureOversamplingFactor
- The oversampling factor for the raster data.aCoverages
- The coverages that should be available.aGeometryTileResolution
- The resolution (width and height in vertices) of the terrain geometry tiles.aTextureTileResolution
- The resolution (width and height in pixels) of the terrain texture tiles.IOException
- When decoding of the metadata assets fails.public void setModelDecoderFactory(ILcdEarthModelDecoderFactory aModelDecoderFactory)
aModelDecoderFactory
- the model decoder factorypublic TLcdEarthTerrainElevationTileSet getElevationTileSet()
GEOMETRY_COVERAGE
,
ELEVATION_COVERAGE
,
NORMALMAP_COVERAGE
,
LIGHTMAP_COVERAGE
public TLcdEarthGXYViewTileSet getRasterTileSet()
TEXTURE_COVERAGE
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
.
produceTile
in interface ILcdEarthTileSet
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 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
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 containsTile(ILcdEarthTileSetCoverage aCoverage, int aLevel, long aX, long aY, Object aContext)
ILcdEarthTileSet
containsTile
in interface ILcdEarthTileSet
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 ALcdEarthTile produceTile(ILcdEarthTileSetCoverage aCoverage, int aLevel, long aX, long aY, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, Object aContext) throws IOException
ILcdEarthTileSet
produceTile
in interface ILcdEarthTileSet
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 boolean isGeoReferenceSupported(ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference)
ILcdEarthTileSet
This method must always return true for the native reference of the
coverage. If it returns true for any other georeference, then the tileset
must be able to handle the georeference in question in its
produceTile()
method.
isGeoReferenceSupported
in interface ILcdEarthTileSet
aCoverage
- the coverage to check foraGeoReference
- the reference to check forpublic boolean isFormatSupported(ILcdEarthTileSetCoverage aCoverage, TLcdEarthTileFormat aFormat)
ILcdEarthTileSet
This method must always return true for the native format of the
coverage. If it returns true for any other format, then the tileset
must be able to handle the format in question in its
produceTile()
method.
isFormatSupported
in interface ILcdEarthTileSet
aCoverage
- the coverage to check foraFormat
- the format to check forpublic void dispose()
ILcdEarthTileSet
dispose
in interface ILcdEarthTileSet
dispose
in interface ILcdDisposable
public ILcdBounds getBounds()
ILcdEarthTileSet
getBounds
in interface ILcdEarthTileSet
getBounds
in interface ILcdBounded
ILcdBounded.getBounds()
public int getLevelCount()
ILcdEarthTileSet
getLevelCount
in interface ILcdEarthTileSet
public long getTileRowCount(int aLevel)
ILcdEarthTileSet
getTileRowCount
in interface ILcdEarthTileSet
aLevel
- the level to be queriedpublic long getTileColumnCount(int aLevel)
ILcdEarthTileSet
getTileColumnCount
in interface ILcdEarthTileSet
aLevel
- the level to be queriedpublic int getTileSetCoverageCount()
ILcdEarthTileSet
getTileSetCoverageCount
in interface ILcdEarthTileSet
public ILcdEarthTileSetCoverage getTileSetCoverage(int aIndex)
ILcdEarthTileSet
getTileSetCoverage
in interface ILcdEarthTileSet
aIndex
- the index of the coverage to returnILcdEarthTileSetCoverage
public ILcdEarthTileSetCoverage getTileSetCoverage(String aCoverageName)
ILcdEarthTileSet
getTileSetCoverage
in interface ILcdEarthTileSet
aCoverageName
- the name of the coverage to look forpublic boolean containsTileSetCoverage(String aCoverageName)
ILcdEarthTileSet
containsTileSetCoverage
in interface ILcdEarthTileSet
aCoverageName
- the name of the coverage to look forpublic void updateTile(ALcdEarthTile aTile, TLcdEarthTileOperationMode aMode, ILcdEarthTileSetCallback aCallback, Object aContext)
ILcdEarthTileSet
updateTile
in interface ILcdEarthTileSet
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
aEarthTile
- the tile to checkaContext
- application-specific data to be used by the tileset, if anyIOException
- if the tile cannot be updated