| |
|
| java.lang.Object org.geotools.data.coverage.grid.AbstractGridCoverage2DReader
AbstractGridCoverage2DReader | abstract public class AbstractGridCoverage2DReader implements GridCoverageReader(Code) | | This class is a first attempt for providing a way to get more informations
out of a single 2D raster datasets (x,y). It is worth to remark that for the
moment this is thought for 2D rasters not for 3D or 4D rasters (x,y,z,t).
The main drawback I see with the current GeoApi GridCoverageReader interface
is that there is no way to get real information about a raster source unless
you instantiate a GridCoverage. As an instance it is impossible to know the
envelope, the number of overviews, the tile size. This information is needed
in order to perform decimation on reading or to use built-in overviews
This really impacts the ability to exploit raster datasets in a desktop
environment where caching is crucial.
author: Simone Giannecchini since: 2.3 version: 0.2org.geotools.coverage.grid.io.AbstractGridCoverage2DReader |
EPS | final protected static double EPS(Code) | | |
closeMe | protected boolean closeMe(Code) | | Temp variable used in many readers.
|
coverageFactory | final protected static GridCoverageFactory coverageFactory(Code) | | Caches a default GridCoverageFactory for usage in plugins.
|
coverageName | protected String coverageName(Code) | | Coverage name
|
crs | protected CoordinateReferenceSystem crs(Code) | | crs for this coverage
|
demColors | final protected static Color[] demColors(Code) | | Default color ramp. Preset colors used to generate an Image from the raw
data
|
gzipped | protected boolean gzipped(Code) | | In case we are trying to read from a GZipped file this will be set to
true.
|
highestRes | protected double[] highestRes(Code) | | Highest resolution availaible for this reader.
|
numOverviews | protected volatile int numOverviews(Code) | | This contains the maximum number of grid coverages in the file/stream.
Until multi-image files are supported, this is going to be 0 or 1.
|
operationFactory | final protected static CoordinateOperationFactory operationFactory(Code) | | Buffered factory for coordinate operations.
|
overViewResolutions | protected double[][] overViewResolutions(Code) | | Resolutions avialaible through an overviews based mechanism.
|
raster2Model | protected MathTransform raster2Model(Code) | | 2DGridToWorld math transform.
|
createImageCoverage | final protected GridCoverage createImageCoverage(PlanarImage image, MathTransform raster2Model) throws IOException(Code) | | Creates a
GridCoverage for the provided
PlanarImage using
the
AbstractGridCoverage2DReader.raster2Model that was provided for this coverage.
This method is vital when working with coverages that have a raster to model transformation
that is not a simple scale and translate.
Parameters: image - contains the data for the coverage to create. Parameters: raster2Model - is the MathTransform that maps from the raster space to the model space. a GridCoverage throws: IOException - |
decimationOnReadingControl | final protected void decimationOnReadingControl(Integer imageChoice, ImageReadParam readP, double[] requestedRes)(Code) | | This method is responsible for evaluating possible subsampling factors
once the best resolution level has been found, in case we have support
for overviews, or starting from the original coverage in case there are
no overviews availaible.
Anyhow this methof should not be called directly but subclasses should
make use of the setReadParams method instead in order to transparently
look for overviews.
Parameters: imageChoice - Parameters: readP - Parameters: requestedRes - |
dispose | public void dispose()(Code) | | Disposes this reader.
This method just tries to close the underlying
ImageInputStream .
|
getCurrentSubname | public String getCurrentSubname()(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.getCurrentSubname |
getGridCoverageCount | public int getGridCoverageCount()(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.getGridCoverageCount |
getMetadataNames | public String[] getMetadataNames()(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.getMetadataNames |
getMetadataValue | public String getMetadataValue(String name) throws MetadataNameNotFoundException(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.getMetadataValue(java.lang.String) |
getOriginalGridRange | final public GeneralGridRange getOriginalGridRange()(Code) | | Retrieves the
GeneralGridRange that represents the raster grid
dimensions of the highest resolution level in this dataset.
the GeneralGridRange that represents the raster griddimensions of the highest resolution level in this dataset. |
getResolution | final protected double[] getResolution(GeneralEnvelope envelope, Rectangle2D dim, CoordinateReferenceSystem crs) throws DataSourceException(Code) | | This method is responsible for computing the resolutions in for the
provided grid geometry in the provided crs.
It is worth to note that the returned resolution array is of length of 2
and it always is lon, lat for the moment.
It might be worth to remove the axes reordering code when we are
confident enough with the code to handle the north-up crs.
TODO use orthodromic distance?
Parameters: envelope - the GeneralEnvelope Parameters: dim - Parameters: crs - throws: DataSourceException - |
hasMoreGridCoverages | public boolean hasMoreGridCoverages()(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.hasMoreGridCoverages |
isScaleTranslate | final protected boolean isScaleTranslate(MathTransform transform)(Code) | | Checks the transformation is a pure scale/translate instance (using a tolerance)
Parameters: transform - |
listSubNames | public String[] listSubNames()(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.listSubNames |
setReadParams | protected Integer setReadParams(ImageReadParam readP, GeneralEnvelope requestedEnvelope, Rectangle requestedDim) throws IOException, TransformException(Code) | | This method is responsible for preparing the read param for doing an
ImageReader.read(intImageReadParam) .
This method is responsible for preparing the read param for doing an
ImageReader.read(intImageReadParam) . It sets the passed
ImageReadParam in terms of decimation on reading using the
provided requestedEnvelope and requestedDim to evaluate the needed
resolution. It also returns and
Integer representing the index of
the raster to be read when dealing with multipage raster.
Parameters: readP - an instance of ImageReadParam for setting thesubsampling factors. Parameters: requestedEnvelope - the GeneralEnvelope we are requesting. Parameters: requestedDim - the requested dimensions. the index of the raster to read in the underlying data source. throws: IOException - throws: TransformException - |
skip | public void skip()(Code) | | See Also: org.opengis.coverage.grid.GridCoverageReader.skip |
|
|
|