Package org.gvsig.raster.lib.buffer.api
Interface Buffer
- All Superinterfaces:
org.gvsig.tools.dispose.Disposable,Iterable<Band>,org.gvsig.tools.observer.Observable,org.gvsig.tools.observer.Observer,StatisticsCapable,org.gvsig.tools.observer.WeakReferencingObservable
public interface Buffer
extends StatisticsCapable, Iterable<Band>, org.gvsig.tools.observer.Observer, org.gvsig.tools.dispose.Disposable
- Author:
- fdiaz
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a bandbooleanclip(org.gvsig.fmap.geom.primitive.Envelope envelope) convert(org.gvsig.crs.projection.lib.CoordinateTransformation ct, org.gvsig.tools.task.SimpleTaskStatus status) Converts buffer using specified coordinate transformationcreateInterpolated(int rows, int columns, int interpolationMode, org.gvsig.tools.task.SimpleTaskStatus status) Creates a interpolated buffergetBand(int pos) Gets the band in the "pos" positiongetBandByte(int pos) intgetBandDouble(int pos) getBandFloat(int pos) getBandInt(int pos) NoData[]Band[]getBands()getBandShort(int pos) BandInfo[]int[]intorg.gvsig.fmap.geom.primitive.Envelopedoubledoubleorg.gvsig.crs.projection.lib.ProjectiongetRenderedImage(int... bands) intgetRows()booleanisInside(int cellX, int cellY) Returns true if passed as parameter cell is inside of the buffer, else returns false.booleanisInside(org.gvsig.fmap.geom.primitive.Point point) Returns true if passed as parameter point is inside of the buffer, else returns false.voidremoveBand(int pos) Removes the band in the "pos" positionvoidSets a band in the "pos" positionvoidswitchBands(int[] positions) Switches the bands as indicated by the parametervoidswitchBands(int pos1, int pos2) Switches two bandsMethods inherited from interface org.gvsig.tools.dispose.Disposable
disposeMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObserversMethods inherited from interface org.gvsig.tools.observer.Observer
updateMethods inherited from interface org.gvsig.raster.lib.buffer.api.statistics.StatisticsCapable
getStatistics
-
Field Details
-
INTERPOLATION_Undefined
static final int INTERPOLATION_Undefined- See Also:
-
INTERPOLATION_NearestNeighbour
static final int INTERPOLATION_NearestNeighbour- See Also:
-
INTERPOLATION_Bilinear
static final int INTERPOLATION_Bilinear- See Also:
-
INTERPOLATION_InverseDistance
static final int INTERPOLATION_InverseDistance- See Also:
-
INTERPOLATION_BicubicSpline
static final int INTERPOLATION_BicubicSpline- See Also:
-
INTERPOLATION_BSpline
static final int INTERPOLATION_BSpline- See Also:
-
-
Method Details
-
getBandCount
int getBandCount()- Returns:
- Number of buffer bands
-
getBands
Band[] getBands()- Returns:
- Bands of buffer
-
getBandsInfo
BandInfo[] getBandsInfo() -
getColumns
int getColumns()- Returns:
- the number of columns
-
getRows
int getRows()- Returns:
- the number of rows
-
getEnvelope
org.gvsig.fmap.geom.primitive.Envelope getEnvelope() throws org.gvsig.tools.locator.LocatorException, org.gvsig.fmap.geom.exception.CreateEnvelopeException- Returns:
- Envelope of this buffer
- Throws:
org.gvsig.fmap.geom.exception.CreateEnvelopeExceptionorg.gvsig.tools.locator.LocatorException
-
getProjection
org.gvsig.crs.projection.lib.Projection getProjection()- Returns:
- Projection of buffer
-
isInside
boolean isInside(int cellX, int cellY) Returns true if passed as parameter cell is inside of the buffer, else returns false.- Parameters:
cellX- Cell's x positioncellY- Cell's y position- Returns:
- true if cell is inside, false if it is outside
-
isInside
boolean isInside(org.gvsig.fmap.geom.primitive.Point point) Returns true if passed as parameter point is inside of the buffer, else returns false.- Parameters:
point-- Returns:
- true if point is inside of this
-
addBand
Adds a band- Parameters:
band-
-
setBand
Sets a band in the "pos" position- Parameters:
pos-band-- Throws:
BandException
-
removeBand
void removeBand(int pos) Removes the band in the "pos" position- Parameters:
pos-
-
getBand
Gets the band in the "pos" position- Parameters:
pos-- Returns:
- return the band in the "pos" position
-
getBandByte
- Parameters:
pos-- Returns:
- return the band in the "pos" position if the band is of type byte
-
getBandShort
- Parameters:
pos-- Returns:
- return the band in the "pos" position if the band is of type short
-
getBandInt
- Parameters:
pos-- Returns:
- return the band in the"pos" position if the band is of type int
-
getBandFloat
- Parameters:
pos-- Returns:
- return the band in the "pos" position if the band is of type float
-
getBandDouble
- Parameters:
pos-- Returns:
- return the band in the "pos" position if the band is of type double
-
switchBands
void switchBands(int[] positions) Switches the bands as indicated by the parameter- Parameters:
positions-
-
switchBands
void switchBands(int pos1, int pos2) Switches two bands- Parameters:
pos1-pos2-
-
createInterpolated
Buffer createInterpolated(int rows, int columns, int interpolationMode, org.gvsig.tools.task.SimpleTaskStatus status) throws org.gvsig.tools.locator.LocatorException, BufferException Creates a interpolated buffer- Parameters:
rows-columns-interpolationMode-status-- Returns:
- a interpolated Buffer according the interpolation mode
- Throws:
BufferExceptionorg.gvsig.tools.locator.LocatorException
-
convert
Buffer convert(org.gvsig.crs.projection.lib.CoordinateTransformation ct, org.gvsig.tools.task.SimpleTaskStatus status) throws BufferException Converts buffer using specified coordinate transformation- Parameters:
ct- Coordinate transformation to convert bufferstatus-- Returns:
- New converted buffer.
- Throws:
BufferException- If there are problems converting buffer
-
getBandTypes
int[] getBandTypes()- Returns:
- Gets band types of buffer bands
-
areAllBandsOfTheSameType
boolean areAllBandsOfTheSameType() -
getBandNoData
NoData[] getBandNoData()- Returns:
- Gets NoData object from buffer bands
-
clip
- Parameters:
envelope-- Returns:
- A clip of buffer
- Throws:
BufferException
-
getPixelSizeX
double getPixelSizeX()- Returns:
- Returns X pixel of this buffer.
-
getPixelSizeY
double getPixelSizeY()- Returns:
- Returns Y pixel of this buffer.
-
getDimensions
BufferDimensions getDimensions()- Returns:
-
getRenderedImage
- Parameters:
bands-- Returns:
-