public class DefaultRasterQuery extends Object implements RasterQuery, SpiRasterQuery
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_ENTIRE |
static int |
TYPE_ONE_TILE |
static int |
TYPE_PX |
static int |
TYPE_PX_RESCALED |
static int |
TYPE_PX_RESCALED_SHIFT |
static int |
TYPE_PX_SHIFT |
static int |
TYPE_TILED |
static int |
TYPE_UNDEFINED |
static int |
TYPE_WCOORDS |
static int |
TYPE_WCOORDS_RESCALED |
static int |
TYPE_WCOORDS_SHIFT |
| Constructor and Description |
|---|
DefaultRasterQuery() |
| Modifier and Type | Method and Description |
|---|---|
BandList |
buildDrawableBandList(BandList storeBandList)
Builds a list o bands to draw from the store band list and
the
drawablebands asigned by the user |
void |
calculateParameters(RasterDataStore store)
Calculates the parameters using the base request.
|
RasterQuery |
clone()
Clones this RasterQuery
|
Buffer |
createBuffer(RasterDataStore store) |
void |
dontBuildBuffer()
The buffer won't be built internally when all parameters will be calculated.
|
void |
forceARGBRequest()
Force that the built of the buffer be ARGB.
|
void |
forceRGBRequest()
Force that the built of the buffer be RGB.
|
int |
getAdjustedBufHeight() |
int |
getAdjustedBufWidth() |
int |
getAdjustedHeight() |
Extent |
getAdjustedRequestBoundingBox()
Gets a bounding box of a request in world coordinates adjusted to the bounding box of the source.
|
Rectangle |
getAdjustedRequestPxWindow()
Gets the adjusted window of the request in pixel coordinates
|
int |
getAdjustedWidth() |
int |
getAdjustedX() |
int |
getAdjustedY() |
int |
getAlphaBandNumber() |
BandList |
getBandList() |
Buffer |
getBufferForProviders()
Buffer loaded by the provider and created by the store
|
int |
getBufHeight() |
int |
getBufWidth() |
CacheStruct |
getCacheStruct() |
int[] |
getDrawableBands()
Gets the list of bands to write in a buffer when the call query be executed.
|
int |
getHeight() |
NoData |
getNoDataValueToFill() |
Object |
getQueryParameter(String name)
Returns the value of an query parameter.
|
Extent |
getRequestBoundingBox()
Gets a bounding box of a request in world coordinates.
|
Rectangle |
getRequestPxWindow()
Gets the window of the request in pixel coordinates
|
int |
getResolutionLevel() |
double |
getScale()
Returns the scale of the data to load.
|
double[] |
getStep()
Giving a world coordinates, a buffer size and a original raster size.
|
TaskStatus |
getTaskStatus()
Gets the task status
|
int |
getTileCol() |
TileListener |
getTileListener() |
int |
getTileRow() |
Time |
getTime()
Gets the time information of the viewport requested
|
int |
getType() |
int |
getWidth() |
int |
getX() |
int |
getY() |
boolean |
isAdjustToExtent()
Obtiene el flag que ajusta el extent de la petición al del raster.
|
boolean |
isforcingARGBRequest() |
boolean |
isforcingRGBRequest() |
boolean |
isMemoryBuffer()
Obtiene el flag que dice si la carga del siguiente buffer es en memoria
|
boolean |
isReadOnly()
Returns true if the buffer is not writable
|
boolean |
isStoredLastBuffer()
The user can told if the buffer will be stored or not in the RasterDatasource.
|
boolean |
isSupersamplingOptionActive()
Returns true if the supersampling is enable and false if it is disable
Rendering from gvSIG, the resampling is always disable because if the request
is greater than 1:1 scale the resampling will be done in the client
Render. |
boolean |
isSupersamplingTheRequest()
Returns true if the request is trying apply supersampling, that is, the size of the result is
bigger that the window of maximum resolution of this source
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
boolean |
requestHasShift() |
boolean |
requestIsInWorldCoordinates() |
boolean |
requestIsPixelCoordinates() |
boolean |
requestIsRescaled() |
boolean |
requestIsTiled() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAdjustedBufHeight(int h) |
void |
setAdjustedBufWidth(int w) |
void |
setAdjustedHeight(int h) |
void |
setAdjustedRequestBoundingBox(Extent adjustedBoundingBox)
Sets a bounding box of a request in world coordinates adjusted to the bounding box of the source.
|
void |
setAdjustedWidth(int w) |
void |
setAdjustedX(int x) |
void |
setAdjustedY(int y) |
void |
setAdjustToExtent(boolean adjustToExtent)
Asigna el flag que ajusta el extent de la petición al del raster.
|
void |
setAllDrawableBands()
Gets a buffer of data with the same number of bands and the same order that
the original raster
|
void |
setAlphaBand(int bandNumber)
Sets the number of the alpha band.
|
void |
setAreaOfInterest() |
void |
setAreaOfInterest(Extent boundingBox) |
void |
setAreaOfInterest(Extent requestBoundingBox,
int bufWidth,
int bufHeight) |
void |
setAreaOfInterest(Extent requestBoundingBox,
int bufWidth,
int bufHeight,
TileListener listener) |
void |
setAreaOfInterest(Rectangle pixelWindow) |
void |
setAreaOfInterest(Rectangle pixelWindow,
int bufWidth,
int bufHeight) |
void |
setBandList(BandList bandList) |
void |
setBufferForProviders(Buffer buffer)
Buffer loaded by the provider.
|
void |
setBufferResult(Buffer buffer)
The buffer is always built by the
DataStore but in some cases
it's necessary assign the result because the buffer has changed. |
void |
setBufHeight(int h) |
void |
setBufWidth(int w) |
void |
setCacheStruct(CacheStruct cacheStruct) |
void |
setDrawableBands(int[] drawableBands)
Set the list of bands to write in a buffer when the call query be executed.
|
void |
setHeight(int h) |
void |
setMemoryBuffer(boolean memoryBuffer)
Asigna el flag que dice si la carga del siguiente buffer es en memoria
|
void |
setNoDataToFill(NoData noData)
Asigna el valor noData con el que se rellenan las celdas cuando se hace una petición
en la que no se quiere que se ajuste al �rea del raster.
|
void |
setQueryParameter(String name,
Object value)
Sets the value of an query parameter.
|
void |
setReadOnly(boolean readOnly)
Asigna el flag que dice si la carga del siguiente buffer es de solo lectura o lectura/escritura.
|
void |
setRequestBoundingBox(Extent requestBoundingBox)
Sets a bounding box of a request in world coordinates.
|
void |
setRequestPixelWindow(Rectangle pixelWindow) |
void |
setScale(double scale)
Sets the scale.
|
void |
setSupersamplingOption(boolean supersamplingLoadingBuffer)
Enables or disables the supersampling loading the buffer.
|
void |
setTaskStatus(TaskStatus taskStatus)
Sets the task status
|
void |
setTileListener(TileListener listener) |
void |
setTileParameters(int level,
int tileCol,
int tileRow) |
void |
setTileParameters(int level,
int tileCol,
int tileRow,
Extent bbox,
CacheStruct cacheStruct)
Deprecated.
Use setTileParameters(int level, int tileCol, int tileRow)
|
void |
setTime(Time time)
Sets the time information of the viewport requested
|
void |
setWidth(int w) |
void |
setX(int x) |
void |
setY(int y) |
void |
storeLastBuffer(boolean store)
The user can told if the buffer will be stored or not in the RasterDatasource.
|
public static final int TYPE_UNDEFINED
public static final int TYPE_ENTIRE
public static final int TYPE_WCOORDS
public static final int TYPE_WCOORDS_RESCALED
public static final int TYPE_WCOORDS_SHIFT
public static final int TYPE_PX
public static final int TYPE_PX_RESCALED
public static final int TYPE_PX_SHIFT
public static final int TYPE_PX_RESCALED_SHIFT
public static final int TYPE_TILED
public static final int TYPE_ONE_TILE
public void setAreaOfInterest()
setAreaOfInterest in interface RasterQuerypublic void setAreaOfInterest(Rectangle pixelWindow)
setAreaOfInterest in interface RasterQuerypublic void setAreaOfInterest(Rectangle pixelWindow, int bufWidth, int bufHeight)
setAreaOfInterest in interface RasterQuerypublic void setAreaOfInterest(Extent requestBoundingBox, int bufWidth, int bufHeight)
setAreaOfInterest in interface RasterQuerypublic void setAreaOfInterest(Extent boundingBox)
setAreaOfInterest in interface RasterQuerypublic void setAreaOfInterest(Extent requestBoundingBox, int bufWidth, int bufHeight, TileListener listener)
setAreaOfInterest in interface RasterQuerypublic void setTileParameters(int level,
int tileCol,
int tileRow)
setTileParameters in interface RasterQuerypublic void setTileParameters(int level,
int tileCol,
int tileRow,
Extent bbox,
CacheStruct cacheStruct)
RasterQuerysetTileParameters in interface RasterQuerylevel - Resolution leveltileCol - Tile column in the matrix of its leveltileRow - Tile row in the matrix of its levelbbox - Bounding box of the requested tilecacheStruct - Cache structure force by the clientpublic boolean requestIsTiled()
requestIsTiled in interface SpiRasterQuerypublic boolean requestHasShift()
public boolean requestIsPixelCoordinates()
requestIsPixelCoordinates in interface SpiRasterQuerypublic boolean requestIsInWorldCoordinates()
requestIsInWorldCoordinates in interface SpiRasterQuerypublic boolean requestIsRescaled()
public boolean isSupersamplingTheRequest()
public RasterQuery clone()
RasterQueryclone in interface RasterQueryclone in interface SpiRasterQueryclone in class Objectpublic void calculateParameters(RasterDataStore store) throws QueryException
store - QueryExceptionpublic Buffer createBuffer(RasterDataStore store) throws QueryException
createBuffer in interface SpiRasterQueryQueryExceptionpublic BandList buildDrawableBandList(BandList storeBandList)
drawablebands asigned by the userdrawableBands - storeBandList - public Object getQueryParameter(String name)
DataQuerygetQueryParameter in interface DataQueryname - of the parameterpublic double getScale()
DataQuerypublic void setQueryParameter(String name, Object value)
DataQuerysetQueryParameter in interface DataQueryname - of the query parametervalue - for the query parameterpublic void setScale(double scale)
DataQuerypublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void forceARGBRequest()
RasterQueryforceARGBRequest in interface RasterQuerypublic void forceRGBRequest()
RasterQueryforceRGBRequest in interface RasterQuerypublic boolean isforcingRGBRequest()
isforcingRGBRequest in interface RasterQuerypublic boolean isforcingARGBRequest()
isforcingARGBRequest in interface RasterQuerypublic void dontBuildBuffer()
SpiRasterQuerygetBufferForProviders
will return null.dontBuildBuffer in interface SpiRasterQuerypublic int getType()
getType in interface SpiRasterQuerypublic void storeLastBuffer(boolean store)
RasterQuerystoreLastBuffer in interface RasterQuerypublic boolean isStoredLastBuffer()
public void setAdjustToExtent(boolean adjustToExtent)
RasterQuerysetAdjustToExtent in interface RasterQueryadjustToExtent - true para ajustar y false si no queremos que lo haga. Por defecto
estará a true.public boolean isAdjustToExtent()
RasterQueryisAdjustToExtent in interface RasterQuerypublic int[] getDrawableBands()
RasterQuerygetDrawableBands in interface RasterQuerygetDrawableBands in interface SpiRasterQuerypublic void setAllDrawableBands()
RasterQuerysetAllDrawableBands in interface RasterQuerypublic void setDrawableBands(int[] drawableBands)
RasterQuerysetDrawableBands in interface RasterQuerydrawableBands - Array with the list of bands to writepublic void setReadOnly(boolean readOnly)
RasterQuerysetReadOnly in interface RasterQueryreadOnly - true si la siguiente carga de buffer se hace de solo lectura y false si es de lectura/escriturapublic boolean isSupersamplingOptionActive()
Render.
The default value is disable.isSupersamplingOptionActive in interface RasterQueryisSupersamplingOptionActive in interface SpiRasterQuerypublic void setSupersamplingOption(boolean supersamplingLoadingBuffer)
RendersetSupersamplingOption in interface RasterQuerysupersamplingLoadingBuffer - true o false para activar o desactivar el supersampling en la
carga del buffer.public void setMemoryBuffer(boolean memoryBuffer)
RasterQuerysetMemoryBuffer in interface RasterQuerypublic boolean isMemoryBuffer()
public void setNoDataToFill(NoData noData)
RasterQuerysetNoDataToFill in interface RasterQuerypublic void setAlphaBand(int bandNumber)
RasterQuerysetAlphaBand in interface RasterQuerypublic int getAlphaBandNumber()
getAlphaBandNumber in interface SpiRasterQuerypublic NoData getNoDataValueToFill()
getNoDataValueToFill in interface SpiRasterQuerypublic void setRequestPixelWindow(Rectangle pixelWindow)
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public void setX(int x)
public void setY(int y)
public void setWidth(int w)
public void setHeight(int h)
public int getAdjustedX()
getAdjustedX in interface SpiRasterQuerypublic int getAdjustedY()
getAdjustedY in interface SpiRasterQuerypublic int getAdjustedWidth()
getAdjustedWidth in interface SpiRasterQuerypublic int getAdjustedHeight()
getAdjustedHeight in interface SpiRasterQuerypublic void setAdjustedX(int x)
public void setAdjustedY(int y)
public void setAdjustedWidth(int w)
public void setAdjustedHeight(int h)
public Rectangle getRequestPxWindow()
getRequestPxWindow in interface SpiRasterQuerypublic Rectangle getAdjustedRequestPxWindow()
getAdjustedRequestPxWindow in interface SpiRasterQuerypublic Extent getRequestBoundingBox()
getRequestBoundingBox in interface SpiRasterQuerypublic void setRequestBoundingBox(Extent requestBoundingBox)
requestBoundingBox - public Extent getAdjustedRequestBoundingBox()
getAdjustedRequestBoundingBox in interface SpiRasterQuerypublic void setAdjustedRequestBoundingBox(Extent adjustedBoundingBox)
requestBoundingBox - public int getBufWidth()
getBufWidth in interface SpiRasterQuerypublic int getBufHeight()
getBufHeight in interface SpiRasterQuerypublic void setBufHeight(int h)
public void setBufWidth(int w)
public int getAdjustedBufWidth()
getAdjustedBufWidth in interface SpiRasterQuerypublic int getAdjustedBufHeight()
getAdjustedBufHeight in interface SpiRasterQuerypublic void setAdjustedBufHeight(int h)
public void setAdjustedBufWidth(int w)
public boolean isReadOnly()
RasterQueryisReadOnly in interface RasterQuerypublic TileListener getTileListener()
getTileListener in interface SpiRasterQuerypublic void setTileListener(TileListener listener)
public Time getTime()
RasterQuerygetTime in interface RasterQuerygetTime in interface SpiRasterQuerypublic void setTime(Time time)
RasterQuerysetTime in interface RasterQuerypublic int getTileRow()
getTileRow in interface SpiRasterQuerypublic int getTileCol()
getTileCol in interface SpiRasterQuerypublic CacheStruct getCacheStruct()
getCacheStruct in interface SpiRasterQuerypublic void setCacheStruct(CacheStruct cacheStruct)
setCacheStruct in interface SpiRasterQuerypublic int getResolutionLevel()
getResolutionLevel in interface SpiRasterQuerypublic void setTaskStatus(TaskStatus taskStatus)
RasterQuerysetTaskStatus in interface RasterQuerypublic BandList getBandList()
getBandList in interface SpiRasterQuerypublic void setBandList(BandList bandList)
setBandList in interface SpiRasterQuerypublic Buffer getBufferForProviders()
getBufferForProviders in interface SpiRasterQuerypublic void setBufferResult(Buffer buffer)
SpiRasterQueryDataStore but in some cases
it's necessary assign the result because the buffer has changed. In any case, It's
advisable not to do it because the buffer for providers is replaced and next uses
of this query would return an error.setBufferResult in interface SpiRasterQuerypublic void setBufferForProviders(Buffer buffer) throws QueryException
RasterQueryRasterQuery
but in some cases can be useful to pass the buffer already created by parameter.
In any case, is advisable not to do it.setBufferForProviders in interface RasterQueryQueryExceptionpublic double[] getStep()
RasterQuerygetStep in interface RasterQuerypublic TaskStatus getTaskStatus()
getTaskStatus in interface SpiRasterQuery