Package com.luciad.format.raster
Class TLcdMultilevelRaster
java.lang.Object
com.luciad.format.raster.TLcdMultilevelRaster
- All Implemented Interfaces:
ILcdMultilevelRaster
,ILcdBounded
,ILcdCache
,ILcdDisposable
,AutoCloseable
Important notice: the package
com.luciad.imaging
presents a new API
for the modeling of raster data. For new projects, it is recommended to use
this API instead of ILcdRaster
et al.
This class implements ILcdMultilevelRaster
using an array of
ILcdRaster
objects.
This class is thread-safe for concurrent read-only access of its contents.
-
Constructor Summary
ConstructorDescriptionTLcdMultilevelRaster
(ILcdBounds aBounds, ILcdRaster[] aRasters) Creates a newTLcdMultilevelRaster
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the cache.void
dispose()
Disposes of this object and allows it to release any system resources that it is holding.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.getRaster
(int aLevel) int
void
insertIntoCache
(Object aKey, Object aObject) Inserts a cache Object corresponding to the given key Object.removeCachedObject
(Object aKey) Looks up and removes the cached Object corresponding to the given key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdDisposable
close
-
Constructor Details
-
TLcdMultilevelRaster
Creates a newTLcdMultilevelRaster
.- Parameters:
aBounds
- the global bounds of all contained rasters.aRasters
- theILcdRaster
objects, with increasing resolutions.
-
-
Method Details
-
getRasterCount
public int getRasterCount()- Specified by:
getRasterCount
in interfaceILcdMultilevelRaster
- Returns:
- the number of
ILcdRaster
objects in thisILcdMultilevelRaster
.
-
getRaster
- Specified by:
getRaster
in interfaceILcdMultilevelRaster
- Returns:
- the
ILcdRaster
at level aLevel.
-
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
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
insertIntoCache
Description copied from interface:ILcdCache
Inserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCache
in interfaceILcdCache
- 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.- Specified by:
getCachedObject
in interfaceILcdCache
- 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.- Specified by:
removeCachedObject
in interfaceILcdCache
- 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.- Specified by:
clearCache
in interfaceILcdCache
-
dispose
public void dispose()Description copied from interface:ILcdDisposable
Disposes of this object and allows it to release any system resources that it is holding.
The result of calling any other method (other than
finalize
) on this object subsequent to a call to this method is undefined.- Specified by:
dispose
in interfaceILcdDisposable
-