public class WMTSProvider extends AbstractRasterProvider implements RemoteRasterProvider, TiledRasterProvider
Modifier and Type | Class and Description |
---|---|
class |
WMTSProvider.PointInfo
Point information
|
class |
WMTSProvider.RequestThreadManager
This thread manages the number of tiles that have been thrown.
|
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION |
static int |
LIMITED_THREADS |
static String |
METADATA_DEFINITION_NAME |
static String |
NAME |
static int |
SEQUENTIAL |
static boolean |
TILED |
static int |
UNLIMITED_THREADS |
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 |
---|
WMTSProvider() |
WMTSProvider(String params)
Deprecated.
use
WMTSProvider(URI) , this constructor will be removed in gvSIG 2.5 |
WMTSProvider(URI uri)
Constructor.
|
WMTSProvider(WMTSDataParameters params,
DataStoreProviderServices storeServices) |
Modifier and Type | Method and Description |
---|---|
void |
addFile(File file)
Adds a new file.
|
WMTSStatus |
buildWMTSStatus(Rectangle2D r,
int bufWidth,
int bufHeight)
Builds the WMTSStatus object using the parameters and the request bounding box.
|
void |
close()
Request to close de source
|
AffineTransform |
getAffineTransform()
Obtiene la transformación afin aplicada en las peticiones con coordenadas
reales.
|
int |
getBlockSize() |
Buffer |
getBuffer(Buffer rasterBuf,
BandList bandList,
File lastFile,
double ulx,
double uly,
double lrx,
double lry)
Assigns the list of bands RGB and read a window of data
|
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
|
Extent |
getCoordsInLevel(Point2D viewCenter,
int level,
int w,
int h)
Calculates the extent of a zoom level using a center.
|
Extent |
getCoordsInTheNearestLevel(Extent extent,
int w,
int h)
Calculates the extent of a zoom level using other extent as a reference.
|
Object |
getData(int x,
int y,
int band)
Obtiene el valor del raster en la coordenada que se le pasa.
|
Extent |
getExtent()
Gets the bounding box in world coordinates.
|
Extent[] |
getExtentByResolutionLevel()
When a layer doesn't have grid subsets this will have a different bounding
box by resolution level.
|
String |
getFeatureInfo(double wcx,
double wcy,
int level)
Gets the information from a point
|
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
|
double |
getHeight()
Obtiene el ancho de la imagen
|
HistogramComputer |
getHistogramComputer()
Gets the object which computes the histogram
|
Image |
getImageLegend()
Gets the legend as a image.
|
String |
getInfoByPoint(int x,
int y,
Extent bbox,
int w,
int h,
ICancellable cancellable)
Gets the information in a pixel point.
|
RasterProvider |
getInternalProvider()
Gets the internal provider used to feed the TileProvider
|
File |
getLastRequest()
Gets the file of the last request.
|
Rectangle2D |
getLayerExtent(String layerName,
String srs)
Gets the bounding box of this layer
|
int |
getLevelFromRealCoords(Rectangle2D r,
int width)
Gets the resolution level from the real coordinates
|
int |
getLevelFromScale(double scale,
WMTSTileMatrixSet tileMatrixSet)
Gets the resolution level from the scale
|
String |
getName()
Returns the name associated to the provider.
|
int |
getNearestLevel(double pixelSize)
Gets the nearest level to the selected pixel size
|
NoData |
getNoDataValue()
Gets the nodata value.
|
WMTSClient |
getOGCClient()
Gets the connector from the URL
|
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
|
WMTSDataParameters |
getParameters() |
double[] |
getPixelSizeByLevel()
Returns a list of pixel sizes by level
|
IProjection |
getProjection()
Sets the provider projection
|
String |
getProviderName()
Return the name of the provider.
|
String |
getSRSCode()
Gets the srs code
|
Tile |
getTile(SpiRasterQuery q)
Gets a tile
|
WMTSTileMatrixSetLink |
getTileMatrixSetLink()
Get the tile matrix set using the crs
|
TileServer |
getTileServer()
Gets the tile cache data server
|
int[] |
getTileSize(int level)
Returns the tile size in pixels if this providers have tiles
|
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
|
Extent |
getZoomLevelCoordinates(int level,
Extent extent,
int w,
int h)
Calculates the extent of a zoom level using other extent as a reference.
|
int |
getZoomLevels()
Returns the number of levels
|
boolean |
hasGridSubsets()
Returns true if this layer has grid subsets
|
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
|
boolean |
isTiled()
Returns true if the provider support tiles
|
RasterProvider |
load()
Carga un fichero raster.
|
void |
loadBuffer(SpiRasterQuery q)
Load a buffer with the parameters.
|
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 |
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, getFullName, getGeoPointList, getInfoByPoint, getInternalProvider, getInternalProviderCount, getInterval, getMetadata, getOwnAffineTransform, getPixelSizeX, getPixelSizeY, getResource, getRmfBlocksManager, getRMFFile, getRMFFileForRemoteServices, getSourceId, getSourceType, getStatistics, getSubdatasetCount, getTime, getTimes, getTimes, getTimeSerials, getURI, getURIByBand, getURIByProvider, getURIOfFirstProvider, getWktProjection, init, isARGB, isGeoreferenced, isInside, isMosaic, isMultiFile, isRGB, isRotated, 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, hasDynMethod, 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, getOwnAffineTransform, getPixelSizeX, getPixelSizeY, getRMFFile, getSourceType, getStatistics, getSubdatasetCount, getTimeSerials, getURI, getURIByBand, getURIByProvider, getURIOfFirstProvider, getWktProjection, isGeoreferenced, isInside, isMosaic, isMultiFile, isRotated, isTimeSupported, loadObjectFromRmf, needEnhanced, reload, saveObjectToRmf, selectSubdataset, setColorInterpretation, setColorTable, setGeoPointList, setNoDataValue, setProjection, setStatistics, setTimeSerials
allowWrite, getStoreServices
getChilds, getExplorer, getFullName, getInterval, getResource, getSourceId, getTimes, getTimes, open, refresh
hasDynMethod
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
setTileServer
public static String NAME
public static String DESCRIPTION
public static final String METADATA_DEFINITION_NAME
public static boolean TILED
public static int SEQUENTIAL
public static int LIMITED_THREADS
public static int UNLIMITED_THREADS
public WMTSProvider() throws NotSupportedExtensionException
NotSupportedExtensionException
public WMTSProvider(String params) throws NotSupportedExtensionException, OpenException
WMTSProvider(URI)
, this constructor will be removed in gvSIG 2.5proj
- ProyecciónfName
- Nombre del ficheroNotSupportedExtensionException
OpenException
public WMTSProvider(URI uri) throws NotSupportedExtensionException
uri
- URI del ficheroNotSupportedExtensionException
public WMTSProvider(WMTSDataParameters params, DataStoreProviderServices storeServices) throws NotSupportedExtensionException
NotSupportedExtensionException
public static void register()
public WMTSClient getOGCClient() throws WMTSException
RemoteServiceException
WMTSException
public void init(DataStoreParameters params, DataStoreProviderServices storeServices) throws NotSupportedExtensionException
proj
- Proyecciónparam
- Parametros de cargaNotSupportedExtensionException
public boolean hasGridSubsets()
public ColorInterpretation getColorInterpretation()
getColorInterpretation
in interface RasterProvider
getColorInterpretation
in class AbstractRasterProvider
public boolean isTiled()
RasterProvider
isTiled
in interface RasterProvider
isTiled
in class AbstractRasterProvider
public AffineTransform getAffineTransform()
RasterProvider
getAffineTransform
in interface RasterProvider
getAffineTransform
in class AbstractRasterProvider
public Extent getExtent()
Gets the bounding box in world coordinates. If the layer has defined the BoundingBox tag, we will take this bounding box as entire extension of this layer, else we'll see if the tag WGS84BoundingBox is defined (it can be approximated). In this case we'll take WGS84BoundingBox as entire extension.
If the layer has grid subsets (TileMatrixLimits) then this will have a only extent but if the layer doesn't have grid subsets then this will have a different extent in each level resolution. In this case we need to know the extent for each level.
getExtent
in interface RasterProvider
getExtent
in class AbstractRasterProvider
public String getFileSuffix()
getFileSuffix
in interface RasterProvider
getFileSuffix
in class AbstractRasterProvider
public Extent[] getExtentByResolutionLevel()
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 NoData getNoDataValue()
RasterProvider
getNoDataValue
in interface RasterProvider
getNoDataValue
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 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 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 Buffer getBuffer(Buffer rasterBuf, BandList bandList, File lastFile, double ulx, double uly, double lrx, double lry) throws RasterDriverException, ProcessInterruptedException
rasterBuf
- bandList
- lastFile
- ulx
- uly
- lrx
- lry
- RasterDriverException
ProcessInterruptedException
public int getZoomLevels()
getZoomLevels
in interface TiledRasterProvider
public Extent getCoordsInTheNearestLevel(Extent extent, int w, int h)
TiledRasterProvider
getCoordsInTheNearestLevel
in interface TiledRasterProvider
public Extent getCoordsInLevel(Point2D viewCenter, int level, int w, int h)
TiledRasterProvider
getCoordsInLevel
in interface TiledRasterProvider
public Extent getZoomLevelCoordinates(int level, Extent extent, int w, int h)
level
- extent
- w
- h
- public double[] getPixelSizeByLevel()
public Tile getTile(SpiRasterQuery q) throws TileGettingException
TiledRasterProvider
getTile
in interface TiledRasterProvider
TileGettingException
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 String getFeatureInfo(double wcx, double wcy, int level) throws RasterDriverException
wcx
- wcy
- level
- RasterDriverException
public WMTSStatus buildWMTSStatus(Rectangle2D r, int bufWidth, int bufHeight) throws RasterDriverException
r
- bufWidth
- RasterDriverException
public int getLevelFromRealCoords(Rectangle2D r, int width) throws RasterDriverException
r
- RasterDriverException
public int getLevelFromScale(double scale, WMTSTileMatrixSet tileMatrixSet) throws RasterDriverException
scale
- tileMatrixSet
- RasterDriverException
public WMTSTileMatrixSetLink getTileMatrixSetLink()
srs
- public Image getImageLegend()
RasterProvider
getImageLegend
in interface RasterProvider
getImageLegend
in class AbstractRasterProvider
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 WMTSDataParameters getParameters()
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 File getLastRequest()
RemoteRasterProvider
getLastRequest
in interface RemoteRasterProvider
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 int getNearestLevel(double pixelSize)
TiledRasterProvider
getNearestLevel
in interface TiledRasterProvider
public TileServer getTileServer()
RasterProvider
getTileServer
in interface RasterProvider
public int[] getTileSize(int level)
TiledRasterProvider
getTileSize
in interface TiledRasterProvider
getTileSize
in class AbstractRasterProvider
public boolean isRasterEnclosed()
RasterProvider
isRasterEnclosed
in interface RasterProvider
isRasterEnclosed
in class AbstractRasterProvider
public Buffer getBufferLastRequest() throws ProcessInterruptedException, RasterDriverException
RemoteRasterProvider
getBufferLastRequest
in interface RemoteRasterProvider
ProcessInterruptedException
RasterDriverException
public String getSRSCode()
public RasterProvider getInternalProvider()
TiledRasterProvider
getInternalProvider
in interface TiledRasterProvider
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
public IProjection getProjection()
RasterProvider
getProjection
in interface RasterProvider
getProjection
in class AbstractRasterProvider