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, urimetadata, 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, translateFileNameallowWrite, clear, createCoverageSelection, createResource, delegate, getClassName, getDataStoreParameters, getDynClass, getDynValue, getEnvelope, getStoreServices, hasDynMethod, hasDynValue, implement, init, invokeDynMethod, invokeDynMethod, refresh, setDynValue, setMetadatasetTransactiondispose, disposeclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallowWrite, getStoreServicesrefresh, setTransactionhasDynMethodclear, clone, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuedisposepublic static java.lang.String NAME
public static java.lang.String DESCRIPTION
public static final java.lang.String METADATA_DEFINITION_NAME
public TileProvider()
throws NotSupportedExtensionException
NotSupportedExtensionExceptionpublic TileProvider(TileDataParametersImpl params, DataStoreProviderServices storeServices) throws InitializeException
params - storeServices - InitializeExceptionpublic static void register()
public RasterProvider getInternalProvider()
TiledRasterProvidergetInternalProvider in interface TiledRasterProviderpublic java.awt.Image getImageLegend()
RasterProvidergetImageLegend in interface RasterProvidergetImageLegend in class AbstractRasterProviderpublic ColorInterpretation getColorInterpretation()
RasterProvidergetColorInterpretation in interface RasterProvidergetColorInterpretation in class AbstractRasterProviderpublic java.lang.String getFileSuffix()
RasterProvidergetFileSuffix in interface RasterProvidergetFileSuffix in class AbstractRasterProviderpublic java.io.File getRMFFile()
RasterProvidergetRMFFile in interface RasterProvidergetRMFFile in class AbstractRasterProviderpublic void registerTileProviderFormats(java.lang.Class<RasterProvider> c)
c - public void setProvider(RasterProvider prov) throws InitializeException
prov - InitializeExceptionNotSupportedExtensionExceptionpublic void init(DataStoreParameters params, DataStoreProviderServices storeServices) throws InitializeException
params - storeServices - InitializeExceptionNotSupportedExtensionExceptionpublic void calculateDataType()
public void calculateBandCount()
public void calculateColorInterpretation()
public void calculateTransparency()
public void reload()
reload in interface RasterProviderreload in class AbstractRasterProviderpublic int getZoomLevels()
TiledRasterProvidergetZoomLevels in interface TiledRasterProviderpublic int getNearestLevel(double pixelSize)
TiledRasterProvidergetNearestLevel in interface TiledRasterProviderpublic double[] getPixelSizeByLevel()
public Extent getCoordsInTheNearestLevel(Extent extent, int w, int h)
TiledRasterProvidergetCoordsInTheNearestLevel in interface TiledRasterProviderpublic Extent getCoordsInLevel(java.awt.geom.Point2D viewCenter, int level, int w, int h)
TiledRasterProvidergetCoordsInLevel in interface TiledRasterProviderpublic java.awt.geom.AffineTransform getAffineTransform()
RasterProvidergetAffineTransform in interface RasterProvidergetAffineTransform in class AbstractRasterProviderpublic Extent getExtent()
getExtent in interface RasterProvidergetExtent in class AbstractRasterProviderpublic RasterProvider load()
AbstractRasterProviderload in class AbstractRasterProviderpublic boolean isOpen()
RasterProviderisOpen in interface RasterProviderpublic boolean isTiled()
RasterProviderisTiled in interface RasterProviderisTiled in class AbstractRasterProviderpublic void close()
DataStoreProviderclose in interface RasterProviderclose in class AbstractRasterProviderpublic java.net.URI translateURI(java.net.URI uri)
AbstractRasterProvidertranslateURI in class AbstractRasterProviderpublic void setView(Extent e)
AbstractRasterProvidersetView in class AbstractRasterProvidere - Extentpublic Extent getView()
AbstractRasterProvidergetView in interface RasterProvidergetView in class AbstractRasterProviderpublic double getWidth()
AbstractRasterProvidergetWidth in interface RasterProvidergetWidth in class AbstractRasterProviderpublic double getHeight()
AbstractRasterProvidergetHeight in interface RasterProvidergetHeight in class AbstractRasterProviderpublic java.lang.Object readCompleteLine(int line,
int band)
throws InvalidSetViewException,
FileNotOpenException,
RasterDriverException
line - band - InvalidSetViewExceptionFileNotOpenExceptionRasterDriverExceptionpublic java.io.File getFileLayer()
throws RasterDriverException
RasterDriverExceptionpublic java.lang.Object readBlock(int pos,
int blockHeight,
double scale)
throws InvalidSetViewException,
FileNotOpenException,
RasterDriverException,
ProcessInterruptedException
RasterProviderreadBlock in interface RasterProviderInvalidSetViewExceptionFileNotOpenExceptionRasterDriverExceptionProcessInterruptedExceptionpublic java.lang.Object getData(int x,
int y,
int band)
throws InvalidSetViewException,
FileNotOpenException,
RasterDriverException
AbstractRasterProvidergetData in interface RasterProvidergetData in class AbstractRasterProviderx - coordenada Xy - coordenada YInvalidSetViewExceptionFileNotOpenExceptionRasterDriverExceptionpublic 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 - RasterDriverExceptionProcessInterruptedExceptionpublic Extent getZoomLevelCoordinates(int level, Extent extent, int w, int h)
level - extent - w - h - public boolean isRasterEnclosed()
RasterProviderisRasterEnclosed in interface RasterProviderisRasterEnclosed in class AbstractRasterProviderpublic boolean needEnhanced()
RasterProviderneedEnhanced in interface RasterProviderneedEnhanced in class AbstractRasterProviderpublic Tile getTile(SpiRasterQuery q) throws TileGettingException
TiledRasterProvidergetTile in interface TiledRasterProviderTileGettingExceptionpublic void loadBuffer(SpiRasterQuery q) throws ProcessInterruptedException, RasterDriverException
AbstractRasterProviderSpiRasterQuery 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 AbstractRasterProviderProcessInterruptedExceptionRasterDriverExceptionpublic int getBlockSize()
getBlockSize in class AbstractRasterProviderpublic void setAffineTransform(java.awt.geom.AffineTransform t)
RasterProvidersetAffineTransform in interface RasterProvidersetAffineTransform in class AbstractRasterProvidert - Transformación afín a aplicarpublic int getOverviewCount(int band)
throws BandAccessException,
RasterDriverException
RasterProvidergetOverviewCount in interface RasterProviderBandAccessExceptionRasterDriverExceptionpublic int getOverviewWidth(int band,
int overview)
throws BandAccessException,
RasterDriverException
RasterProvidergetOverviewWidth in interface RasterProvidergetOverviewWidth in class AbstractRasterProviderBandAccessExceptionRasterDriverExceptionpublic int getOverviewHeight(int band,
int overview)
throws BandAccessException,
RasterDriverException
RasterProvidergetOverviewHeight in interface RasterProvidergetOverviewHeight in class AbstractRasterProviderBandAccessExceptionRasterDriverExceptionpublic boolean isOverviewsSupported()
AbstractRasterProviderisOverviewsSupported in interface RasterProviderisOverviewsSupported in class AbstractRasterProviderpublic java.lang.String getProviderName()
DataStoreProvidergetProviderName in interface CoverageStoreProviderpublic java.awt.geom.Point2D rasterToWorld(java.awt.geom.Point2D pt)
rasterToWorld in interface RasterProviderrasterToWorld in class AbstractRasterProviderpt - Punto a transformarpublic java.awt.geom.Point2D worldToRaster(java.awt.geom.Point2D pt)
worldToRaster in interface RasterProviderworldToRaster in class AbstractRasterProviderpt - Punto a transformarpublic void setStatus(RasterProvider provider)
RasterProvidersetStatus in interface RasterProviderpublic void setParam(DataStoreProviderServices storeServices, DataStoreParameters param)
setParam in class AbstractRasterProviderpublic java.lang.String getInfoByPoint(double x,
double y,
ICancellable cancellable)
throws InfoByPointException
RasterProvidergetInfoByPoint in interface RasterProvidergetInfoByPoint in class AbstractRasterProviderInfoByPointExceptionpublic java.lang.String getInfoByPoint(int x,
int y,
Extent bbox,
int w,
int h,
ICancellable cancellable)
throws InfoByPointException
RasterProvidergetInfoByPoint in interface RasterProvidergetInfoByPoint in class AbstractRasterProviderx - X Pixel positiony - Y pixel positionbbox - Bounding box of the windoww - Width in pixels of the windowh - Height in pixels of the windowInfoByPointExceptionpublic int[] getTileSize(int level)
TiledRasterProvidergetTileSize in interface TiledRasterProvidergetTileSize in class AbstractRasterProviderpublic void deleteLayerFromCache()
AbstractRasterProviderdeleteLayerFromCache in interface RasterProviderdeleteLayerFromCache in class AbstractRasterProviderpublic TileServer getTileServer()
RasterProvidergetTileServer in interface RasterProviderpublic void setSecondLevelTileServer(TileServer tileServer)
tileServer - public void setTileServer(java.lang.Class<?> tileServer)
throws InitializeException
TiledRasterProvidersetTileServer in interface TiledRasterProvidersetTileServer in class AbstractRasterProviderInitializeExceptionpublic void addFile(java.io.File file)
throws InvalidSourceException
RasterProvideraddFile in interface RasterProviderInvalidSourceExceptionpublic void removeFile(java.io.File file)
RasterProviderremoveFile in interface RasterProviderpublic java.lang.String getFullName()
DataStoreProvidergetFullName in class AbstractRasterProvider