public class GdalProvider extends AbstractRasterProvider
| Modifier and Type | Field and Description |
|---|---|
static int |
BAND_HEIGHT |
static String |
DESCRIPTION |
protected GdalDataSource |
file |
static String |
FORMAT_ADRG |
static String |
FORMAT_BMP |
static String |
FORMAT_BT |
static String |
FORMAT_EHDR |
static String |
FORMAT_ELAS |
static String |
FORMAT_ENVI |
static String |
FORMAT_ERS |
static String |
FORMAT_GRD |
static String |
FORMAT_GSAG |
static String |
FORMAT_GSBG |
static String |
FORMAT_GTiff |
static String |
FORMAT_HDF4 |
static String |
FORMAT_HFA |
static String |
FORMAT_IDA |
static String |
FORMAT_ILWIS |
static String |
FORMAT_INGR |
static String |
FORMAT_JP2 |
static String |
FORMAT_LEVELLER |
static String |
FORMAT_MEM |
static String |
FORMAT_MFF |
static String |
FORMAT_MFF2 |
static String |
FORMAT_NITF |
static String |
FORMAT_PAUX |
static String |
FORMAT_PCIDSK |
static String |
FORMAT_PNM |
static String |
FORMAT_RMF |
static String |
FORMAT_RST |
static String |
FORMAT_TERRAGEN |
static String |
FORMAT_VRT |
protected static String[][] |
formatList |
static String |
METADATA_DEFINITION_NAME |
static 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 |
|---|
GdalProvider()
Mandatory constructor to instantiate an empty provider
|
GdalProvider(AbstractRasterDataParameters params,
DataStoreProviderServices storeServices,
DynObject metadata) |
GdalProvider(GdalDataParameters params,
DataStoreProviderServices storeServices) |
GdalProvider(String params)
Deprecated.
use
GdalProvider(URI), this constructor will be
removed in gvSIG 2.5 |
GdalProvider(URI uri)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(File file)
Adds a new file.
|
void |
close()
Request to close de source
|
protected void |
finalize() |
int |
getBlockSize() |
Object |
getData(int x,
int y,
int band)
Obtiene el valor del raster en la coordenada que se le pasa.
|
String[] |
getFormatList()
Gets the list of supported formats
|
double |
getHeight()
Obtiene el ancho de la imagen
|
DataStoreMetadata |
getMetadata()
Gets a DatasetMetadata object
|
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
|
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(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.
|
Object |
readBlock(int pos,
int blockHeight,
double scale)
Reads a complete block of data and returns an tridimensional array of the right type.
|
Object |
readCompleteLine(int line,
int band)
Read a line from the file
|
static void |
register() |
void |
removeFile(File file)
Removes a file.
|
void |
setAffineTransform(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.
|
URI |
translateURI(URI uri)
Traduce el nombre del fichero por un alias asignado por el propio driver.
|
cloneProvider, deleteLayerFromCache, doDispose, getAffineTransform, getBandCount, getBandCountByProvider, getBandPositionByProvider, getCellSize, 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, getRmfBlocksManager, getRMFFile, getRMFFileForRemoteServices, getSourceId, getSourceType, getStatistics, 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, worldToRasterallowWrite, 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, waitallowWrite, getStoreServicesrefreshclear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuedisposepublic static String NAME
public static String DESCRIPTION
public static final String METADATA_DEFINITION_NAME
public static final String FORMAT_GTiff
public static final String FORMAT_VRT
public static final String FORMAT_NITF
public static final String FORMAT_HFA
public static final String FORMAT_ELAS
public static final String FORMAT_MEM
public static final String FORMAT_BMP
public static final String FORMAT_PCIDSK
public static final String FORMAT_ILWIS
public static final String FORMAT_HDF4
public static final String FORMAT_PNM
public static final String FORMAT_ENVI
public static final String FORMAT_EHDR
public static final String FORMAT_PAUX
public static final String FORMAT_MFF
public static final String FORMAT_MFF2
public static final String FORMAT_BT
public static final String FORMAT_IDA
public static final String FORMAT_RMF
public static final String FORMAT_RST
public static final String FORMAT_LEVELLER
public static final String FORMAT_TERRAGEN
public static final String FORMAT_ERS
public static final String FORMAT_INGR
public static final String FORMAT_GSAG
public static final String FORMAT_GSBG
public static final String FORMAT_ADRG
public static final String FORMAT_JP2
public static final String FORMAT_GRD
public static final int BAND_HEIGHT
protected GdalDataSource file
protected static String[][] formatList
public GdalProvider()
public GdalProvider(String params) throws NotSupportedExtensionException, OpenException
GdalProvider(URI), this constructor will be
removed in gvSIG 2.5params - NotSupportedExtensionExceptionOpenExceptionpublic GdalProvider(URI uri) throws NotSupportedExtensionException
uri - NotSupportedExtensionExceptionpublic GdalProvider(GdalDataParameters params, DataStoreProviderServices storeServices) throws NotSupportedExtensionException
NotSupportedExtensionExceptionpublic GdalProvider(AbstractRasterDataParameters params, DataStoreProviderServices storeServices, DynObject metadata)
public static void register()
public String[] getFormatList()
RasterProvidergetFormatList in interface RasterProvidergetFormatList in class AbstractRasterProviderpublic boolean isExtensionSupported(String ext)
ext - public void init(AbstractRasterDataParameters params, DataStoreProviderServices storeServices) throws NotSupportedExtensionException
params - load parametersstoreServices - NotSupportedExtensionExceptionpublic String getMimeType()
public RasterProvider load()
AbstractRasterProviderload in class AbstractRasterProviderpublic boolean isOpen()
RasterProviderpublic URI translateURI(URI uri)
AbstractRasterProvidertranslateURI in class AbstractRasterProviderpublic void setView(Extent e)
setView in class AbstractRasterProvidere - public 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 Object readCompleteLine(int line, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
line - band - InvalidSetViewExceptionFileNotOpenExceptionRasterDriverExceptionpublic Object readBlock(int pos, int blockHeight, double scale) throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException
RasterProviderpublic Object getData(int x, int y, int band) throws InvalidSetViewException, FileNotOpenException, RasterDriverException
AbstractRasterProvidergetData in interface RasterProvidergetData in class AbstractRasterProviderx - coordenada Xy - coordenada YInvalidSetViewExceptionFileNotOpenExceptionRasterDriverExceptionpublic 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 DataStoreMetadata getMetadata()
RasterProvidergetMetadata in interface RasterProvidergetMetadata in class AbstractRasterProviderpublic Transparency getTransparency()
RasterProvidergetTransparency in interface RasterProvidergetTransparency in class AbstractRasterProviderpublic boolean isGeoreferenced()
AbstractRasterProviderisGeoreferenced in interface RasterProviderisGeoreferenced in class AbstractRasterProviderpublic boolean isSupersampling()
protected GdalDataSource getNative()
public void setAffineTransform(AffineTransform t)
RasterProvidersetAffineTransform in interface RasterProvidersetAffineTransform in class AbstractRasterProvidert - Transformación afín a aplicarpublic int getOverviewCount(int band)
throws BandAccessException,
RasterDriverException
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 boolean isReproyectable()
AbstractRasterProviderisReproyectable in interface RasterProviderisReproyectable in class AbstractRasterProviderpublic boolean needEnhanced()
RasterProviderneedEnhanced in interface RasterProviderneedEnhanced in class AbstractRasterProviderpublic String getProviderName()
DataStoreProviderpublic void setStatus(RasterProvider provider)
RasterProviderpublic TileServer getTileServer()
RasterProviderpublic void close()
DataStoreProviderclose in interface RasterProviderclose in class AbstractRasterProviderprotected void finalize()
throws Throwable
finalize in class AbstractRasterProviderThrowablepublic void addFile(File file) throws InvalidSourceException
RasterProviderInvalidSourceExceptionpublic void removeFile(File file)
RasterProvider