public class WMSProvider extends AbstractRasterProvider implements RemoteRasterProvider
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION |
static String |
METADATA_DEFINITION_NAME |
static String |
NAME |
ALPHA_BAND, bandCount, BLUE_BAND, bytesReaded, colorTable, externalTransformation, fileSize, fileUtil, geoPointList, GREEN_BAND, histogram, lineCnt, noData, ownTransformation, param, proj, rasterUtil, RED_BAND, rmfBlocksManager, selectedSubdatasetID, serialInfo, stats, storeServices, tileServer, transparency, uri
metadata, parameters, store
Constructor and Description |
---|
WMSProvider() |
WMSProvider(String params)
Deprecated.
use
WMSProvider(URI) , this constructor will be removed in gvSIG 2.5 |
WMSProvider(URI uri) |
WMSProvider(WMSDataParameters params,
DataStoreProviderServices storeServices)
Deprecated.
use
WMSProvider(URI) , this constructor will be removed in gvSIG 2.5 |
Modifier and Type | Method and Description |
---|---|
void |
addFile(File file)
Adds a new file.
|
void |
close()
Request to close de source
|
AffineTransform |
getAffineTransform()
Obtiene la transformación afin aplicada en las peticiones con coordenadas
reales.
|
int |
getBlockSize() |
Buffer |
getBufferLastRequest()
Gets the buffer of the last request.
|
ColorInterpretation |
getColorInterpretation()
Obtiene el objeto que contiene que contiene la interpretación de
color por banda
|
WMSConnector |
getConnector()
Gets the connector from the URL
|
static WMSConnector |
getConnectorFromURL(URL url,
boolean updating) |
Object |
getData(int x,
int y,
int band)
Obtiene el valor del raster en la coordenada que se le pasa.
|
Extent |
getExtent()
Calcula el extent en coordenadas del mundo real
|
File |
getFileLayer()
When the remote layer has fixed size this method downloads the file and return its reference.
|
String |
getFileSuffix()
Gets the suffix of the downloaded image
|
String |
getFullName()
Returns a more descriptive name for the provider that getName.
|
double |
getHeight()
Obtiene el ancho de la imagen
|
HistogramComputer |
getHistogramComputer()
Gets the object which computes the histogram
|
Image |
getImageLegend()
Assigns the list of bands RGB and read a window of data
|
String |
getInfoByPoint(int x,
int y,
Extent bbox,
int w,
int h,
ICancellable cancellable)
Gets the information in a pixel point.
|
File |
getLastRequest()
Gets the file of the last request.
|
double |
getLastRequestHeight() |
double |
getLastRequestWidth() |
Rectangle2D |
getLayerExtent(String layerName,
String srs)
Gets the bounding box of this layer
|
String |
getName()
Returns the name associated to the provider.
|
int |
getOverviewCount(int band)
Obtiene el número de overviews de una banda
|
int |
getOverviewHeight(int band,
int overview)
Obtiene el alto de una overview de una banda
|
int |
getOverviewWidth(int band,
int overview)
Obtiene el ancho de una overview de una banda
|
WMSDataParameters |
getParameters()
Gets WMS parameters
|
String |
getProviderName()
Return the name of the provider.
|
File |
getRMFFile()
Gets the rmf file path.
|
TileServer |
getTileServer()
Gets the tile cache data server
|
Transparency |
getTransparency()
Obtiene el estado de transparencia a partir de los estados de transparencia de todos
los ficheros que lo componen.
|
Extent |
getView()
Obtiene el extent asignado
|
double |
getWidth()
Obtiene el ancho de la imagen
|
void |
init(DataStoreParameters params,
DataStoreProviderServices storeServices)
Crea las referencias al fichero y carga
las estructuras con la información y los metadatos.
|
boolean |
isOpen()
Returns true if this provider is open and false if don't
|
boolean |
isOverviewsSupported()
Informa de si el dataset soporta overviews o no.
|
boolean |
isRasterEnclosed()
Some services neither has limits nor pixel size.
|
boolean |
isReproyectable()
Devuelve si el Dataset es reproyectable
|
RasterProvider |
load()
Carga un fichero raster.
|
void |
loadBuffer(SpiRasterQuery q)
Load a buffer with the parameters.
|
WMSStatus |
loadWMSStatus(Rectangle2D bBox) |
Point2D |
rasterToWorld(Point2D pt)
Convierte un punto desde coordenadas pixel a coordenadas del mundo.
|
Object |
readBlock(int pos,
int blockHeight,
double scale)
Reads a complete block of data and returns an tridimensional array of the right type.
|
Object |
readCompleteLine(int line,
int band) |
static void |
register() |
void |
registerTileProviderFormats(Class<RasterProvider> c) |
void |
removeFile(File file)
Removes a file.
|
void |
setAffineTransform(AffineTransform t)
Asigna una transformación al raster para que se tenga en cuenta en la
asignación del setView.
|
void |
setParam(DataStoreProviderServices storeServices,
DataStoreParameters param)
ASigna el parámetro de inicialización del driver.
|
void |
setStatus(RasterProvider provider)
Sets the status information using other provider of the same type.
|
void |
setView(Extent e)
Asigna un nuevo Extent
|
URI |
translateURI(URI uri)
Traduce el nombre del fichero por un alias asignado por el propio driver.
|
Point2D |
worldToRaster(Point2D pt)
Convierte un punto desde del mundo a coordenadas pixel.
|
cloneProvider, deleteLayerFromCache, doDispose, finalize, getBandCount, getBandCountByProvider, getBandPositionByProvider, getCellSize, getChilds, getColorTable, getDataParameters, getDataSet, getDataType, getDefaultBandList, getExplorer, getExtentWithoutRot, getFileSize, getFileSizeByProvider, getFormatList, getGeoPointList, getInfoByPoint, getInternalProvider, getInternalProviderCount, getInterval, getMetadata, getNoDataValue, getOwnAffineTransform, getPixelSizeX, getPixelSizeY, getProjection, getResource, getRmfBlocksManager, getRMFFileForRemoteServices, getSourceId, getSourceType, getStatistics, getSubdatasetCount, getTileSize, getTime, getTimes, getTimes, getTimeSerials, getURI, getURIByBand, getURIByProvider, getURIOfFirstProvider, getWktProjection, init, isARGB, isGeoreferenced, isInside, isMosaic, isMultiFile, isRGB, isRotated, isTiled, isTimeSupported, loadFromRmf, loadObjectFromRmf, loadObjectFromRmf, loadObjectFromRmfFile, needEnhanced, newProvider, open, reload, resetAffineTransform, saveObjectToRmf, saveObjectToRmf, selectSubdataset, selectSubdataset, setColorInterpretation, setColorTable, setDataType, setFileSize, setFName, setGeoPointList, setNoDataValue, setProjection, setStatistics, setTileServer, setTimeSerials, singleDatasetInstance, translateFileName
allowWrite, clear, createCoverageSelection, createResource, delegate, getClassName, getDataStoreParameters, getDynClass, getDynValue, getEnvelope, getStoreServices, hasDynValue, implement, init, invokeDynMethod, invokeDynMethod, refresh, setDynValue, setMetadata
dispose, dispose
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cloneProvider, deleteLayerFromCache, getBandCount, getBandCountByProvider, getBandPositionByProvider, getCellSize, getColorTable, getDataParameters, getDataSet, getDataType, getExtentWithoutRot, getFileSizeByProvider, getFormatList, getGeoPointList, getInfoByPoint, getInternalProvider, getInternalProviderCount, getMetadata, getNoDataValue, getOwnAffineTransform, getPixelSizeX, getPixelSizeY, getProjection, getSourceType, getStatistics, getSubdatasetCount, getTimeSerials, getURI, getURIByBand, getURIByProvider, getURIOfFirstProvider, getWktProjection, isGeoreferenced, isInside, isMosaic, isMultiFile, isRotated, isTiled, isTimeSupported, loadObjectFromRmf, needEnhanced, reload, saveObjectToRmf, selectSubdataset, setColorInterpretation, setColorTable, setGeoPointList, setNoDataValue, setProjection, setStatistics, setTimeSerials
allowWrite, getStoreServices
getChilds, getExplorer, getInterval, getResource, getSourceId, getTimes, getTimes, open, refresh
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
public static String NAME
public static String DESCRIPTION
public static final String METADATA_DEFINITION_NAME
public WMSProvider() throws NotSupportedExtensionException
NotSupportedExtensionException
public WMSProvider(String params) throws InitializeException, OpenException
WMSProvider(URI)
, this constructor will be removed in gvSIG 2.5public WMSProvider(URI uri) throws InitializeException
InitializeException
public WMSProvider(WMSDataParameters params, DataStoreProviderServices storeServices) throws InitializeException
WMSProvider(URI)
, this constructor will be removed in gvSIG 2.5fName
- Nombre del ficheroOpenException
NotSupportedExtensionException
InitializeException
public static void register()
public void registerTileProviderFormats(Class<RasterProvider> c)
public WMSConnector getConnector() throws RemoteServiceException
RemoteServiceException
public void init(DataStoreParameters params, DataStoreProviderServices storeServices) throws InitializeException
proj
- Proyecciónparam
- Parametros de cargaNotSupportedExtensionException
InitializeException
public static final WMSConnector getConnectorFromURL(URL url, boolean updating) throws IOException
IOException
public ColorInterpretation getColorInterpretation()
getColorInterpretation
in interface RasterProvider
getColorInterpretation
in class AbstractRasterProvider
public AffineTransform getAffineTransform()
RasterProvider
getAffineTransform
in interface RasterProvider
getAffineTransform
in class AbstractRasterProvider
public Extent getExtent()
getExtent
in interface RasterProvider
getExtent
in class AbstractRasterProvider
public Rectangle2D getLayerExtent(String layerName, String srs) throws RemoteServiceException
RemoteRasterProvider
getLayerExtent
in interface RemoteRasterProvider
RemoteServiceException
public RasterProvider load()
AbstractRasterProvider
load
in class AbstractRasterProvider
public boolean isOpen()
RasterProvider
isOpen
in interface RasterProvider
public void close()
DataStoreProvider
close
in interface RasterProvider
close
in class AbstractRasterProvider
public Transparency getTransparency()
RasterProvider
getTransparency
in interface RasterProvider
getTransparency
in class AbstractRasterProvider
public URI translateURI(URI uri)
AbstractRasterProvider
translateURI
in class AbstractRasterProvider
public void setView(Extent e)
AbstractRasterProvider
setView
in class AbstractRasterProvider
e
- Extentpublic Extent getView()
AbstractRasterProvider
getView
in interface RasterProvider
getView
in class AbstractRasterProvider
public double getWidth()
AbstractRasterProvider
getWidth
in interface RasterProvider
getWidth
in class AbstractRasterProvider
public double getHeight()
AbstractRasterProvider
getHeight
in interface RasterProvider
getHeight
in class AbstractRasterProvider
public WMSDataParameters getParameters()
public Object readCompleteLine(int line, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
public File getFileLayer() throws RasterDriverException
getFileLayer
in interface RemoteRasterProvider
RasterDriverException
public Object readBlock(int pos, int blockHeight, double scale) throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException
readBlock
in interface RasterProvider
pos
- Posición donde se empieza a leerblockHeight
- Altura máxima del bloque leidoInvalidSetViewException
FileNotOpenException
RasterDriverException
ProcessInterruptedException
public double getLastRequestHeight() throws RasterDriverException
RasterDriverException
public double getLastRequestWidth() throws RasterDriverException
RasterDriverException
public File getLastRequest()
RemoteRasterProvider
getLastRequest
in interface RemoteRasterProvider
public Buffer getBufferLastRequest() throws ProcessInterruptedException, RasterDriverException
RemoteRasterProvider
getBufferLastRequest
in interface RemoteRasterProvider
ProcessInterruptedException
RasterDriverException
public Object getData(int x, int y, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
AbstractRasterProvider
getData
in interface RasterProvider
getData
in class AbstractRasterProvider
x
- coordenada Xy
- coordenada YInvalidSetViewException
FileNotOpenException
RasterDriverException
public WMSStatus loadWMSStatus(Rectangle2D bBox)
public void loadBuffer(SpiRasterQuery q) throws ProcessInterruptedException, RasterDriverException
AbstractRasterProvider
SpiRasterQuery
by the RasterDataStore
. The other
parameters have been calculated too, all of them adjusted to the raster limits. The provider only
have to read the parameters and load the buffer.loadBuffer
in class AbstractRasterProvider
ProcessInterruptedException
RasterDriverException
public Image getImageLegend()
getImageLegend
in interface RasterProvider
getImageLegend
in class AbstractRasterProvider
rasterBuf
- bandList
- lastFile
- ulx
- uly
- lrx
- lry
- RasterDriverException
ProcessInterruptedException
public int getBlockSize()
getBlockSize
in class AbstractRasterProvider
public void setAffineTransform(AffineTransform t)
RasterProvider
setAffineTransform
in interface RasterProvider
setAffineTransform
in class AbstractRasterProvider
t
- Transformación afín a aplicarpublic int getOverviewCount(int band) throws BandAccessException, RasterDriverException
RasterProvider
getOverviewCount
in interface RasterProvider
BandAccessException
RasterDriverException
public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException
RasterProvider
getOverviewWidth
in interface RasterProvider
getOverviewWidth
in class AbstractRasterProvider
BandAccessException
RasterDriverException
public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException
RasterProvider
getOverviewHeight
in interface RasterProvider
getOverviewHeight
in class AbstractRasterProvider
BandAccessException
RasterDriverException
public boolean isOverviewsSupported()
AbstractRasterProvider
isOverviewsSupported
in interface RasterProvider
isOverviewsSupported
in class AbstractRasterProvider
public boolean isReproyectable()
AbstractRasterProvider
isReproyectable
in interface RasterProvider
isReproyectable
in class AbstractRasterProvider
public String getProviderName()
DataStoreProvider
getProviderName
in interface CoverageStoreProvider
public String getName()
DataStoreProvider
getName
in class AbstractRasterProvider
public String getFullName()
DataStoreProvider
getFullName
in class AbstractRasterProvider
public Point2D rasterToWorld(Point2D pt)
rasterToWorld
in interface RasterProvider
rasterToWorld
in class AbstractRasterProvider
pt
- Punto a transformarpublic Point2D worldToRaster(Point2D pt)
worldToRaster
in interface RasterProvider
worldToRaster
in class AbstractRasterProvider
pt
- Punto a transformarpublic void setStatus(RasterProvider provider)
RasterProvider
setStatus
in interface RasterProvider
public void setParam(DataStoreProviderServices storeServices, DataStoreParameters param)
setParam
in class AbstractRasterProvider
public String getInfoByPoint(int x, int y, Extent bbox, int w, int h, ICancellable cancellable) throws InfoByPointException
RasterProvider
getInfoByPoint
in interface RasterProvider
getInfoByPoint
in class AbstractRasterProvider
x
- X Pixel positiony
- Y pixel positionbbox
- Bounding box of the windoww
- Width in pixels of the windowh
- Height in pixels of the windowInfoByPointException
public String getFileSuffix()
getFileSuffix
in interface RasterProvider
getFileSuffix
in class AbstractRasterProvider
public TileServer getTileServer()
RasterProvider
getTileServer
in interface RasterProvider
public boolean isRasterEnclosed()
RasterProvider
isRasterEnclosed
in interface RasterProvider
isRasterEnclosed
in class AbstractRasterProvider
public File getRMFFile()
RasterProvider
getRMFFile
in interface RasterProvider
getRMFFile
in class AbstractRasterProvider
public HistogramComputer getHistogramComputer()
Histogramable
getHistogramComputer
in interface Histogramable
getHistogramComputer
in class AbstractRasterProvider
public void addFile(File file) throws InvalidSourceException
RasterProvider
addFile
in interface RasterProvider
InvalidSourceException
public void removeFile(File file)
RasterProvider
removeFile
in interface RasterProvider