Package org.geotools.gce.pgraster
Class PGRasterReader
Object
AbstractGridCoverage2DReader
PGRasterReader
- All Implemented Interfaces:
GridCoverageReader
,GridCoverage2DReader
PostGIS raster reader.
-
Field Summary
Fields inherited from class AbstractGridCoverage2DReader
closeMe, coverageFactory, coverageName, crs, dtLayout, EPS, gzipped, highestRes, hints, inStream, inStreamSPI, numOverviews, offsets, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, scales, source
Fields inherited from interface GridCoverage2DReader
ELEVATION_DOMAIN, ELEVATION_DOMAIN_MAXIMUM, ELEVATION_DOMAIN_MINIMUM, ELEVATION_DOMAIN_RESOLUTION, FILE_SOURCE_PROPERTY, HAS_ELEVATION_DOMAIN, HAS_TIME_DOMAIN, MULTICRS_EPSGCODES, MULTICRS_READER, PAM_DATASET, REPROJECTING_READER, SOURCE_URL_PROPERTY, TIME_DOMAIN, TIME_DOMAIN_MAXIMUM, TIME_DOMAIN_MINIMUM, TIME_DOMAIN_RESOLUTION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes this reader.Returns the format handled by thisGridCoverageReader
.String[]
Returns the list of metadata keywords associated with the input source as a whole (not associated with any particular grid coverage).getMetadataValue
(String coverageName, String name) Retrieve the metadata value for a given metadata name for a specified coverage.name()
read
(GeneralParameterValue... params) Read the current grid coverage from the stream.Methods inherited from class AbstractGridCoverage2DReader
addAllSiblings, addSiblings, checkName, collectScaleOffset, createImageCoverage, createImageCoverage, createImageCoverage, createImageCoverage, decimationOnReadingControl, finalize, getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getFiles, getGridCoverageCount, getGridCoverageNames, getGroundControlPoints, getGroundControlPoints, getHighestRes, getHighestRes, getImageLayout, getImageLayout, getInfo, getInfo, getMetadataNames, getMetadataValue, getMultiLevelROIProvider, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getOverviewGridEnvelope, getOverviewGridEnvelope, getPamDataset, getPamDataset, getReadingResolutions, getReadingResolutions, getRescaledRasterToModel, getResolution, getResolutionLevels, getResolutionLevels, getSibling, getSource, getSourceAsFile, read, setlayout, setLayout, setReadParams, setReadParams
-
Constructor Details
-
PGRasterReader
- Throws:
IOException
-
-
Method Details
-
name
-
getFormat
Description copied from interface:GridCoverageReader
Returns the format handled by thisGridCoverageReader
. -
getMetadataNames
Description copied from interface:GridCoverageReader
Returns the list of metadata keywords associated with the input source as a whole (not associated with any particular grid coverage). If no metadata is available, the array will be empty.- Specified by:
getMetadataNames
in interfaceGridCoverageReader
- Overrides:
getMetadataNames
in classAbstractGridCoverage2DReader
- Returns:
- The list of metadata keywords for the input source.
- See Also:
-
getMetadataValue
Description copied from interface:GridCoverageReader
Retrieve the metadata value for a given metadata name for a specified coverage.- Specified by:
getMetadataValue
in interfaceGridCoverageReader
- Overrides:
getMetadataValue
in classAbstractGridCoverage2DReader
name
- Metadata keyword for which to retrieve metadata.- Returns:
- The metadata value for the given metadata name. Should be one of the name returned by
GridCoverageReader.getMetadataNames()
.
-
read
public GridCoverage2D read(GeneralParameterValue... params) throws IllegalArgumentException, IOException Description copied from class:AbstractGridCoverage2DReader
Read the current grid coverage from the stream.Example:
- Specified by:
read
in interfaceGridCoverage2DReader
- Specified by:
read
in interfaceGridCoverageReader
- Specified by:
read
in classAbstractGridCoverage2DReader
- Parameters:
params
- Optional parameters matchingFormat.getReadParameters()
.- Returns:
- a grid coverage from the input source.
- Throws:
InvalidParameterNameException
- if a parameter inparameters
doesn't have a recognized name.InvalidParameterValueException
- if a parameter inparameters
doesn't have a valid value.ParameterNotFoundException
- if a parameter was required for the operation but was not provided in theparameters
list.IOException
- if a read operation failed for some other input/output reason, includingFileNotFoundException
if no file with the givenname
can be found, orIIOException
if an error was thrown by the underlying image library.IllegalArgumentException
-
dispose
public void dispose()Description copied from class:AbstractGridCoverage2DReader
Disposes this reader.This method just tries to close the underlying
ImageInputStream
.- Specified by:
dispose
in interfaceGridCoverageReader
- Overrides:
dispose
in classAbstractGridCoverage2DReader
-