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 RasterQuery
public void setAreaOfInterest(Rectangle pixelWindow)
setAreaOfInterest
in interface RasterQuery
public void setAreaOfInterest(Rectangle pixelWindow, int bufWidth, int bufHeight)
setAreaOfInterest
in interface RasterQuery
public void setAreaOfInterest(Extent requestBoundingBox, int bufWidth, int bufHeight)
setAreaOfInterest
in interface RasterQuery
public void setAreaOfInterest(Extent boundingBox)
setAreaOfInterest
in interface RasterQuery
public void setAreaOfInterest(Extent requestBoundingBox, int bufWidth, int bufHeight, TileListener listener)
setAreaOfInterest
in interface RasterQuery
public void setTileParameters(int level, int tileCol, int tileRow)
setTileParameters
in interface RasterQuery
public void setTileParameters(int level, int tileCol, int tileRow, Extent bbox, CacheStruct cacheStruct)
RasterQuery
setTileParameters
in interface RasterQuery
level
- 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 SpiRasterQuery
public boolean requestHasShift()
public boolean requestIsPixelCoordinates()
requestIsPixelCoordinates
in interface SpiRasterQuery
public boolean requestIsInWorldCoordinates()
requestIsInWorldCoordinates
in interface SpiRasterQuery
public boolean requestIsRescaled()
public boolean isSupersamplingTheRequest()
public RasterQuery clone()
RasterQuery
clone
in interface RasterQuery
clone
in interface SpiRasterQuery
clone
in class Object
public void calculateParameters(RasterDataStore store) throws QueryException
store
- QueryException
public Buffer createBuffer(RasterDataStore store) throws QueryException
createBuffer
in interface SpiRasterQuery
QueryException
public BandList buildDrawableBandList(BandList storeBandList)
drawablebands
asigned by the userdrawableBands
- storeBandList
- public Object getQueryParameter(String name)
DataQuery
getQueryParameter
in interface DataQuery
name
- of the parameterpublic double getScale()
DataQuery
public void setQueryParameter(String name, Object value)
DataQuery
setQueryParameter
in interface DataQuery
name
- of the query parametervalue
- for the query parameterpublic void setScale(double scale)
DataQuery
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void forceARGBRequest()
RasterQuery
forceARGBRequest
in interface RasterQuery
public void forceRGBRequest()
RasterQuery
forceRGBRequest
in interface RasterQuery
public boolean isforcingRGBRequest()
isforcingRGBRequest
in interface RasterQuery
public boolean isforcingARGBRequest()
isforcingARGBRequest
in interface RasterQuery
public void dontBuildBuffer()
SpiRasterQuery
getBufferForProviders
will return null.dontBuildBuffer
in interface SpiRasterQuery
public int getType()
getType
in interface SpiRasterQuery
public void storeLastBuffer(boolean store)
RasterQuery
storeLastBuffer
in interface RasterQuery
public boolean isStoredLastBuffer()
public void setAdjustToExtent(boolean adjustToExtent)
RasterQuery
setAdjustToExtent
in interface RasterQuery
adjustToExtent
- true para ajustar y false si no queremos que lo haga. Por defecto
estará a true.public boolean isAdjustToExtent()
RasterQuery
isAdjustToExtent
in interface RasterQuery
public int[] getDrawableBands()
RasterQuery
getDrawableBands
in interface RasterQuery
getDrawableBands
in interface SpiRasterQuery
public void setAllDrawableBands()
RasterQuery
setAllDrawableBands
in interface RasterQuery
public void setDrawableBands(int[] drawableBands)
RasterQuery
setDrawableBands
in interface RasterQuery
drawableBands
- Array with the list of bands to writepublic void setReadOnly(boolean readOnly)
RasterQuery
setReadOnly
in interface RasterQuery
readOnly
- 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 RasterQuery
isSupersamplingOptionActive
in interface SpiRasterQuery
public void setSupersamplingOption(boolean supersamplingLoadingBuffer)
Render
setSupersamplingOption
in interface RasterQuery
supersamplingLoadingBuffer
- true o false para activar o desactivar el supersampling en la
carga del buffer.public void setMemoryBuffer(boolean memoryBuffer)
RasterQuery
setMemoryBuffer
in interface RasterQuery
public boolean isMemoryBuffer()
public void setNoDataToFill(NoData noData)
RasterQuery
setNoDataToFill
in interface RasterQuery
public void setAlphaBand(int bandNumber)
RasterQuery
setAlphaBand
in interface RasterQuery
public int getAlphaBandNumber()
getAlphaBandNumber
in interface SpiRasterQuery
public NoData getNoDataValueToFill()
getNoDataValueToFill
in interface SpiRasterQuery
public 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 SpiRasterQuery
public int getAdjustedY()
getAdjustedY
in interface SpiRasterQuery
public int getAdjustedWidth()
getAdjustedWidth
in interface SpiRasterQuery
public int getAdjustedHeight()
getAdjustedHeight
in interface SpiRasterQuery
public 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 SpiRasterQuery
public Rectangle getAdjustedRequestPxWindow()
getAdjustedRequestPxWindow
in interface SpiRasterQuery
public Extent getRequestBoundingBox()
getRequestBoundingBox
in interface SpiRasterQuery
public void setRequestBoundingBox(Extent requestBoundingBox)
requestBoundingBox
- public Extent getAdjustedRequestBoundingBox()
getAdjustedRequestBoundingBox
in interface SpiRasterQuery
public void setAdjustedRequestBoundingBox(Extent adjustedBoundingBox)
requestBoundingBox
- public int getBufWidth()
getBufWidth
in interface SpiRasterQuery
public int getBufHeight()
getBufHeight
in interface SpiRasterQuery
public void setBufHeight(int h)
public void setBufWidth(int w)
public int getAdjustedBufWidth()
getAdjustedBufWidth
in interface SpiRasterQuery
public int getAdjustedBufHeight()
getAdjustedBufHeight
in interface SpiRasterQuery
public void setAdjustedBufHeight(int h)
public void setAdjustedBufWidth(int w)
public boolean isReadOnly()
RasterQuery
isReadOnly
in interface RasterQuery
public TileListener getTileListener()
getTileListener
in interface SpiRasterQuery
public void setTileListener(TileListener listener)
public Time getTime()
RasterQuery
getTime
in interface RasterQuery
getTime
in interface SpiRasterQuery
public void setTime(Time time)
RasterQuery
setTime
in interface RasterQuery
public int getTileRow()
getTileRow
in interface SpiRasterQuery
public int getTileCol()
getTileCol
in interface SpiRasterQuery
public CacheStruct getCacheStruct()
getCacheStruct
in interface SpiRasterQuery
public void setCacheStruct(CacheStruct cacheStruct)
setCacheStruct
in interface SpiRasterQuery
public int getResolutionLevel()
getResolutionLevel
in interface SpiRasterQuery
public void setTaskStatus(TaskStatus taskStatus)
RasterQuery
setTaskStatus
in interface RasterQuery
public BandList getBandList()
getBandList
in interface SpiRasterQuery
public void setBandList(BandList bandList)
setBandList
in interface SpiRasterQuery
public Buffer getBufferForProviders()
getBufferForProviders
in interface SpiRasterQuery
public void setBufferResult(Buffer buffer)
SpiRasterQuery
DataStore
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 SpiRasterQuery
public void setBufferForProviders(Buffer buffer) throws QueryException
RasterQuery
RasterQuery
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 RasterQuery
QueryException
public double[] getStep()
RasterQuery
getStep
in interface RasterQuery
public TaskStatus getTaskStatus()
getTaskStatus
in interface SpiRasterQuery