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

java.lang.Object
  extended byFLyrDefault
      extended bycom.iver.cit.gvsig.fmap.layers.FLyrWCS

public class FLyrWCS
extends FLyrDefault

Class for the WCS layer. Capa para el WCS.

Author:
jaume - jaume.dominguez@iver.es
See Also:
Serialized Form

Constructor Summary
FLyrWCS()
           
 
Method Summary
 void draw(java.awt.image.BufferedImage image, java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale)
          Draws the layer on the ViewPort using PxRaster.
 java.util.ArrayList getAttributes()
           
 java.lang.String getCoverageName()
          Returns the coverage name.
 RasterFilterStack getFilterStack()
          Devuelve la pila de filtros aplicada sobre la capa raster.
 java.lang.String getFormat()
          Returns the coverage format.
 java.awt.geom.Rectangle2D getFullExtent()
          The full extent of the layer.
 double getHeight()
           
 java.lang.String getHost()
          Returns the WCS server URL.
 java.lang.String getLabel()
          Recovers the name of the layer shown on the TOC.
 java.awt.geom.Point2D getMaxResolution()
          Gets the max resolution allowed by the coverage.
 double getMaxX()
           
 double getMaxY()
           
 double getMinX()
           
 double getMinY()
           
 java.lang.String getParameter()
          Returns the parameter value.
 int[] getPixel(double wcx, double wcy)
           
 RasterAdapter getSource()
           
 java.lang.String getSRS()
          Returns the current SRS.
 StatusRasterInterface getStatus()
          Obtiene el estado del raster
 java.lang.String getTime()
          Returns the TIME value in the WCS query.
 FMapWCSAdapter getWCSAdaptor()
          Returns the adaptor.
 java.util.Hashtable getWCSProperties()
           
 double getWidth()
           
 XMLEntity getXMLEntity()
          Returns the XMLEntity containing the necessary info for reproduce the layer.
 void initFromQueryString(java.lang.String queryString)
          Builds a coverage starting from a full GetCoverage URL.
 void initFromQueryString2(java.lang.String queryString)
          Builds a coverage starting from a full GetCoverage URL.
 void print(java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale)
          Prints the layer.
 java.lang.String queryByPoint(java.awt.Point p)
           
 void setBand(int flag, int nBand)
           
 void setCoverageName(java.lang.String coverageName)
          Sets the COVERAGE parameter within the WCS query.
 void setFilterStack(RasterFilterStack stack)
          Asigna la pila de filtros aplicada al raster
 void setFormat(java.lang.String format)
          Sets the FORMAT parameter that we are requesting the WCS coverage.
 void setFullExtent(java.awt.geom.Rectangle2D rect)
          Sets the layer's full extent.
 void setHost(java.lang.String host)
          Sets the server's URL.
 void setLabel(java.lang.String lbl)
          Sets the layer's label.
 void setMaxResolution(java.awt.geom.Point2D res)
          Sets the MAX resolution supported by the coverage.
 void setParameter(java.lang.String parameter)
          Sets the parameter.
 void setPos(int x, int y)
           
 void setPosWC(double x, double y)
           
 void setRGB(int r, int g, int b)
           
 void setSource(RasterAdapter ra)
           
 void setSRS(java.lang.String srs)
          Sets the SRS parameter within the WCS query.
 void setStatus(StatusRasterInterface status)
          Asignar el estado del raster
 void setTime(java.lang.String time)
          Sets the TIME parameter within the WCS query.
 void setTransparency(int trans)
           
 void setWCSAdaptor(FMapWCSAdapter wcs)
          Deprecated.  
 void setXMLEntity(XMLEntity xml)
          Reproduces the layer from an XMLEntity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FLyrWCS

public FLyrWCS()
Method Detail

getXMLEntity

public XMLEntity getXMLEntity()
                       throws XMLException
Returns the XMLEntity containing the necessary info for reproduce the layer. Devuelve el XMLEntity con la información necesaria para reproducir la capa.

Returns:
XMLEntity.
Throws:
XMLException

setXMLEntity

public void setXMLEntity(XMLEntity xml)
                  throws XMLException
Reproduces the layer from an XMLEntity. A partir del XMLEntity reproduce la capa.

Parameters:
xml - XMLEntity
Throws:
XMLException
DriverException
DriverIOException

getFullExtent

public java.awt.geom.Rectangle2D getFullExtent()
The full extent of the layer. La extensión completa de la layer.

Returns:
Rectangle2D

draw

public void draw(java.awt.image.BufferedImage image,
                 java.awt.Graphics2D g,
                 ViewPort viewPort,
                 Cancellable cancel,
                 double scale)
          throws DriverException
Draws the layer on the ViewPort using PxRaster. Dibuja la capa en el ViewPort con PxRaster.

Throws:
DriverException

print

public void print(java.awt.Graphics2D g,
                  ViewPort viewPort,
                  Cancellable cancel,
                  double scale)
           throws DriverException
Prints the layer. Imprime la cobertura.

Throws:
DriverException

setLabel

public void setLabel(java.lang.String lbl)
Sets the layer's label. That what is going to be used at the TOC. Establece la etiqueta de la cobertura. La que se usará en el TOC.

Parameters:
lbl -

setFullExtent

public void setFullExtent(java.awt.geom.Rectangle2D rect)
Sets the layer's full extent. Establece la extensión máxima de la capa.

