public class DefaultRasterSet extends AbstractIndexedVisitable implements RasterSet, Observer
| Modifier and Type | Field and Description |
|---|---|
protected Buffer |
buffer |
protected static Logger |
logger |
protected RasterQuery |
query |
INTERPOLATION_BicubicSpline, INTERPOLATION_Bilinear, INTERPOLATION_BSpline, INTERPOLATION_InverseDistance, INTERPOLATION_NearestNeighbour, INTERPOLATION_Undefined| Constructor and Description |
|---|
DefaultRasterSet(RasterStore store,
RasterQuery query)
Creates a RasterSet with the raster filtered by the query
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBand(Band band)
Adds a band
|
void |
addObserver(Observer o) |
boolean |
areAllBandsOfTheSameType() |
Buffer |
clip(Envelope envelope) |
Buffer |
convert(ICoordTrans ct,
SimpleTaskStatus status)
Converts buffer using specified coordinate transformation
|
Buffer |
createInterpolated(int rows,
int columns,
int interpolationMode,
SimpleTaskStatus status)
Creates a interpolated buffer
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
protected void |
doAccept(Visitor visitor,
long firstValueIndex)
Provides each value of this container to the provided
Visitor. |
void |
doDispose()
Internal implementation for the
dispose() method. |
protected void |
finalize() |
Band |
getBand(int pos)
Gets the band in the "pos" position
|
Band.BandByte |
getBandByte(int pos) |
int |
getBandCount() |
Band.BandDouble |
getBandDouble(int pos) |
Band.BandFloat |
getBandFloat(int pos) |
Band.BandInt |
getBandInt(int pos) |
NoData[] |
getBandNoData() |
Band[] |
getBands() |
Band.BandShort |
getBandShort(int pos) |
BandInfo[] |
getBandsInfo() |
int[] |
getBandTypes() |
java.awt.image.BufferedImage |
getBufferedImage() |
int |
getColumns() |
BufferDimensions |
getDimensions() |
Envelope |
getEnvelope() |
double |
getPixelSizeX() |
double |
getPixelSizeY() |
IProjection |
getProjection() |
int |
getRows() |
Statistics |
getStatistics(SimpleTaskStatus status)
Gets the statistics of the object than implements this interface
|
boolean |
isEmpty() |
boolean |
isFromStore(DataStore store)
Indicates whether this DataSet belongs to a specific store
|
boolean |
isInside(int cellX,
int cellY)
Returns true if passed as parameter cell is inside of the buffer, else returns false.
|
boolean |
isInside(Point point)
Returns true if passed as parameter point is inside of the buffer, else returns false.
|
java.util.Iterator<Band> |
iterator() |
void |
removeBand(int pos)
Removes the band in the "pos" position
|
void |
setBand(int pos,
Band band)
Sets a band in the "pos" position
|
void |
switchBands(int[] positions)
Switches the bands as indicated by the parameter
|
void |
switchBands(int pos1,
int pos2)
Switches two bands
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
accept, doAcceptacceptprotected static final Logger logger
protected RasterQuery query
protected Buffer buffer
public DefaultRasterSet(RasterStore store, RasterQuery query) throws DataException
store - query - DataExceptionpublic int getBandCount()
getBandCount in interface Bufferpublic Band[] getBands()
public int getColumns()
getColumns in interface Bufferpublic boolean areAllBandsOfTheSameType()
areAllBandsOfTheSameType in interface Bufferpublic Envelope getEnvelope() throws LocatorException, CreateEnvelopeException
getEnvelope in interface BufferLocatorExceptionCreateEnvelopeExceptionpublic IProjection getProjection()
getProjection in interface Bufferpublic boolean isInside(int cellX,
int cellY)
Bufferpublic boolean isInside(Point point)
Bufferpublic void setBand(int pos,
Band band)
throws BandException
BuffersetBand in interface BufferBandExceptionpublic void removeBand(int pos)
BufferremoveBand in interface Bufferpublic Band getBand(int pos)
Bufferpublic Band.BandByte getBandByte(int pos)
getBandByte in interface Bufferpublic Band.BandShort getBandShort(int pos)
getBandShort in interface Bufferpublic Band.BandInt getBandInt(int pos)
getBandInt in interface Bufferpublic Band.BandFloat getBandFloat(int pos)
getBandFloat in interface Bufferpublic Band.BandDouble getBandDouble(int pos)
getBandDouble in interface Bufferpublic void switchBands(int[] positions)
BufferswitchBands in interface Bufferpublic void switchBands(int pos1,
int pos2)
BufferswitchBands in interface Bufferpublic Buffer createInterpolated(int rows, int columns, int interpolationMode, SimpleTaskStatus status) throws LocatorException, BufferException
BuffercreateInterpolated in interface BufferLocatorExceptionBufferExceptionpublic Buffer convert(ICoordTrans ct, SimpleTaskStatus status) throws BufferException
Bufferconvert in interface Bufferct - Coordinate transformation to convert bufferBufferException - If there are problems converting bufferpublic int[] getBandTypes()
getBandTypes in interface Bufferpublic NoData[] getBandNoData()
getBandNoData in interface Bufferpublic Buffer clip(Envelope envelope) throws BufferException
clip in interface BufferBufferExceptionpublic double getPixelSizeX()
getPixelSizeX in interface Bufferpublic double getPixelSizeY()
getPixelSizeY in interface Bufferpublic Statistics getStatistics(SimpleTaskStatus status)
StatisticsCapablegetStatistics in interface StatisticsCapablepublic void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic java.util.Iterator<Band> iterator()
iterator in interface java.lang.Iterable<Band>public boolean isFromStore(DataStore store)
DataSetisFromStore in interface DataSetstore - a DataStorepublic void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
protected void doAccept(Visitor visitor, long firstValueIndex) throws VisitCanceledException, BaseException
AbstractIndexedVisitableVisitor.
The VisitCanceledException will be managed by the parent
AbstractIndexedVisitable class, so simply throw it.doAccept in class AbstractIndexedVisitableVisitCanceledExceptionBaseExceptionpublic final void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposablepublic void doDispose()
throws BaseException
dispose() method.BaseExceptiondispose()protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic java.awt.image.BufferedImage getBufferedImage()
getBufferedImage in interface Bufferpublic BufferDimensions getDimensions()
getDimensions in interface Bufferpublic BandInfo[] getBandsInfo()
getBandsInfo in interface Buffer