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
ConstructorsConstructorDescriptionTLcdEarthTile(ILcdBounds aBounds, Object aData, int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat) Creates a newTLcdEarthTilewith 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 newTLcdEarthTilewith the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cache.booleanReturns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.floatReturns 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.intgetLevel()Returns the detail level to which this tile belongs.Returns the coverage to which this tile belongs.longgetTileX()Returns the tile's column index.longgetTileY()Returns the tile's row index.inthashCode()voidinsertIntoCache(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.booleanIf 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 newTLcdEarthTilewith 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 newTLcdEarthTilewith 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:ALcdEarthTileReturns the tile data's format. This format describes the return type ofALcdEarthTile.getData().- Specified by:
getDataFormatin classALcdEarthTile- Returns:
- a TLcdEarthTileFormat.
-
getData
Description copied from class:ALcdEarthTileReturns the tile's data. The type of this data can be retrieved using theALcdEarthTile.getDataFormat()method.- Specified by:
getDatain classALcdEarthTile- Returns:
- the tile's data
-
getBounds
Description copied from interface:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject 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
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-
getLevel
public int getLevel()Description copied from class:ALcdEarthTileReturns the detail level to which this tile belongs.- Specified by:
getLevelin classALcdEarthTile- Returns:
- the detail level to which this tile belongs
-
getTileX
public long getTileX()Description copied from class:ALcdEarthTileReturns the tile's column index.- Specified by:
getTileXin classALcdEarthTile- Returns:
- the tile's column index
-
getTileY
public long getTileY()Description copied from class:ALcdEarthTileReturns the tile's row index.- Specified by:
getTileYin classALcdEarthTile- Returns:
- the tile's row index
-
getTileSetCoverage
Description copied from class:ALcdEarthTileReturns the coverage to which this tile belongs.- Specified by:
getTileSetCoveragein classALcdEarthTile- Returns:
- the coverage to which this tile belongs
-
getGeoReference
Description copied from class:ALcdEarthTileReturns the georeference of the tile's data. This is not necessarily equal to the coverage's native georeference.- Specified by:
getGeoReferencein classALcdEarthTile- Returns:
- the georeference of tile's data
-
isComplete
public boolean isComplete()Description copied from class:ALcdEarthTileIf 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:
isCompletein classALcdEarthTile- Returns:
- true if the tile is complete
-
getCompleteness
public float getCompleteness()Description copied from class:ALcdEarthTileReturns 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:
getCompletenessin classALcdEarthTile- Returns:
- a float value in the range [0,1], representing the tile's completeness.
-
getCreationDate
Description copied from class:ALcdEarthTileReturns the date the tile and its data were created. This can be used to check whether the tile is outdated.- Specified by:
getCreationDatein classALcdEarthTile- Returns:
- creation date of the tile
-
equals
-
hashCode
public int hashCode() -
toString
-
insertIntoCache
Description copied from interface:ILcdCacheInserts 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:ILcdCacheLooks 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:ILcdCacheLooks 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:ILcdCacheClears the cache.
-