public class TLcdMultilevelRaster extends Object implements ILcdMultilevelRaster, ILcdDisposable
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 and Description |
---|
TLcdMultilevelRaster(ILcdBounds aBounds,
ILcdRaster[] aRasters)
Creates a new
TLcdMultilevelRaster . |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
ILcdRaster |
getRaster(int aLevel) |
int |
getRasterCount() |
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TLcdMultilevelRaster(ILcdBounds aBounds, ILcdRaster[] aRasters)
TLcdMultilevelRaster
.aBounds
- the global bounds of all contained rasters.aRasters
- the ILcdRaster
objects, with increasing
resolutions.public int getRasterCount()
getRasterCount
in interface ILcdMultilevelRaster
ILcdRaster
objects in this ILcdMultilevelRaster
.public ILcdRaster getRaster(int aLevel)
getRaster
in interface ILcdMultilevelRaster
ILcdRaster
at level aLevel.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
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
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public void insertIntoCache(Object aKey, Object aObject)
ILcdCache
insertIntoCache
in interface ILcdCache
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.public Object getCachedObject(Object aKey)
ILcdCache
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public Object removeCachedObject(Object aKey)
ILcdCache
removeCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public void clearCache()
ILcdCache
clearCache
in interface ILcdCache
public void dispose()
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.
dispose
in interface ILcdDisposable