|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractGridCoverage2DReader
GrassCoverageReader
public class GrassCoverageReader
Coverage Reader class for reading GRASS raster maps.
The class reads a GRASS raster map from a GRASS workspace (see package documentation for further info). The reading is really done via Imageio extended classes.
GrassBinaryImageReader
,
GrassBinaryRasterReadHandler
Field Summary |
---|
Fields inherited from class AbstractGridCoverage2DReader |
---|
closeMe, coverageFactory, coverageName, crs, gzipped, highestRes, hints, inStream, inStreamSPI, numOverviews, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, source |
Constructor Summary | |
---|---|
GrassCoverageReader(Object input)
Sets the input source to use to the given file object . |
Method Summary | |
---|---|
String |
getCategoriesString()
Getter for the categories string. |
Format |
getFormat()
Returns the format handled by this GridCoverageReader . |
String |
getLegendString()
Getter for the legend string. |
double[] |
getRange()
Gets the range. |
GridCoverage2D |
read(GeneralParameterValue[] params)
Read the current grid coverage from the stream. |
GridCoverage2D |
readRaster(JGrassRegion region)
Performs the reading of the coverage. |
void |
setParams(PixelInCell cellAnchor,
Interpolation interpolation,
boolean useSubSamplingAsColsRows,
boolean castDoubleToFloating,
ProgressListener monitor)
Constructor for the GrassCoverageReader . |
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface GridCoverageReader |
---|
dispose, getCurrentSubname, getGridCoverageCount, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip |
Constructor Detail |
---|
public GrassCoverageReader(Object input)
file object
.
The input source must be set before any of the query or read methods are used.
input
- the File
to use for future decoding.Method Detail |
---|
public void setParams(PixelInCell cellAnchor, Interpolation interpolation, boolean useSubSamplingAsColsRows, boolean castDoubleToFloating, ProgressListener monitor)
GrassCoverageReader
.
cellAnchor
- the object defining whether to assume the pixel value to be
read in the grid's cell corner or center.interpolation
- the type of interpolation to be used in the case some scaling
or padding has to be done.useSubSamplingAsColsRows
- a flag that gives the possibility to bypass the imageio
subsampling mechanism. With GRASS maps this is often more
performant in some boundary situations. In the case this flag
is set to true, the subsampling values will be handled as the
requested columns and rows.castDoubleToFloating
- a flag that gives the possibility to force the reading of a
map as a floating point map. This is necessary right now
because of a imageio bug:
https://jai-imageio-core.dev.java.net
/issues/show_bug.cgi?id=180.monitor
- a monitor
for logging purposes.
This can be null, in which case a dummy one will be used.public GridCoverage2D readRaster(JGrassRegion region) throws IOException
This method read the grass file with a special image I/O class. If the image support the tiling read the data with a special operation which are written for this case. The step are:
region
- the region
to read.
If null, the map is read in its
original boundary and resolution.
read coverage
.
IOException
public String getLegendString()
public String getCategoriesString()
public double[] getRange()
public GridCoverage2D read(GeneralParameterValue[] params) throws IllegalArgumentException, IOException
AbstractGridCoverage2DReader
Example:
The method AbstractGridCoverage2DReader.hasMoreGridCoverages()
should be invoked first in order to verify that a coverage is available.
read
in interface GridCoverage2DReader
read
in interface GridCoverageReader
read
in class AbstractGridCoverage2DReader
params
- Optional parameters matching Format.getReadParameters()
.
InvalidParameterNameException
- if a parameter in parameters
doesn't have a recognized name.
InvalidParameterValueException
- if a parameter in parameters
doesn't have a valid value.
ParameterNotFoundException
- if a parameter was required for the operation but was
not provided in the parameters
list.
IOException
- if a read operation failed for some other input/output reason, including FileNotFoundException
if no file with the
given name
can be found, or IIOException
if an error was thrown by the underlying image library.
IllegalArgumentException
public Format getFormat()
GridCoverageReader
GridCoverageReader
.
getFormat
in interface GridCoverageReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |