public abstract class AbstractRasterProvider extends AbstractCoverageStoreProvider implements RasterProvider
| Modifier and Type | Field and Description |
|---|---|
static int |
ALPHA_BAND |
protected int |
bandCount |
static int |
BLUE_BAND |
protected long |
bytesReaded |
protected ColorTable |
colorTable |
protected AffineTransform |
externalTransformation
Transformación asignada de forma externa, bien desde el fichero rmf o
asignada directamente por el usuario.
|
protected long |
fileSize |
protected FileUtils |
fileUtil |
protected GeoPointList |
geoPointList |
static int |
GREEN_BAND |
protected HistogramComputer |
histogram |
protected long |
lineCnt |
protected NoData |
noData |
protected AffineTransform |
ownTransformation
Transformación creada a partir de la información de georreferencia de la
propia imagen.
|
protected DataStoreParameters |
param |
protected IProjection |
proj |
protected RasterUtils |
rasterUtil |
static int |
RED_BAND
Flags que representan a las bandas visualizables
|
protected RmfBlocksManager |
rmfBlocksManager |
protected String |
selectedSubdatasetID |
protected TimeSeries |
serialInfo |
protected Statistics |
stats |
protected DataStoreProviderServices |
storeServices |
protected TileServer |
tileServer |
protected Transparency |
transparency |
protected URI |
uri |
metadata, parameters, store| Constructor and Description |
|---|
AbstractRasterProvider() |
AbstractRasterProvider(AbstractRasterDataParameters params,
DataStoreProviderServices storeServices,
DynObject metadata) |
AbstractRasterProvider(DataStoreParameters params,
DataStoreProviderServices storeServices,
DynObject metadata) |
AbstractRasterProvider(String params) |
AbstractRasterProvider(URI uri) |
| Modifier and Type | Method and Description |
|---|---|
RasterProvider |
cloneProvider()
Clone this RasterProvider
|
void |
close()
Request to close de source
|
void |
deleteLayerFromCache()
Most of providers don't need tiles.
|
void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
protected void |
finalize() |
AffineTransform |
getAffineTransform()
Obtiene la transformación afin aplicada en las peticiones con coordenadas
reales.
|
int |
getBandCount()
Obtiene el número de bandas del fichero
|
int[] |
getBandCountByProvider()
Gets the number of bands by provider.
|
int |
getBandPositionByProvider(int band)
Selecting a number of band this function returns the number of band
inside the file.
|
abstract int |
getBlockSize() |
double |
getCellSize()
Gets the pixel size
|
Iterator<?> |
getChilds()
Retruns an
Iterator of SubStores from this store. it
this hasn't SubStores returns null. |
ColorInterpretation |
getColorInterpretation()
Gets the object with the color interpretation by band
|
ColorTable |
getColorTable()
Gets the
ColorTable or null if the raster
does not have |
abstract Object |
getData(int x,
int y,
int band)
Obtiene el valor del raster en la coordenada que se le pasa.
|
RasterDataParameters |
getDataParameters()
Returs the DataParameters
|
Buffer |
getDataSet(SpiRasterQuery query)
Gets the set of data selected in the
RasterQuery |
int[] |
getDataType()
Obtiene el tipo de dato por banda
|
BandList |
getDefaultBandList()
Deprecated.
This method should not be used. The store have a getDefaultBandList
|
DataServerExplorer |
getExplorer()
Create a
DataServerExplorer from the same source that this store. |
Extent |
getExtent()
Calcula el extent en coordenadas del mundo real
|
Extent |
getExtentWithoutRot()
Calcula el extent en coordenadas del mundo real sin rotación.
|
long |
getFileSize()
Gets the size of the file if exists in Bytes
|
long[] |
getFileSizeByProvider()
Gets a list of sizes.
|
String |
getFileSuffix()
Gets the suffix of the source file
|
String[] |
getFormatList()
Gets the list of supported formats
|
String |
getFullName()
Returns a more descriptive name for the provider that getName.
|
GeoPointList |
getGeoPointList()
Gets the list of geo points associated to this provider
|
abstract 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(double x,
double y,
ICancellable cancellable)
Gets the information in a real point
|
String |
getInfoByPoint(int x,
int y,
Extent bbox,
int w,
int h,
ICancellable cancellable)
Gets the information in a pixel point.
|
RasterProvider |
getInternalProvider(int i)
Gets the internal provider of the i position
|
int |
getInternalProviderCount()
Returns the number of internal providers that it has
|
Interval |
getInterval()
Gets the
Interval of the store, that means the temporal
interval where the store has valid data. |
Metadata |
getMetadata()
Gets a DatasetMetadata object
|
String |
getName()
Returns the name associated to the provider.
|
NoData |
getNoDataValue()
Gets the nodata value.
|
abstract int |
getOverviewHeight(int band,
int overview)
Obtiene el alto de una overview de una banda
|
abstract int |
getOverviewWidth(int band,
int overview)
Obtiene el ancho de una overview de una banda
|
AffineTransform |
getOwnAffineTransform()
Obtiene la matriz de transformación del propio raster.
|
double |
getPixelSizeX()
Obtiene el tamaño de pixel en X
|
double |
getPixelSizeY()
Obtiene el tamaño de pixel en Y
|
IProjection |
getProjection()
Sets the provider projection
|
ResourceProvider |
getResource()
Returns the
Resource from where the data is being loaded. |
RmfBlocksManager |
getRmfBlocksManager()
Obtiene el gestor de ficheros RMF
|
File |
getRMFFile()
Gets the rmf file path.
|
protected String |
getRMFFileForRemoteServices(String layerName) |
Object |
getSourceId()
Returns the unique identifier of the Store
FIXME add examples
|
int |
getSourceType()
Returns the source type (FILE, POSTGIS, REMOTE,...)
|
Statistics |
getStatistics()
Gets statistics of this provider
|
int |
getSubdatasetCount()
Gets the number of subdatasets
|
int[] |
getTileSize(int level) |
protected long |
getTime() |
Collection<?> |
getTimes()
Gets all the possible values of time for which the store has data.
|
Collection<?> |
getTimes(Interval interval)
Gets all the possible values of time for which the store has data
and intersects with an interval.
|
TimeSeries |
getTimeSerials()
Gets the time serial information
|
Transparency |
getTransparency()
Obtiene el estado de transparencia a partir de los estados de transparencia de todos
los ficheros que lo componen.
|
URI |
getURI()
Gets the uniform resource identifier
|
URI |
getURIByBand(int band)
Gets the URI of the source.
|
URI[] |
getURIByProvider()
Gets a list of file names or URI.
|
URI |
getURIOfFirstProvider()
Gets the URI of the first provider.
|
abstract Extent |
getView()
Obtiene el extent asignado
|
abstract double |
getWidth()
Obtiene el ancho de la imagen
|
String |
getWktProjection()
Obtiene la proyección asociada al raster.
|
protected void |
init()
Acciones de inicilización comunes a todos los drivers.
|
boolean |
isARGB() |
boolean |
isGeoreferenced()
Dice si el fichero tiene georreferenciación o no.
|
boolean |
isInside(Point2D p)
Informa de si el punto en coordenadas del mundo real pasado por parámetro cae dentro del
raster o fuera.
|
boolean |
isMosaic()
Returns true if the source of data is a mosaic of images
|
boolean |
isMultiFile()
Returns true if the provider has several files and all of them has the same extension
|
abstract 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 |
isRGB() |
boolean |
isRotated()
Consulta de si un raster tiene rotación o no.
|
boolean |
isTiled()
Returns true if the provider support tiles
|
boolean |
isTimeSupported()
Returns true if this provider supports time.
|
abstract RasterProvider |
load()
Carga un fichero raster.
|
abstract void |
loadBuffer(SpiRasterQuery query)
Load a buffer with the parameters.
|
protected void |
loadFromRmf(RmfBlocksManager manager)
Carga metadatos desde el fichero Rmf si estos existen
|
Object |
loadObjectFromRmf(Class<?> class1,
Object value)
Carga un objecto desde un serializador usando el tipo del mismo objeto pasado por parametro.
|
Object |
loadObjectFromRmf(Object value)
Carga un objecto desde un serializador usando el tipo del mismo objeto pasado por parametro.
|
static Object |
loadObjectFromRmfFile(String file,
Class<?> class1,
Object value)
Carga un objeto del fichero RMF especificado por parametro
|
boolean |
needEnhanced()
This function returns true if the image to be loaded needs a enhanced filter or
doesn't.
|
RasterProvider |
newProvider() |
void |
open()
Open store.
|
Point2D |
rasterToWorld(Point2D pt)
Convierte un punto desde coordenadas pixel a coordenadas del mundo.
|
void |
reload() |
void |
resetAffineTransform()
Elimina la matriz de transformaci�n asociada al raster y que se tiene en
cuenta para el setView.
|
void |
saveObjectToRmf(Class<?> class1,
Object value)
Guarda en el RMF el objecto actual en caso de que exista un serializador para el.
|
void |
saveObjectToRmf(Object value)
Guarda en el RMF el objecto actual en caso de que exista un serializador para el
|
void |
selectSubdataset()
Selects the subdataset.
|
protected void |
selectSubdataset(String subdataset)
Selects the subdataset.
|
void |
setAffineTransform(AffineTransform t)
Asigna una transformación al raster para que se tenga en cuenta en la
asignación del setView.
|
void |
setColorInterpretation(ColorInterpretation colorInterpretation)
Asigna el objeto que contiene que contiene la interpretaci�n de
color por banda
|
void |
setColorTable(ColorTable value)
Define el objeto paleta.
|
void |
setDataType(int[] dataType) |
void |
setFileSize(long sz) |
void |
setFName(String n) |
void |
setGeoPointList(GeoPointList geoPointList)
Sets the list of geo points associated to this provider
|
void |
setNoDataValue(NoData value)
Sets the nodata value
|
void |
setParam(DataStoreProviderServices provServices,
DataStoreParameters param)
Asigna el parámetro de inicialización del driver.
|
void |
setProjection(IProjection proj,
boolean persist)
Gets the provider projection
|
void |
setStatistics(Statistics stats)
Sets the statistics of this provider.
|
void |
setTileServer(Class<?> tileServer) |
void |
setTimeSerials(TimeSeries serialInfo)
Sets the time serial information
|
abstract void |
setView(Extent e)
Asigna un nuevo Extent
|
static AbstractRasterProvider |
singleDatasetInstance(DataStoreProviderServices storeServices,
String param)
Factoria para abrir distintos tipos de raster.
|
String |
translateFileName(String fileName) |
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.
|
allowWrite, clear, createCoverageSelection, createResource, delegate, getClassName, getDataStoreParameters, getDynClass, getDynValue, getEnvelope, getStoreServices, hasDynValue, implement, init, invokeDynMethod, invokeDynMethod, refresh, setDynValue, setMetadatadispose, disposeclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFile, getOverviewCount, getTileServer, isOpen, readBlock, removeFile, setStatusallowWrite, getProviderName, getStoreServicesrefreshclear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuedisposepublic static final int RED_BAND
public static final int GREEN_BAND
public static final int BLUE_BAND
public static final int ALPHA_BAND
protected int bandCount
protected NoData noData
protected Statistics stats
protected HistogramComputer histogram
protected DataStoreParameters param
protected DataStoreProviderServices storeServices
protected RmfBlocksManager rmfBlocksManager
protected ColorTable colorTable
protected TimeSeries serialInfo
protected Transparency transparency
protected TileServer tileServer
protected GeoPointList geoPointList
protected FileUtils fileUtil
protected RasterUtils rasterUtil
protected IProjection proj
protected long fileSize
protected long bytesReaded
protected long lineCnt
protected URI uri
protected String selectedSubdatasetID
protected AffineTransform ownTransformation
protected AffineTransform externalTransformation
public AbstractRasterProvider(AbstractRasterDataParameters params, DataStoreProviderServices storeServices, DynObject metadata)
public AbstractRasterProvider(DataStoreParameters params, DataStoreProviderServices storeServices, DynObject metadata)
public AbstractRasterProvider(String params)
public AbstractRasterProvider(URI uri)
public AbstractRasterProvider()
public String[] getFormatList()
RasterProvidergetFormatList in interface RasterProviderprotected void init()
public boolean isRGB()
public boolean isARGB()
public boolean isTiled()
RasterProviderisTiled in interface RasterProviderpublic boolean isTimeSupported()
RasterProviderisTimeSupported in interface RasterProviderpublic RasterProvider cloneProvider() throws CloneException
RasterProvidercloneProvider in interface RasterProviderCloneExceptionpublic static AbstractRasterProvider singleDatasetInstance(DataStoreProviderServices storeServices, String param) throws RasterDriverException
storeServices - param - RasterDriverExceptionpublic abstract RasterProvider load()
public abstract double getWidth()
getWidth in interface RasterProviderpublic abstract double getHeight()
getHeight in interface RasterProviderpublic abstract void setView(Extent e)
e - Extentpublic abstract Extent getView()
getView in interface RasterProviderpublic abstract Object getData(int x, int y, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
getData in interface RasterProviderx - coordenada Xy - coordenada YInvalidSetViewExceptionFileNotOpenExceptionRasterDriverExceptionpublic Buffer getDataSet(SpiRasterQuery query) throws ProcessInterruptedException, RasterDriverException
RasterQuerygetDataSet in interface RasterProviderq - RasterDriverExceptionProcessInterruptedExceptionpublic abstract void loadBuffer(SpiRasterQuery query) throws ProcessInterruptedException, RasterDriverException
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.query - ProcessInterruptedExceptionRasterDriverExceptionpublic abstract int getBlockSize()
public abstract int getOverviewHeight(int band,
int overview)
throws BandAccessException,
RasterDriverException
RasterProvidergetOverviewHeight in interface RasterProviderBandAccessExceptionRasterDriverExceptionpublic abstract boolean isOverviewsSupported()
isOverviewsSupported in interface RasterProviderpublic void reload()
reload in interface RasterProviderprotected void loadFromRmf(RmfBlocksManager manager) throws ParsingException
fName - Nombre del ficheroParsingExceptionpublic int getBandCount()
getBandCount in interface RasterProviderpublic int[] getDataType()
RasterProvidergetDataType in interface RasterProviderpublic void setDataType(int[] dataType)
dataType - The dataType to set.public double getPixelSizeX()
RasterProvidergetPixelSizeX in interface RasterProviderpublic double getPixelSizeY()
RasterProvidergetPixelSizeY in interface RasterProviderpublic NoData getNoDataValue()
RasterProvidergetNoDataValue in interface RasterProviderpublic void setNoDataValue(NoData value)
RasterProvidersetNoDataValue in interface RasterProviderpublic boolean isGeoreferenced()
isGeoreferenced in interface RasterProviderpublic Point2D rasterToWorld(Point2D pt)
rasterToWorld in interface RasterProviderpt - Punto a transformarpublic Point2D worldToRaster(Point2D pt)
worldToRaster in interface RasterProviderpt - Punto a transformarpublic Extent getExtent()
getExtent in interface RasterProviderpublic Extent getExtentWithoutRot()
getExtentWithoutRot in interface RasterProviderpublic void setParam(DataStoreProviderServices provServices, DataStoreParameters param)
provServices - param - public abstract int getOverviewWidth(int band,
int overview)
throws BandAccessException,
RasterDriverException
RasterProvidergetOverviewWidth in interface RasterProviderBandAccessExceptionRasterDriverExceptionpublic void selectSubdataset()
RasterProviderselectSubdataset in interface RasterProviderprotected void selectSubdataset(String subdataset)
public RmfBlocksManager getRmfBlocksManager()
public File getRMFFile()
RasterProvidergetRMFFile in interface RasterProviderpublic boolean isInside(Point2D p)
RasterProviderisInside in interface RasterProviderp - Punto a comprobar en coordenadas realespublic boolean isRotated()
isRotated in interface RasterProviderpublic boolean isMultiFile()
RasterProviderisMultiFile in interface RasterProviderpublic boolean isMosaic()
RasterProviderisMosaic in interface RasterProviderpublic boolean isReproyectable()
isReproyectable in interface RasterProviderpublic String getWktProjection()
RasterProvidergetWktProjection in interface RasterProviderpublic void saveObjectToRmf(Class<?> class1, Object value) throws RmfSerializerException
RasterProvidersaveObjectToRmf in interface RasterProviderRmfSerializerExceptionpublic Object loadObjectFromRmf(Class<?> class1, Object value) throws RmfSerializerException
RasterProviderloadObjectFromRmf in interface RasterProviderRmfSerializerExceptionpublic static Object loadObjectFromRmfFile(String file, Class<?> class1, Object value) throws RmfSerializerException
file - class1 - value - RmfSerializerExceptionpublic void saveObjectToRmf(Object value) throws RmfSerializerException
value - RmfSerializerExceptionpublic Object loadObjectFromRmf(Object value) throws RmfSerializerException
value - RmfSerializerExceptionpublic double getCellSize()
RasterProvidergetCellSize in interface RasterProviderpublic RasterProvider newProvider()
public ColorTable getColorTable()
RasterProviderColorTable or null if the raster
does not havegetColorTable in interface RasterProviderpublic Image getImageLegend()
RasterProvidergetImageLegend in interface RasterProviderpublic void setColorTable(ColorTable value)
RasterProvidersetColorTable in interface RasterProviderpublic Transparency getTransparency()
RasterProvidergetTransparency in interface RasterProviderpublic Metadata getMetadata()
RasterProvidergetMetadata in interface RasterProviderpublic ColorInterpretation getColorInterpretation()
RasterProvidergetColorInterpretation in interface RasterProviderpublic void setColorInterpretation(ColorInterpretation colorInterpretation)
setColorInterpretation in interface RasterProviderDataStoreColorInterpretation - public Statistics getStatistics()
RasterProvidergetStatistics in interface RasterProviderpublic void setStatistics(Statistics stats) throws RmfSerializerException
RasterProvidersetStatistics in interface RasterProviderRmfSerializerExceptionpublic HistogramComputer getHistogramComputer()
HistogramablegetHistogramComputer in interface Histogramablepublic void doDispose()
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractCoverageStoreProviderAbstractDisposable.dispose()public DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException
DataStoreProviderDataServerExplorer from the same source that this store.getExplorer in class AbstractCoverageStoreProviderReadExceptionValidateDataParametersExceptionpublic RasterDataParameters getDataParameters()
getDataParameters in interface RasterProviderpublic Iterator<?> getChilds()
DataStoreProviderIterator of SubStores from this store. it
this hasn't SubStores returns null.public ResourceProvider getResource()
DataStoreProviderResource from where the data is being loaded.Resourcepublic Object getSourceId()
DataStoreProviderpublic void open()
throws OpenException
DataStoreProviderOpenExceptionpublic URI translateURI(URI uri)
uri - public String getFileSuffix()
RasterProvidergetFileSuffix in interface RasterProviderpublic URI getURIOfFirstProvider()
RasterProvidergetURIOfFirstProvider in interface RasterProviderpublic URI getURI()
RasterProvidergetURI in interface RasterProviderpublic void setFName(String n)
public String getName()
DataStoreProviderpublic String getFullName()
DataStoreProviderpublic long getFileSize()
public void setFileSize(long sz)
public IProjection getProjection()
RasterProvidergetProjection in interface RasterProviderpublic void setProjection(IProjection proj, boolean persist) throws RmfSerializerException
RasterProvidersetProjection in interface RasterProviderRmfSerializerExceptionprotected long getTime()
public void setAffineTransform(AffineTransform t)
RasterProvidersetAffineTransform in interface RasterProvidert - Transformación afín a aplicarpublic AffineTransform getAffineTransform()
RasterProvidergetAffineTransform in interface RasterProviderpublic void resetAffineTransform()
public AffineTransform getOwnAffineTransform()
RasterProvidergetOwnAffineTransform in interface RasterProviderpublic String getInfoByPoint(double x, double y, ICancellable cancellable) throws InfoByPointException
RasterProvidergetInfoByPoint in interface RasterProviderInfoByPointExceptionpublic String getInfoByPoint(int x, int y, Extent bbox, int w, int h, ICancellable cancellable) throws InfoByPointException
RasterProvidergetInfoByPoint in interface RasterProviderx - X Pixel positiony - Y pixel positionbbox - Bounding box of the windoww - Width in pixels of the windowh - Height in pixels of the windowInfoByPointExceptionpublic void setTileServer(Class<?> tileServer) throws InitializeException
InitializeExceptionpublic int[] getTileSize(int level)
public boolean isRasterEnclosed()
RasterProviderisRasterEnclosed in interface RasterProviderpublic int getSourceType()
RasterProvidergetSourceType in interface RasterProviderpublic void deleteLayerFromCache()
deleteLayerFromCache in interface RasterProviderpublic TimeSeries getTimeSerials() throws RmfSerializerException
RasterProvidergetTimeSerials in interface RasterProviderRmfSerializerExceptionpublic void setTimeSerials(TimeSeries serialInfo) throws RmfSerializerException
RasterProvidersetTimeSerials in interface RasterProviderRmfSerializerExceptionpublic long[] getFileSizeByProvider()
RasterProvidergetFileSizeByProvider in interface RasterProviderpublic URI[] getURIByProvider()
RasterProvidergetURIByProvider in interface RasterProviderpublic int[] getBandCountByProvider()
RasterProvidergetBandCountByProvider in interface RasterProviderpublic int getInternalProviderCount()
RasterProvidergetInternalProviderCount in interface RasterProviderpublic RasterProvider getInternalProvider(int i)
RasterProvidergetInternalProvider in interface RasterProviderpublic URI getURIByBand(int band)
RasterProvidergetURIByBand in interface RasterProviderpublic int getBandPositionByProvider(int band)
RasterProvidergetBandPositionByProvider in interface RasterProviderpublic int getSubdatasetCount()
RasterProvidergetSubdatasetCount in interface RasterProviderpublic boolean needEnhanced()
RasterProviderneedEnhanced in interface RasterProviderpublic Interval getInterval()
Interval of the store, that means the temporal
interval where the store has valid data.
In raster this method has sense in a mosaic. Therefore this has to be implemented
by the provider.public Collection<?> getTimes()
Time objects.public Collection<?> getTimes(Interval interval)
interval - the interval of timeTime objects.public GeoPointList getGeoPointList()
getGeoPointList in interface RasterProviderpublic void setGeoPointList(GeoPointList geoPointList)
setGeoPointList in interface RasterProviderpublic BandList getDefaultBandList()
public void close()
DataStoreProviderclose in interface RasterProviderclose in class AbstractCoverageStoreProvider