public class GdalProvider extends AbstractRasterProvider
Modifier and Type | Field and Description |
---|---|
static int |
BAND_HEIGHT |
static java.lang.String |
DESCRIPTION |
protected GdalDataSource |
file |
static java.lang.String |
FORMAT_ADRG |
static java.lang.String |
FORMAT_BMP |
static java.lang.String |
FORMAT_BT |
static java.lang.String |
FORMAT_EHDR |
static java.lang.String |
FORMAT_ELAS |
static java.lang.String |
FORMAT_ENVI |
static java.lang.String |
FORMAT_ERS |
static java.lang.String |
FORMAT_GRD |
static java.lang.String |
FORMAT_GSAG |
static java.lang.String |
FORMAT_GSBG |
static java.lang.String |
FORMAT_GTiff |
static java.lang.String |
FORMAT_HDF4 |
static java.lang.String |
FORMAT_HFA |
static java.lang.String |
FORMAT_IDA |
static java.lang.String |
FORMAT_ILWIS |
static java.lang.String |
FORMAT_INGR |
static java.lang.String |
FORMAT_JP2 |
static java.lang.String |
FORMAT_LEVELLER |
static java.lang.String |
FORMAT_MEM |
static java.lang.String |
FORMAT_MFF |
static java.lang.String |
FORMAT_MFF2 |
static java.lang.String |
FORMAT_NITF |
static java.lang.String |
FORMAT_PAUX |
static java.lang.String |
FORMAT_PCIDSK |
static java.lang.String |
FORMAT_PNM |
static java.lang.String |
FORMAT_RMF |
static java.lang.String |
FORMAT_RST |
static java.lang.String |
FORMAT_TERRAGEN |
static java.lang.String |
FORMAT_VRT |
protected static java.lang.String[][] |
formatList |
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 |
---|
GdalProvider()
Mandatory constructor to instantiate an empty provider
|
GdalProvider(AbstractRasterDataParameters params,
DataStoreProviderServices storeServices,
DynObject metadata) |
GdalProvider(GdalDataParameters params,
DataStoreProviderServices storeServices) |
GdalProvider(java.lang.String params)
Deprecated.
use
GdalProvider(URI) , this constructor will be
removed in gvSIG 2.5 |
GdalProvider(java.net.URI uri)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(java.io.File file)
Adds a new file.
|
void |
close()
Request to close de source
|
protected void |
finalize() |
int |
getBlockSize() |
java.lang.Object |
getData(int x,
int y,
int band)
Obtiene el valor del raster en la coordenada que se le pasa.
|
java.lang.String[] |
getFormatList()
Gets the list of supported formats
|
double |
getHeight()
Obtiene el ancho de la imagen
|
DataStoreMetadata |
getMetadata()
Gets a DatasetMetadata object
|
java.lang.String |
getMimeType() |
protected GdalDataSource |
getNative() |
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
|
java.lang.String |
getProviderName()
Return the name of the provider.
|
TileServer |
getTileServer()
Gets the tile cache data server
|
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
|
void |
init(AbstractRasterDataParameters params,
DataStoreProviderServices storeServices)
Creates file references and loads structures with the information and
metadata
|
boolean |
isExtensionSupported(java.lang.String ext)
Returns true if the extension is supported and false if doesn't
|
boolean |
isGeoreferenced()
Dice si el fichero tiene georreferenciación o no.
|
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 |
isReproyectable()
Devuelve si el Dataset es reproyectable
|
boolean |
isSupersampling()
Informa de si el driver ha supersampleado en el último dibujado.
|
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.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)
Read a line from the file
|
static void |
register() |
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 |
setStatus(RasterProvider provider)
Sets the status information using other provider of the same type.
|
void |
setView(Extent e)
Asigna el extent de la vista actual. existe un fichero .rmf debemos hacer
una transformación de la vista asignada ya que la petición viene en
coordenadas del fichero .rmf y la vista (v) ha de estar en coordenadas
del fichero.
|
java.net.URI |
translateURI(java.net.URI uri)
Traduce el nombre del fichero por un alias asignado por el propio driver.
|
cloneProvider, deleteLayerFromCache, doDispose, getAffineTransform, getBandCount, getBandCountByProvider, getBandPositionByProvider, getCellSize, getChildren, getChilds, getColorInterpretation, getColorTable, getDataParameters, getDataSet, getDataType, getDefaultBandList, getExplorer, getExtent, getExtentWithoutRot, getFileSize, getFileSizeByProvider, getFileSuffix, getFullName, getGeoPointList, getHistogramComputer, getImageLegend, getInfoByPoint, getInfoByPoint, getInternalProvider, getInternalProviderCount, getInterval, getName, getNoDataValue, getOwnAffineTransform, getPixelSizeX, getPixelSizeY, getProjection, getResource, getResourcesStorage, getRmfBlocksManager, getRMFFile, getRMFFileForRemoteServices, getSourceId, getSourceType, getStatistics, getStoresRepository, getSubdatasetCount, getTileSize, getTime, getTimes, getTimes, getTimeSerials, getURI, getURIByBand, getURIByProvider, getURIOfFirstProvider, getWktProjection, init, isARGB, isInside, isMosaic, isMultiFile, isRasterEnclosed, isRGB, isRotated, isTiled, isTimeSupported, loadFromRmf, loadObjectFromRmf, loadObjectFromRmf, loadObjectFromRmfFile, newProvider, open, rasterToWorld, reload, resetAffineTransform, saveObjectToRmf, saveObjectToRmf, selectSubdataset, selectSubdataset, setColorInterpretation, setColorTable, setDataType, setFileSize, setFName, setGeoPointList, setNoDataValue, setParam, setProjection, setStatistics, setTileServer, setTimeSerials, singleDatasetInstance, translateFileName, worldToRaster
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 static final java.lang.String FORMAT_GTiff
public static final java.lang.String FORMAT_VRT
public static final java.lang.String FORMAT_NITF
public static final java.lang.String FORMAT_HFA
public static final java.lang.String FORMAT_ELAS
public static final java.lang.String FORMAT_MEM
public static final java.lang.String FORMAT_BMP
public static final java.lang.String FORMAT_PCIDSK
public static final java.lang.String FORMAT_ILWIS
public static final java.lang.String FORMAT_HDF4
public static final java.lang.String FORMAT_PNM
public static final java.lang.String FORMAT_ENVI
public static final java.lang.String FORMAT_EHDR
public static final java.lang.String FORMAT_PAUX
public static final java.lang.String FORMAT_MFF
public static final java.lang.String FORMAT_MFF2
public static final java.lang.String FORMAT_BT
public static final java.lang.String FORMAT_IDA
public static final java.lang.String FORMAT_RMF
public static final java.lang.String FORMAT_RST
public static final java.lang.String FORMAT_LEVELLER
public static final java.lang.String FORMAT_TERRAGEN
public static final java.lang.String FORMAT_ERS
public static final java.lang.String FORMAT_INGR
public static final java.lang.String FORMAT_GSAG
public static final java.lang.String FORMAT_GSBG
public static final java.lang.String FORMAT_ADRG
public static final java.lang.String FORMAT_JP2
public static final java.lang.String FORMAT_GRD
public static final int BAND_HEIGHT
protected GdalDataSource file
protected static java.lang.String[][] formatList
public GdalProvider()
public GdalProvider(java.lang.String params) throws NotSupportedExtensionException, OpenException
GdalProvider(URI)
, this constructor will be
removed in gvSIG 2.5params
- NotSupportedExtensionException
OpenException
public GdalProvider(java.net.URI uri) throws NotSupportedExtensionException
uri
- NotSupportedExtensionException
public GdalProvider(GdalDataParameters params, DataStoreProviderServices storeServices) throws NotSupportedExtensionException
NotSupportedExtensionException
public GdalProvider(AbstractRasterDataParameters params, DataStoreProviderServices storeServices, DynObject metadata)
public static void register()
public java.lang.String[] getFormatList()
RasterProvider
getFormatList
in interface RasterProvider
getFormatList
in class AbstractRasterProvider
public boolean isExtensionSupported(java.lang.String ext)
ext
- public void init(AbstractRasterDataParameters params, DataStoreProviderServices storeServices) throws NotSupportedExtensionException
params
- load parametersstoreServices
- NotSupportedExtensionException
public java.lang.String getMimeType()
public RasterProvider load()
AbstractRasterProvider
load
in class AbstractRasterProvider
public boolean isOpen()
RasterProvider
public java.net.URI translateURI(java.net.URI uri)
AbstractRasterProvider
translateURI
in class AbstractRasterProvider
public void setView(Extent e)
setView
in class AbstractRasterProvider
e
- public 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.lang.Object readBlock(int pos, int blockHeight, double scale) throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException
RasterProvider
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 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 DataStoreMetadata getMetadata()
RasterProvider
getMetadata
in interface RasterProvider
getMetadata
in class AbstractRasterProvider
public Transparency getTransparency()
RasterProvider
getTransparency
in interface RasterProvider
getTransparency
in class AbstractRasterProvider
public boolean isGeoreferenced()
AbstractRasterProvider
isGeoreferenced
in interface RasterProvider
isGeoreferenced
in class AbstractRasterProvider
public boolean isSupersampling()
protected GdalDataSource getNative()
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
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 boolean needEnhanced()
RasterProvider
needEnhanced
in interface RasterProvider
needEnhanced
in class AbstractRasterProvider
public java.lang.String getProviderName()
DataStoreProvider
public void setStatus(RasterProvider provider)
RasterProvider
public TileServer getTileServer()
RasterProvider
public void close()
DataStoreProvider
close
in interface RasterProvider
close
in class AbstractRasterProvider
protected void finalize() throws java.lang.Throwable
finalize
in class AbstractRasterProvider
java.lang.Throwable
public void addFile(java.io.File file) throws InvalidSourceException
RasterProvider
InvalidSourceException
public void removeFile(java.io.File file)
RasterProvider