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, setMetadata
dispose, dispose
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFile, getOverviewCount, getTileServer, isOpen, readBlock, removeFile, setStatus
allowWrite, getProviderName, getStoreServices
refresh
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
public 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()
RasterProvider
getFormatList
in interface RasterProvider
protected void init()
public boolean isRGB()
public boolean isARGB()
public boolean isTiled()
RasterProvider
isTiled
in interface RasterProvider
public boolean isTimeSupported()
RasterProvider
isTimeSupported
in interface RasterProvider
public RasterProvider cloneProvider() throws CloneException
RasterProvider
cloneProvider
in interface RasterProvider
CloneException
public static AbstractRasterProvider singleDatasetInstance(DataStoreProviderServices storeServices, String param) throws RasterDriverException
storeServices
- param
- RasterDriverException
public abstract RasterProvider load()
public abstract double getWidth()
getWidth
in interface RasterProvider
public abstract double getHeight()
getHeight
in interface RasterProvider
public abstract void setView(Extent e)
e
- Extentpublic abstract Extent getView()
getView
in interface RasterProvider
public abstract Object getData(int x, int y, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
getData
in interface RasterProvider
x
- coordenada Xy
- coordenada YInvalidSetViewException
FileNotOpenException
RasterDriverException
public Buffer getDataSet(SpiRasterQuery query) throws ProcessInterruptedException, RasterDriverException
RasterQuery
getDataSet
in interface RasterProvider
q
- RasterDriverException
ProcessInterruptedException
public 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
- ProcessInterruptedException
RasterDriverException
public abstract int getBlockSize()
public abstract int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException
RasterProvider
getOverviewHeight
in interface RasterProvider
BandAccessException
RasterDriverException
public abstract boolean isOverviewsSupported()
isOverviewsSupported
in interface RasterProvider
public void reload()
reload
in interface RasterProvider
protected void loadFromRmf(RmfBlocksManager manager) throws ParsingException
fName
- Nombre del ficheroParsingException
public int getBandCount()
getBandCount
in interface RasterProvider
public int[] getDataType()
RasterProvider
getDataType
in interface RasterProvider
public void setDataType(int[] dataType)
dataType
- The dataType to set.public double getPixelSizeX()
RasterProvider
getPixelSizeX
in interface RasterProvider
public double getPixelSizeY()
RasterProvider
getPixelSizeY
in interface RasterProvider
public NoData getNoDataValue()
RasterProvider
getNoDataValue
in interface RasterProvider
public void setNoDataValue(NoData value)
RasterProvider
setNoDataValue
in interface RasterProvider
public boolean isGeoreferenced()
isGeoreferenced
in interface RasterProvider
public Point2D rasterToWorld(Point2D pt)
rasterToWorld
in interface RasterProvider
pt
- Punto a transformarpublic Point2D worldToRaster(Point2D pt)
worldToRaster
in interface RasterProvider
pt
- Punto a transformarpublic Extent getExtent()
getExtent
in interface RasterProvider
public Extent getExtentWithoutRot()
getExtentWithoutRot
in interface RasterProvider
public void setParam(DataStoreProviderServices provServices, DataStoreParameters param)
provServices
- param
- public abstract int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException
RasterProvider
getOverviewWidth
in interface RasterProvider
BandAccessException
RasterDriverException
public void selectSubdataset()
RasterProvider
selectSubdataset
in interface RasterProvider
protected void selectSubdataset(String subdataset)
public RmfBlocksManager getRmfBlocksManager()
public File getRMFFile()
RasterProvider
getRMFFile
in interface RasterProvider
public boolean isInside(Point2D p)
RasterProvider
isInside
in interface RasterProvider
p
- Punto a comprobar en coordenadas realespublic boolean isRotated()
isRotated
in interface RasterProvider
public boolean isMultiFile()
RasterProvider
isMultiFile
in interface RasterProvider
public boolean isMosaic()
RasterProvider
isMosaic
in interface RasterProvider
public boolean isReproyectable()
isReproyectable
in interface RasterProvider
public String getWktProjection()
RasterProvider
getWktProjection
in interface RasterProvider
public void saveObjectToRmf(Class<?> class1, Object value) throws RmfSerializerException
RasterProvider
saveObjectToRmf
in interface RasterProvider
RmfSerializerException
public Object loadObjectFromRmf(Class<?> class1, Object value) throws RmfSerializerException
RasterProvider
loadObjectFromRmf
in interface RasterProvider
RmfSerializerException
public static Object loadObjectFromRmfFile(String file, Class<?> class1, Object value) throws RmfSerializerException
file
- class1
- value
- RmfSerializerException
public void saveObjectToRmf(Object value) throws RmfSerializerException
value
- RmfSerializerException
public Object loadObjectFromRmf(Object value) throws RmfSerializerException
value
- RmfSerializerException
public double getCellSize()
RasterProvider
getCellSize
in interface RasterProvider
public RasterProvider newProvider()
public ColorTable getColorTable()
RasterProvider
ColorTable
or null if the raster
does not havegetColorTable
in interface RasterProvider
public Image getImageLegend()
RasterProvider
getImageLegend
in interface RasterProvider
public void setColorTable(ColorTable value)
RasterProvider
setColorTable
in interface RasterProvider
public Transparency getTransparency()
RasterProvider
getTransparency
in interface RasterProvider
public Metadata getMetadata()
RasterProvider
getMetadata
in interface RasterProvider
public ColorInterpretation getColorInterpretation()
RasterProvider
getColorInterpretation
in interface RasterProvider
public void setColorInterpretation(ColorInterpretation colorInterpretation)
setColorInterpretation
in interface RasterProvider
DataStoreColorInterpretation
- public Statistics getStatistics()
RasterProvider
getStatistics
in interface RasterProvider
public void setStatistics(Statistics stats) throws RmfSerializerException
RasterProvider
setStatistics
in interface RasterProvider
RmfSerializerException
public HistogramComputer getHistogramComputer()
Histogramable
getHistogramComputer
in interface Histogramable
public void doDispose()
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractCoverageStoreProvider
AbstractDisposable.dispose()
public DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException
DataStoreProvider
DataServerExplorer
from the same source that this store.getExplorer
in class AbstractCoverageStoreProvider
ReadException
ValidateDataParametersException
public RasterDataParameters getDataParameters()
getDataParameters
in interface RasterProvider
public Iterator<?> getChilds()
DataStoreProvider
Iterator
of SubStores from this store. it
this hasn't SubStores returns null
.public ResourceProvider getResource()
DataStoreProvider
Resource
from where the data is being loaded.Resource
public Object getSourceId()
DataStoreProvider
public void open() throws OpenException
DataStoreProvider
OpenException
public URI translateURI(URI uri)
uri
- public String getFileSuffix()
RasterProvider
getFileSuffix
in interface RasterProvider
public URI getURIOfFirstProvider()
RasterProvider
getURIOfFirstProvider
in interface RasterProvider
public URI getURI()
RasterProvider
getURI
in interface RasterProvider
public void setFName(String n)
public String getName()
DataStoreProvider
public String getFullName()
DataStoreProvider
public long getFileSize()
public void setFileSize(long sz)
public IProjection getProjection()
RasterProvider
getProjection
in interface RasterProvider
public void setProjection(IProjection proj, boolean persist) throws RmfSerializerException
RasterProvider
setProjection
in interface RasterProvider
RmfSerializerException
protected long getTime()
public void setAffineTransform(AffineTransform t)
RasterProvider
setAffineTransform
in interface RasterProvider
t
- Transformación afín a aplicarpublic AffineTransform getAffineTransform()
RasterProvider
getAffineTransform
in interface RasterProvider
public void resetAffineTransform()
public AffineTransform getOwnAffineTransform()
RasterProvider
getOwnAffineTransform
in interface RasterProvider
public String getInfoByPoint(double x, double y, ICancellable cancellable) throws InfoByPointException
RasterProvider
getInfoByPoint
in interface RasterProvider
InfoByPointException
public String getInfoByPoint(int x, int y, Extent bbox, int w, int h, ICancellable cancellable) throws InfoByPointException
RasterProvider
getInfoByPoint
in interface RasterProvider
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 void setTileServer(Class<?> tileServer) throws InitializeException
InitializeException
public int[] getTileSize(int level)
public boolean isRasterEnclosed()
RasterProvider
isRasterEnclosed
in interface RasterProvider
public int getSourceType()
RasterProvider
getSourceType
in interface RasterProvider
public void deleteLayerFromCache()
deleteLayerFromCache
in interface RasterProvider
public TimeSeries getTimeSerials() throws RmfSerializerException
RasterProvider
getTimeSerials
in interface RasterProvider
RmfSerializerException
public void setTimeSerials(TimeSeries serialInfo) throws RmfSerializerException
RasterProvider
setTimeSerials
in interface RasterProvider
RmfSerializerException
public long[] getFileSizeByProvider()
RasterProvider
getFileSizeByProvider
in interface RasterProvider
public URI[] getURIByProvider()
RasterProvider
getURIByProvider
in interface RasterProvider
public int[] getBandCountByProvider()
RasterProvider
getBandCountByProvider
in interface RasterProvider
public int getInternalProviderCount()
RasterProvider
getInternalProviderCount
in interface RasterProvider
public RasterProvider getInternalProvider(int i)
RasterProvider
getInternalProvider
in interface RasterProvider
public URI getURIByBand(int band)
RasterProvider
getURIByBand
in interface RasterProvider
public int getBandPositionByProvider(int band)
RasterProvider
getBandPositionByProvider
in interface RasterProvider
public int getSubdatasetCount()
RasterProvider
getSubdatasetCount
in interface RasterProvider
public boolean needEnhanced()
RasterProvider
needEnhanced
in interface RasterProvider
public 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 RasterProvider
public void setGeoPointList(GeoPointList geoPointList)
setGeoPointList
in interface RasterProvider
public BandList getDefaultBandList()
public void close()
DataStoreProvider
close
in interface RasterProvider
close
in class AbstractCoverageStoreProvider