Class ALcdEarthTileSplitter
java.lang.Object
com.luciad.earth.tileset.util.splitter.ALcdEarthTileSplitter
- All Implemented Interfaces:
ILcdEarthTileSplitter
- Direct Known Subclasses:
TLcdEarthImageSplitter
,TLcdEarthMultivaluedDataSplitter
Base class for
ILcdEarthTileSplitter
implementations. Derived classes need only implement the
abstract getSubTileData(Object, int, int, int)
method, which returns one sub tile's data
object. Creating the new sub tile, with the appropriate properties and containing the data, is
handled by this class. By default, getSubTile(com.luciad.earth.tileset.ALcdEarthTile, int, long, long)
returns instances of TLcdEarthTile
. This
behaviour can be changed by overriding createSubTile(com.luciad.shape.shape3D.ILcd3DEditableBounds, Object, int, long, long, com.luciad.earth.tileset.ILcdEarthTileSetCoverage, com.luciad.reference.ILcdGeoReference, com.luciad.earth.tileset.TLcdEarthTileFormat)
.
- Since:
- 8.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ALcdEarthTile
createSubTile
(ILcd3DEditableBounds aBounds, Object aData, int aLevel, long aX, long aY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat) Returns a newTLcdEarthTile
with the given properties.getSubTile
(ALcdEarthTile aInput, int aLevel, long aTileX, long aTileY) Splits a tile and returns the requested sub tile.protected ILcd3DEditableBounds
getSubTileBounds
(ALcdEarthTile aInput, int aLevelDelta, int aX, int aY, Object aSubTileData) Returns the bounds of the sub tile.abstract Object
getSubTileData
(Object aInput, int aLevelDelta, int aX, int aY) Returns the data of one sub tile of a given tile.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.earth.tileset.util.splitter.ILcdEarthTileSplitter
getDataFormat
-
Constructor Details
-
ALcdEarthTileSplitter
public ALcdEarthTileSplitter()
-
-
Method Details
-
getSubTileData
public abstract Object getSubTileData(Object aInput, int aLevelDelta, int aX, int aY) throws IOException Returns the data of one sub tile of a given tile.- Parameters:
aInput
- The data object of the source tile.aLevelDelta
- The number of levels above the input tile that the sub tile is.aX
- The x coordinate of the sub tile (i.e. a value in [0,2^aLevelDelta
[).aY
- The y coordinate of the sub tile (i.e. a value in [0,2^aLevelDelta
[).- Returns:
- The requested sub tile's data.
- Throws:
IOException
- If the data cannot be split.
-
getSubTile
public ALcdEarthTile getSubTile(ALcdEarthTile aInput, int aLevel, long aTileX, long aTileY) throws IOException Splits a tile and returns the requested sub tile. All properties of the sub tile are set in this method, except for the tile's actual data.The returned tile is instantiated using the method
createSubTile(com.luciad.shape.shape3D.ILcd3DEditableBounds, Object, int, long, long, com.luciad.earth.tileset.ILcdEarthTileSetCoverage, com.luciad.reference.ILcdGeoReference, com.luciad.earth.tileset.TLcdEarthTileFormat)
.- Specified by:
getSubTile
in interfaceILcdEarthTileSplitter
- Parameters:
aInput
- The tile of level N.aLevel
- The level of the returned sub tile.aTileX
- The tile x coordinate of the returned sub tile.aTileY
- The tile y coordinate of the returned sub tile.- Returns:
- The requested sub tile.
- Throws:
IOException
- If the tile cannot be split.IllegalArgumentException
- If the requested tile is no sub tile of the given tile.
-
getSubTileBounds
protected ILcd3DEditableBounds getSubTileBounds(ALcdEarthTile aInput, int aLevelDelta, int aX, int aY, Object aSubTileData) Returns the bounds of the sub tile. The default implementation just uses the input tile's bounds.- Parameters:
aInput
- The data object of the source tile.aLevelDelta
- The number of levels above the input tile that the sub tile is.aX
- The x coordinate of the sub tile (i.e. a value in [0,2^aLevelDelta
[).aY
- The y coordinate of the sub tile (i.e. a value in [0,2^aLevelDelta
[).aSubTileData
- The sub tile's data- Returns:
- The bounds of the sub tile's data.
- See Also:
-
createSubTile
protected ALcdEarthTile createSubTile(ILcd3DEditableBounds aBounds, Object aData, int aLevel, long aX, long aY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat) Returns a newTLcdEarthTile
with the given properties. This method can be overridden if some other implementation ofALcdEarthTile
is needed.- Parameters:
aBounds
- The bounds of the new tile.aData
- The data of the new tile.aLevel
- The level of the new tile.aX
- The column index of the new tile.aY
- The row index of the new tile.aCoverage
- The coverage of the new tile.aGeoReference
- The geo reference of the new tile.aFormat
- The format of the new tile.- Returns:
- A new tile with the specified properties.
-