public class TileProvider extends AbstractRasterProvider implements TiledRasterProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCRIPTION |
static java.lang.String |
METADATA_DEFINITION_NAME |
static java.lang.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 |
---|
TileProvider() |
TileProvider(TileDataParametersImpl params,
DataStoreProviderServices storeServices) |
Modifier and Type | Method and Description |
---|---|
void |
addFile(java.io.File file)
Adds a new file.
|
void |
calculateBandCount()
Calculates the number of bands
|
void |
calculateColorInterpretation()
Calculates the color interpretation
|
void |
calculateDataType()
Calculates the data type of this provider
|
void |
calculateTransparency()
Calculates the transparency
|
void |
close()
Request to close de source
|
void |
deleteLayerFromCache()
Most of providers don't need tiles.
|
java.awt.geom.AffineTransform |
getAffineTransform()
Obtiene la transformación afin aplicada en las peticiones con coordenadas
reales.
|
int |
getBlockSize() |
Buffer |
getBuffer(Buffer rasterBuf,
BandList bandList,
java.io.File lastFile,
double ulx,
double uly,
double lrx,
double lry)
Assigns the list of bands RGB and read a window of data
|
ColorInterpretation |
getColorInterpretation()
Gets the object with the color interpretation by band
|
Extent |
getCoordsInLevel(java.awt.geom.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.
|
java.lang.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.
|
java.io.File |
getFileLayer() |
java.lang.String |
getFileSuffix()
Gets the suffix of the source file
|
java.lang.String |
getFullName()
Returns a more descriptive name for the provider that getName.
|
double |
getHeight()
Obtiene el ancho de la imagen
|
java.awt.Image |
getImageLegend()
Gets the legend as a image.
|
java.lang.String |
getInfoByPoint(double x,
double y,
ICancellable cancellable)
Gets the information in a real point
|
java.lang.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
|
int |
getNearestLevel(double pixelSize)
Gets the nearest level to the selected pixel size
|
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
|
double[] |
getPixelSizeByLevel() |
java.lang.String |
getProviderName()
Return the name of the provider.
|
java.io.File |
getRMFFile()
Gets the rmf file path.
|
Tile |
getTile(SpiRasterQuery q)
Gets a tile
|
TileServer |
getTileServer()
Gets the tile cache data server
|
int[] |
getTileSize(int level)
Returns the tile size in pixels if this providers have tiles
|
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()
Gets the number of zoom levels
|
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 |
isTiled()
Returns true if the provider support tiles
|
RasterProvider |
load()
Carga un fichero raster.
|
void |
loadBuffer(SpiRasterQuery q)
Load a buffer with the parameters.
|
boolean |
needEnhanced()
This function returns true if the image to be loaded needs a enhanced filter or
doesn't.
|
java.awt.geom.Point2D |
rasterToWorld(java.awt.geom.Point2D pt)
Convierte un punto desde coordenadas pixel a coordenadas del mundo.
|
java.lang.Object |
readBlock(int pos,
int blockHeight,
double scale)
Reads a complete block of data and returns an tridimensional array of the right type.
|
java.lang.Object |
readCompleteLine(int line,
int band) |
static void |
register()
Register in data manager
|
void |
registerTileProviderFormats(java.lang.Class<RasterProvider> c) |
void |
reload() |
void |
removeFile(java.io.File file)
Removes a file.
|
void |
setAffineTransform(java.awt.geom.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 |
setProvider(RasterProvider prov)
Assigns the provider associated to this tile server
|
void |
setSecondLevelTileServer(TileServer tileServer) |
void |
setStatus(RasterProvider provider)
Sets the status information using other provider of the same type.
|
void |
setTileServer(java.lang.Class<?> tileServer)
Sets the tile cache data server.
|
void |
setView(Extent e)
Asigna un nuevo Extent
|
java.net.URI |
translateURI(java.net.URI uri)
Traduce el nombre del fichero por un alias asignado por el propio driver.
|
java.awt.geom.Point2D |
worldToRaster(java.awt.geom.Point2D pt)
Convierte un punto desde del mundo a coordenadas pixel.
|
cloneProvider, doDispose, finalize, getBandCount, getBandCountByProvider, getBandPositionByProvider, getCellSize, getChildren, getChilds, getColorTable, getDataParameters, getDataSet, getDataType, getDefaultBandList, getExplorer, getExtentWithoutRot, getFileSize, getFileSizeByProvider, getFormatList, getGeoPointList, getHistogramComputer, getInternalProvider, getInternalProviderCount, getInterval, getMetadata, getName, getNoDataValue, getOwnAffineTransform, getPixelSizeX, getPixelSizeY, getProjection, getResource, getResourcesStorage, getRmfBlocksManager, getRMFFileForRemoteServices, getSourceId, getSourceType, getStatistics, getStoresRepository, getSubdatasetCount, getTime, getTimes, getTimes, getTimeSerials, getTransparency, getURI, getURIByBand, getURIByProvider, getURIOfFirstProvider, getWktProjection, init, isARGB, isGeoreferenced, isInside, isMosaic, isMultiFile, isReproyectable, isRGB, isRotated, isTimeSupported, loadFromRmf, loadObjectFromRmf, loadObjectFromRmf, loadObjectFromRmfFile, newProvider, open, resetAffineTransform, saveObjectToRmf, saveObjectToRmf, selectSubdataset, selectSubdataset, setColorInterpretation, setColorTable, setDataType, setFileSize, setFName, setGeoPointList, setNoDataValue, setProjection, setStatistics, setTimeSerials, singleDatasetInstance, translateFileName
allowWrite, clear, createCoverageSelection, createResource, delegate, getClassName, getDataStoreParameters, getDynClass, getDynValue, getEnvelope, getStoreServices, hasDynMethod, hasDynValue, implement, init, invokeDynMethod, invokeDynMethod, refresh, setDynValue, setMetadata
setTransaction
dispose, dispose
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowWrite, getStoreServices
refresh, setTransaction
hasDynMethod
clear, clone, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
public static java.lang.String NAME
public static java.lang.String DESCRIPTION
public static final java.lang.String METADATA_DEFINITION_NAME
public TileProvider() throws NotSupportedExtensionException
NotSupportedExtensionException
public TileProvider(TileDataParametersImpl params, DataStoreProviderServices storeServices) throws InitializeException
params
- storeServices
- InitializeException
public static void register()
public RasterProvider getInternalProvider()
TiledRasterProvider
getInternalProvider
in interface TiledRasterProvider
public java.awt.Image getImageLegend()
RasterProvider
getImageLegend
in interface RasterProvider
getImageLegend
in class AbstractRasterProvider
public ColorInterpretation getColorInterpretation()
RasterProvider
getColorInterpretation
in interface RasterProvider
getColorInterpretation
in class AbstractRasterProvider
public java.lang.String getFileSuffix()
RasterProvider
getFileSuffix
in interface RasterProvider
getFileSuffix
in class AbstractRasterProvider
public java.io.File getRMFFile()
RasterProvider
getRMFFile
in interface RasterProvider
getRMFFile
in class AbstractRasterProvider
public void registerTileProviderFormats(java.lang.Class<RasterProvider> c)
c
- public void setProvider(RasterProvider prov) throws InitializeException
prov
- InitializeException
NotSupportedExtensionException
public void init(DataStoreParameters params, DataStoreProviderServices storeServices) throws InitializeException
params
- storeServices
- InitializeException
NotSupportedExtensionException
public void calculateDataType()
public void calculateBandCount()
public void calculateColorInterpretation()
public void calculateTransparency()
public void reload()
reload
in interface RasterProvider
reload
in class AbstractRasterProvider
public int getZoomLevels()
TiledRasterProvider
getZoomLevels
in interface TiledRasterProvider
public int getNearestLevel(double pixelSize)
TiledRasterProvider
getNearestLevel
in interface TiledRasterProvider
public double[] getPixelSizeByLevel()
public Extent getCoordsInTheNearestLevel(Extent extent, int w, int h)
TiledRasterProvider
getCoordsInTheNearestLevel
in interface TiledRasterProvider
public Extent getCoordsInLevel(java.awt.geom.Point2D viewCenter, int level, int w, int h)
TiledRasterProvider
getCoordsInLevel
in interface TiledRasterProvider
public java.awt.geom.AffineTransform getAffineTransform()
RasterProvider
getAffineTransform
in interface RasterProvider
getAffineTransform
in class AbstractRasterProvider
public Extent getExtent()
getExtent
in interface RasterProvider
getExtent
in class AbstractRasterProvider
public RasterProvider load()
AbstractRasterProvider
load
in class AbstractRasterProvider
public boolean isOpen()
RasterProvider
isOpen
in interface RasterProvider
public boolean isTiled()
RasterProvider
isTiled
in interface RasterProvider
isTiled
in class AbstractRasterProvider
public void close()
DataStoreProvider
close
in interface RasterProvider
close
in class AbstractRasterProvider
public java.net.URI translateURI(java.net.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 java.lang.Object readCompleteLine(int line, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
line
- band
- InvalidSetViewException
FileNotOpenException
RasterDriverException
public java.io.File getFileLayer() throws RasterDriverException
RasterDriverException
public java.lang.Object readBlock(int pos, int blockHeight, double scale) throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException
RasterProvider
readBlock
in interface RasterProvider
InvalidSetViewException
FileNotOpenException
RasterDriverException
ProcessInterruptedException
public java.lang.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, java.io.File lastFile, double ulx, double uly, double lrx, double lry) throws RasterDriverException, ProcessInterruptedException
rasterBuf
- bandList
- lastFile
- ulx
- uly
- lrx
- lry
- RasterDriverException
ProcessInterruptedException
public Extent getZoomLevelCoordinates(int level, Extent extent, int w, int h)
level
- extent
- w
- h
- public boolean isRasterEnclosed()
RasterProvider
isRasterEnclosed
in interface RasterProvider
isRasterEnclosed
in class AbstractRasterProvider
public boolean needEnhanced()
RasterProvider
needEnhanced
in interface RasterProvider
needEnhanced
in class AbstractRasterProvider
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 int getBlockSize()
getBlockSize
in class AbstractRasterProvider
public void setAffineTransform(java.awt.geom.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 java.lang.String getProviderName()
DataStoreProvider
getProviderName
in interface CoverageStoreProvider
public java.awt.geom.Point2D rasterToWorld(java.awt.geom.Point2D pt)
rasterToWorld
in interface RasterProvider
rasterToWorld
in class AbstractRasterProvider
pt
- Punto a transformarpublic java.awt.geom.Point2D worldToRaster(java.awt.geom.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 java.lang.String getInfoByPoint(double x, double y, ICancellable cancellable) throws InfoByPointException
RasterProvider
getInfoByPoint
in interface RasterProvider
getInfoByPoint
in class AbstractRasterProvider
InfoByPointException
public java.lang.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[] getTileSize(int level)
TiledRasterProvider
getTileSize
in interface TiledRasterProvider
getTileSize
in class AbstractRasterProvider
public void deleteLayerFromCache()
AbstractRasterProvider
deleteLayerFromCache
in interface RasterProvider
deleteLayerFromCache
in class AbstractRasterProvider
public TileServer getTileServer()
RasterProvider
getTileServer
in interface RasterProvider
public void setSecondLevelTileServer(TileServer tileServer)
tileServer
- public void setTileServer(java.lang.Class<?> tileServer) throws InitializeException
TiledRasterProvider
setTileServer
in interface TiledRasterProvider
setTileServer
in class AbstractRasterProvider
InitializeException
public void addFile(java.io.File file) throws InvalidSourceException
RasterProvider
addFile
in interface RasterProvider
InvalidSourceException
public void removeFile(java.io.File file)
RasterProvider
removeFile
in interface RasterProvider
public java.lang.String getFullName()
DataStoreProvider
getFullName
in class AbstractRasterProvider