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
ConstructorsConstructorDescriptionTLcdMultilevelRaster(ILcdBounds aBounds, ILcdRaster[] aRasters) Creates a newTLcdMultilevelRaster. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cache.voiddispose()Disposes of this object and allows it to release any system resources that it is holding.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.getCachedObject(Object aKey) Looks up and returns the cached Object corresponding to the given key.getRaster(int aLevel) intvoidinsertIntoCache(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, waitMethods inherited from interface com.luciad.util.ILcdDisposable
close
-
Constructor Details
-
TLcdMultilevelRaster
Creates a newTLcdMultilevelRaster.- Parameters:
aBounds- the global bounds of all contained rasters.aRasters- theILcdRasterobjects, with increasing resolutions.
-
-
Method Details
-
getRasterCount
public int getRasterCount()- Specified by:
getRasterCountin interfaceILcdMultilevelRaster- Returns:
- the number of
ILcdRasterobjects in thisILcdMultilevelRaster.
-
getRaster
- Specified by:
getRasterin interfaceILcdMultilevelRaster- Returns:
- the
ILcdRasterat level aLevel.
-
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.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-
insertIntoCache
Description copied from interface:ILcdCacheInserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCachein 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:ILcdCacheLooks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObjectin 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:ILcdCacheLooks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObjectin 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:ILcdCacheClears the cache.- Specified by:
clearCachein interfaceILcdCache
-
dispose
public void dispose()Description copied from interface:ILcdDisposableDisposes 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:
disposein interfaceILcdDisposable
-