com.iver.cit.gvsig.fmap.layers
Class FMapWCSAdapter

java.lang.Object
  extended bycom.iver.cit.gvsig.fmap.layers.FMapWCSAdapter

public class FMapWCSAdapter
extends java.lang.Object

Class to interact FMapWCSDriver La clase FMapWCSAdaptor recubre la interacción con el FMapWCSDriver

Author:
jaume - jaume.dominguez@iver.es

Field Summary
 boolean firstLoad
           
 
Constructor Summary
FMapWCSAdapter()
           
 
Method Summary
 void draw(java.awt.image.BufferedImage image, java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel)
          Automatically called by gvSIG Llamado automáticamente por gvSIG.
 java.util.ArrayList getAttributes()
          Obtiene la lista de atributos de raster
 java.awt.geom.Rectangle2D getBbox()
          Returns the current bounding box.
 void getCoverageFromQuery(java.lang.String query)
          Gets the coverage (not the FLyrWCS) from an URL.
 java.lang.String getCoverageName()
          Returns the coverage name.
 java.lang.String getCoverageQuery()
          Returns an string containing the query that originated the coverage.
 FMapWCSDriver getDriver()
          Gets a ref to the object that implements the vectorial interface in order of the Strategy can optimize the driver's function.
 RasterFilterStack getFilterStack()
          Gets the filter stack Obtiene la pila de filtros
 java.lang.String getFormat()
          The coverage format.
 java.awt.geom.Rectangle2D getFullExtent()
          Gets the max coverage extension.
 GeoRasterFile getGeoRasterFile()
          Gets the last open GeoRasterFile against the temp file received Obtiene el último GeoRasterFile abierto sobre el temporal recibido
 java.lang.String getHost()
          Gets the WCS server's address.
 java.awt.geom.Point2D getMaxResolution()
          Gets the max resolution of the coverage.
 java.lang.String getParameter()
          Gets the paramenter in name-value pair-formed string.
 PxRaster getPxRaster()
          Gets the last created PxRaster Obtiene el último PxRaster creado
 java.awt.geom.Point2D getRes()
          Returns the coverage resolution obtiene la resolución de la cobertura (de la capa FlyrWCS)
 java.lang.String getSRS()
          Gets the coverage SRS Obtiene el SRS de la cobertura
 java.lang.String getTime()
          Gets the TIME parameter.
 java.awt.Image renderizeRaster(org.cresques.io.rasterOld.RasterBuf raster)
          Deprecated. (usado en drawJaume)
 void setBandB(int b)
          Sets the B-band.
 void setBandG(int g)
          Sets the G-band.
 void setBandR(int r)
          Sets the R-band.
 void setBBox(java.awt.geom.Rectangle2D rect)
          Sets the Bouning Box of the query according to the zoom.
 void setCoverageName(java.lang.String coverageName)
          Sets the coverage name.
 void setCoverageQuery(java.awt.geom.Rectangle2D bBox, java.awt.Dimension sz)
          Establishes the initial values that will be included in the query.
 void setCoverageQuery(java.lang.String coverageQuery)
          Sets the query string (an URL) that originates the coverage.
 void setDriver(FMapWCSDriver d)
          Sets the driver that works with the adaptor.
 void setFilterStack(RasterFilterStack filterStack)
          Sets the filter stack Establece la pila de filtros
 void setFormat(java.lang.String format)
          Sets the coverage format to download.
 void setFullExtent(java.awt.geom.Rectangle2D fullExtent)
          Sets the max extension for the coverage.
 void setHost(java.lang.String host)
          Sets the WCS server address.
 void setMaxResolution(java.awt.geom.Point2D res)
          Sets the MAX resolution supported by the coverage.
 void setParameter(java.lang.String parameter)
          Sets the parameter and the parameter value list of the coverage as a name-value pair form where, for the moment, value is a comma-separated values list.
 void setRes(java.awt.geom.Point2D res)
          Sets the coverage resolution (the layer's resolution) Establece la resolución de la cobertura (de la capa FlyrWCS)
 void setSRS(java.lang.String srs)
          Sets the coverage SRS Establece el SRS
 void setTime(java.lang.String time)
          Sets the TIME parameter (according with the OGC standard it may be a comma-separated value list, but probably the server will not support querys with more than one value) Establece el parámetro TIME (puede ser según OGC una lista de valores separados por comas pero casi seguro que el servidor no soportará más de un valor)
 void setTransparency(int t)
          Sets the transparency for the next PxRaster that is going to be loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstLoad

public boolean firstLoad
Constructor Detail

FMapWCSAdapter

public FMapWCSAdapter()
Method Detail

getRes

public java.awt.geom.Point2D getRes()
Returns the coverage resolution obtiene la resolución de la cobertura (de la capa FlyrWCS)

Returns:

setRes

public void setRes(java.awt.geom.Point2D res)
Sets the coverage resolution (the layer's resolution) Establece la resolución de la cobertura (de la capa FlyrWCS)

Parameters:
res -

setDriver

public void setDriver(FMapWCSDriver d)
Sets the driver that works with the adaptor. Establece el driver sobre el que actúa el adaptador


getDriver

public FMapWCSDriver getDriver()
Gets a ref to the object that implements the vectorial interface in order of the Strategy can optimize the driver's function. Obtiene una referencia al objeto que implementa la interfaz vectorial con el fin de que las Strategy puedan optimizar en función del driver.


draw

public void draw(java.awt.image.BufferedImage image,
                 java.awt.Graphics2D g,
                 ViewPort viewPort,
                 Cancellable cancel)
          throws DriverException,
                 ServerErrorResponseException
Automatically called by gvSIG Llamado automáticamente por gvSIG. Pinta la cobertura (ráster) en el ViewPort.

Throws:
ServerErrorResponseException
ServerErrorResponseException
DriverException

getFilterStack

public RasterFilterStack getFilterStack()
Gets the filter stack Obtiene la pila de filtros

Returns:

getAttributes

public java.util.ArrayList getAttributes()
Obtiene la lista de atributos de raster

Returns:
lista de atributos. Cada elmento de la lista es un array Object con dos elementos. El primero el nombre del atributo y el segundo el valor del mismo.

setFilterStack

public void setFilterStack(RasterFilterStack filterStack)
Sets the filter stack Establece la pila de filtros

Parameters:
filterStack - pila

getPxRaster

public PxRaster getPxRaster()
Gets the last created PxRaster Obtiene el último PxRaster creado

Returns:

getGeoRasterFile

public GeoRasterFile getGeoRasterFile()
Gets the last open GeoRasterFile against the temp file received Obtiene el último GeoRasterFile abierto sobre el temporal recibido

Returns:

setBBox

public void setBBox(java.awt.geom.Rectangle2D rect)
Sets the Bouning Box of the query according to the zoom. If the zoom's extension is greather than the coverage's full extent or the view only covers a part of the coverage's area, it cuts the required edges to those given by the coverage's full extent. Establece la Bounding Box de la consulta según el zoom. En caso de que el zoom abarque más de la estensión máxima (fullExtent) o la vista cubra solo una parte de la cobertura, acota los límites necesarios a aquellos marcados por la extensión máxima.

Parameters:
rect -

setCoverageQuery

public void setCoverageQuery(java.awt.geom.Rectangle2D bBox,
                             java.awt.Dimension sz)
Establishes the initial values that will be included in the query. Para establecer los valores iniciales que se incluiran en la consulta.


getCoverageName

public java.lang.String getCoverageName()
Returns the coverage name. Devuelve el nombre de la cobertura

Returns:

setCoverageName

public void setCoverageName(java.lang.String coverageName)
Sets the coverage name. Establece el nombre de la cobertura

Parameters:
coverageName -

getCoverageQuery

public java.lang.String getCoverageQuery()
Returns an string containing the query that originated the coverage. Obtiene una cadena que contiene la consulta que originó la cobertura.

Returns:
String

setCoverageQuery

public void setCoverageQuery(java.lang.String coverageQuery)
Sets the query string (an URL) that originates the coverage. Establece la cadena que contiene la consulta (URL) que origina la cobertura.

Parameters:
coverageQuery -

getFormat

public java.lang.String getFormat()
The coverage format. El formato de la cobertura.

Returns:
String

setFormat

public void setFormat(java.lang.String format)
Sets the coverage format to download. Establece el formato de la cobertura a descargar.

Parameters:
format -

getFullExtent

public java.awt.geom.Rectangle2D getFullExtent()
                                        throws java.io.IOException,
                                               DriverException
Gets the max coverage extension. Obtiene la extensión máxima de la cobertura

Returns:
Throws:
DriverException
java.io.IOException

setFullExtent

public void setFullExtent(java.awt.geom.Rectangle2D fullExtent)
Sets the max extension for the coverage. This value is specified by the server. Thus, this method should be used ONLY to reload this value from a saved proyect. Establece la extensión máxima de la cobertura. Éste valor viene especificado por el servidor. No debería de usarse más que para recuperar un proyecto guardado o desde el Wizard.

Parameters:
fullExtent -

getParameter

public java.lang.String getParameter()
Gets the paramenter in name-value pair-formed string. Recupera el valor de parámetro en forma de par nombre-valor: "nombre=valor"

Returns:
String

setParameter

public void setParameter(java.lang.String parameter)
Sets the parameter and the parameter value list of the coverage as a name-value pair form where, for the moment, value is a comma-separated values list. Establece el parámetro y la lista de valores de la cobertura en forma de par nombre-valor donde valor es, por el momento, una lista separada por comas

Parameters:
parameter -

getSRS

public java.lang.String getSRS()
Gets the coverage SRS Obtiene el SRS de la cobertura

Returns:
String

setSRS

public void setSRS(java.lang.String srs)
Sets the coverage SRS Establece el SRS

Parameters:
srs -

getTime

public java.lang.String getTime()
Gets the TIME parameter. Obtiene el parámetro TIME.

Returns:
String

setTime

public void setTime(java.lang.String time)
Sets the TIME parameter (according with the OGC standard it may be a comma-separated value list, but probably the server will not support querys with more than one value) Establece el parámetro TIME (puede ser según OGC una lista de valores separados por comas pero casi seguro que el servidor no soportará más de un valor)

Parameters:
time -

getHost

public java.lang.String getHost()
Gets the WCS server's address. Obtiene la dirección del servidor WCS

Returns:
String

setHost

public void setHost(java.lang.String host)
Sets the WCS server address. Establece la dirección del servidor WCS

Parameters:
host - (String)

renderizeRaster

public java.awt.Image renderizeRaster(org.cresques.io.rasterOld.RasterBuf raster)
Deprecated. (usado en drawJaume)

Construye un objeto Image a partir de un RasterBuf

Parameters:
raster -
Returns:
Image

getBbox

public java.awt.geom.Rectangle2D getBbox()
Returns the current bounding box. Devuelve la boundix box actual.

Returns:
Rectangle2D

getMaxResolution

public java.awt.geom.Point2D getMaxResolution()
Gets the max resolution of the coverage. Obtiene la resolución máxima de la cobertura

Returns:
maxRes

setMaxResolution

public void setMaxResolution(java.awt.geom.Point2D res)
Sets the MAX resolution supported by the coverage. The max resolution is given by the server within the DescribeCoverage document in the SpationDomain section. Use this method only to load this value from there (the DescribeCoverage document) of from an already saved project because an incorrect value will bring computing errors when doing "zoom to raster resolution". Establece la resolución MÁXIMA que soporta la cobertura. La resolución máxima viene fijada por el servidor dentro documento DescribeCoverage en la sección SpatialDomain. Use este método únicamente para cargar el valor para la resolución máxima desde allí o desde un proyecto guardado en anterioridad, puesto que un valor incorrecto reportará (conllevará) errores de cálculo cuando se haga un "zoom a la resolución del ráster".

Parameters:
res -

setTransparency

public void setTransparency(int t)
Sets the transparency for the next PxRaster that is going to be loaded. Asigna la transparencia para el siguiente PxRaster que se cargue.

Parameters:
t -

setBandR

public void setBandR(int r)
Sets the R-band. Asigna la banda R.

Parameters:
r -

setBandG

public void setBandG(int g)
Sets the G-band. Asigna la banda G

Parameters:
g -

setBandB

public void setBandB(int b)
Sets the B-band. Asigna la banda B

Parameters:
b -

getCoverageFromQuery

public void getCoverageFromQuery(java.lang.String query)
Gets the coverage (not the FLyrWCS) from an URL. Obtiene la cobertura (no la FLyrWCS) a partir de una URL.

Parameters:
query -