Package com.luciad.earth.tileset
Class TLcdEarthTile
java.lang.Object
com.luciad.earth.tileset.ALcdEarthTile
com.luciad.earth.tileset.TLcdEarthTile
- All Implemented Interfaces:
ILcdBounded
,ILcdCache
Default implementation of
ALcdEarthTile
.- Since:
- 8.2
-
Constructor Summary
ConstructorDescriptionTLcdEarthTile
(ILcdBounds aBounds, Object aData, int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat) Creates a newTLcdEarthTile
with the given parameters and the current date as its creation date.TLcdEarthTile
(ILcdBounds aBounds, Object aData, int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, Date aCreationDate) Creates a newTLcdEarthTile
with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the cache.boolean
Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.getCachedObject
(Object aKey) Looks up and returns the cached Object corresponding to the given key.float
Returns the tile's completeness, that is the progress level to reach the complete status.Returns the date the tile and its data were created.getData()
Returns the tile's data.Returns the tile data's format.Returns the georeference of the tile's data.int
getLevel()
Returns the detail level to which this tile belongs.Returns the coverage to which this tile belongs.long
getTileX()
Returns the tile's column index.long
getTileY()
Returns the tile's row index.int
hashCode()
void
insertIntoCache
(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.boolean
If false, this tile represents a partially loaded chunk of data.removeCachedObject
(Object aKey) Looks up and removes the cached Object corresponding to the given key.toString()
Methods inherited from class com.luciad.earth.tileset.ALcdEarthTile
getMinimalTile
-
Constructor Details
-
TLcdEarthTile
public TLcdEarthTile(ILcdBounds aBounds, Object aData, int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat) Creates a newTLcdEarthTile
with the given parameters and the current date as its creation date.- Parameters:
aBounds
- the bounds of the tileaData
- the data contained in the tileaLevel
- the level of the tileaTileX
- the column index of the tileaTileY
- the row index of the tileaCoverage
- the coverage of the tileaGeoReference
- the reference of the tileaFormat
- the format of the tile's data
-
TLcdEarthTile
public TLcdEarthTile(ILcdBounds aBounds, Object aData, int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, Date aCreationDate) Creates a newTLcdEarthTile
with the given parameters.- Parameters:
aBounds
- the bounds of the tileaData
- the data contained in the tileaLevel
- the level of the tileaTileX
- the column index of the tileaTileY
- the row index of the tileaCoverage
- the coverage of the tileaGeoReference
- the reference of the tileaFormat
- the format of the tile's dataaCreationDate
- the creation date of the tile's date
-
-
Method Details
-
getDataFormat
Description copied from class:ALcdEarthTile
Returns the tile data's format. This format describes the return type ofALcdEarthTile.getData()
.- Specified by:
getDataFormat
in classALcdEarthTile
- Returns:
- a TLcdEarthTileFormat.
-
getData
Description copied from class:ALcdEarthTile
Returns the tile's data. The type of this data can be retrieved using theALcdEarthTile.getDataFormat()
method.- Specified by:
getData
in classALcdEarthTile
- Returns:
- the tile's data
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an
undefined
bounds. You can create undefined bounds using the default constructors ofTLcdLonLatBounds
orTLcdXYBounds
.- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
getLevel
public int getLevel()Description copied from class:ALcdEarthTile
Returns the detail level to which this tile belongs.- Specified by:
getLevel
in classALcdEarthTile
- Returns:
- the detail level to which this tile belongs
-
getTileX
public long getTileX()Description copied from class:ALcdEarthTile
Returns the tile's column index.- Specified by:
getTileX
in classALcdEarthTile
- Returns:
- the tile's column index
-
getTileY
public long getTileY()Description copied from class:ALcdEarthTile
Returns the tile's row index.- Specified by:
getTileY
in classALcdEarthTile
- Returns:
- the tile's row index
-
getTileSetCoverage
Description copied from class:ALcdEarthTile
Returns the coverage to which this tile belongs.- Specified by:
getTileSetCoverage
in classALcdEarthTile
- Returns:
- the coverage to which this tile belongs
-
getGeoReference
Description copied from class:ALcdEarthTile
Returns the georeference of the tile's data. This is not necessarily equal to the coverage's native georeference.- Specified by:
getGeoReference
in classALcdEarthTile
- Returns:
- the georeference of tile's data
-
isComplete
public boolean isComplete()Description copied from class:ALcdEarthTile
If false, this tile represents a partially loaded chunk of data. The tileset will invoke its callback one or more additional times for the same tile until the tile is completely produced, at which point this method will return true. This mechanism can be used to support progressive streaming of terrain data.- Specified by:
isComplete
in classALcdEarthTile
- Returns:
- true if the tile is complete
-
getCompleteness
public float getCompleteness()Description copied from class:ALcdEarthTile
Returns the tile's completeness, that is the progress level to reach the complete status. The returned value is in the range [0,1], where 1 = complete. Note: this method should return 1 when the isComplete method returns true and vice-versa. This mechanism can be used to support progressive streaming of terrain data.- Specified by:
getCompleteness
in classALcdEarthTile
- Returns:
- a float value in the range [0,1], representing the tile's completeness.
-
getCreationDate
Description copied from class:ALcdEarthTile
Returns the date the tile and its data were created. This can be used to check whether the tile is outdated.- Specified by:
getCreationDate
in classALcdEarthTile
- Returns:
- creation date of the tile
-
equals
-
hashCode
public int hashCode() -
toString
-
insertIntoCache
Description copied from interface:ILcdCache
Inserts a cache Object corresponding to the given key Object.- Parameters:
aKey
- the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself:insertIntoCache(this, ...)
.aObject
- the Object to be cached.
-
getCachedObject
Description copied from interface:ILcdCache
Looks up and returns the cached Object corresponding to the given key.- Parameters:
aKey
- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there is no Object corresponding to the given key.
-
removeCachedObject
Description copied from interface:ILcdCache
Looks up and removes the cached Object corresponding to the given key.- Parameters:
aKey
- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there was no Object corresponding to the given key.
-
clearCache
public void clearCache()Description copied from interface:ILcdCache
Clears the cache.
-