Parameters:
rect -

getLabel

public java.lang.String getLabel()
Recovers the name of the layer shown on the TOC. The text used for the name is not the actual coverage's name but that what appears in the wizard's text field which initially correponds with the "label" specified by the server for the coverage and may be edited by the user for choose whatever she/he wants. Recupera el nom de la capa mostrada al TOC. El text per al nom no és el nom de la cobertura sinó el text que apareix al camp de text del wizard, que es correspon amb la "label" que el servidor especifica per a la covertura, i pot ser modificat per l'usuari al wizard per a gastar el que dessitge.

Returns:
String

getWCSProperties

public java.util.Hashtable getWCSProperties()

getCoverageName

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

Returns:
String

getFormat

public java.lang.String getFormat()
Returns the coverage format. Obtiene el formato en que la cobertura está codificado.

Returns:
String

getHost

public java.lang.String getHost()
Returns the WCS server URL. Obtiene la dirección URL del servidor WCS

Returns:
String

getParameter

public java.lang.String getParameter()
Returns the parameter value. Obtiene el valor del parámetro.

Returns:
String

getSRS

public java.lang.String getSRS()
Returns the current SRS. Obtiene el SRS actual de la cobertura.

Returns:
String

getTime

public java.lang.String getTime()
Returns the TIME value in the WCS query. Obtiene el valor para TIME en la consulta WCS.

Returns:
String

setFormat

public void setFormat(java.lang.String format)
Sets the FORMAT parameter that we are requesting the WCS coverage. Establece el parámetro FORMAT en que se pide la cobertura WCS

Parameters:
format -

setHost

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

Parameters:
host -

setParameter

public void setParameter(java.lang.String parameter)
Sets the parameter. It is defined by a name-value pair and the value is a comma-separated list of values. Establece el nombre y el valor (lista de valores separados por comas) del parámetro de la consulta WCS

Parameters:
parameter -

setSRS

public void setSRS(java.lang.String srs)
Sets the SRS parameter within the WCS query. Establece el SRS de la consulta WCS.

Parameters:
srs -

setTime

public void setTime(java.lang.String time)
Sets the TIME parameter within the WCS query. Establece el parámetro TIME de la consulta WCS.

Parameters:
time -

setCoverageName

public void setCoverageName(java.lang.String coverageName)
Sets the COVERAGE parameter within the WCS query. Establece el parámetro COVERAGE de la consulta WCS.

Parameters:
coverageName -

getMaxResolution

public java.awt.geom.Point2D getMaxResolution()
Gets the max resolution allowed by the coverage. Requesting a higher resolution than this value does not cause any error, but the info responsed is just an interpolation. In exchange for obtaining a greater file and without additional information, we can easily connect it at the View. Obtiene la resolución máxima soportada por la cobertura. La petición de una resolución superior a la soportada no provoca ningún error, aunque la información obtenida sólo es una mera interpolación de información. A cambio de obtener un archivo mayor y sin información adicional, podemos fácilmente acoplarlo a la vista.

Returns:
double

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 -

getWCSAdaptor

public FMapWCSAdapter getWCSAdaptor()
Returns the adaptor. Obtiene el adaptor.


setWCSAdaptor

public void setWCSAdaptor(FMapWCSAdapter wcs)
Deprecated.  

Sets the adaptor. Establece el adaptador.

Parameters:
wcs -

initFromQueryString

public void initFromQueryString(java.lang.String queryString)
Builds a coverage starting from a full GetCoverage URL. (Using this is not a regular function) Inicializa una cobertura a partir de una URL GetCoverage completa. (To use this method supposes to skip all the regular operation)


setStatus

public void setStatus(StatusRasterInterface status)
Asignar el estado del raster

Parameters:
status -

getStatus

public StatusRasterInterface getStatus()
Obtiene el estado del raster

Returns:

initFromQueryString2

public void initFromQueryString2(java.lang.String queryString)
Builds a coverage starting from a full GetCoverage URL. (Using this is not a regular function) Inicializa una cobertura a partir de una URL GetCoverage completa. (Usar este método supone saltarse todo el funcionamiento normal) TODO Por completar y probar

Parameters:
queryString -

getFilterStack

public RasterFilterStack getFilterStack()
Devuelve la pila de filtros aplicada sobre la capa raster.

Returns:
RasterFilterStack.

setFilterStack

public void setFilterStack(RasterFilterStack stack)
Asigna la pila de filtros aplicada al raster

Returns:

setTransparency

public void setTransparency(int trans)

setBand

public void setBand(int flag,
                    int nBand)

getAttributes

public java.util.ArrayList getAttributes()

getHeight

public double getHeight()

getMaxX

public double getMaxX()

getMaxY

public double getMaxY()

getMinX

public double getMinX()

getMinY

public double getMinY()

getPixel

public int[] getPixel(double wcx,
                      double wcy)

getSource

public RasterAdapter getSource()

getWidth

public double getWidth()

setPos

public void setPos(int x,
                   int y)

setPosWC

public void setPosWC(double x,
                     double y)

setRGB

public void setRGB(int r,
                   int g,
                   int b)

setSource

public void setSource(RasterAdapter ra)

queryByPoint

public java.lang.String queryByPoint(java.awt.Point p)
                              throws DriverException
Throws:
DriverException