Class BaseGridCoverage2DReader

    • Field Detail

      • multiLevelRoi

        protected MultiLevelROI multiLevelRoi
        This reader is made of a single file so the MultiLevelROI is unique
      • nodata

        protected Double nodata
    • Constructor Detail

      • BaseGridCoverage2DReader

        protected BaseGridCoverage2DReader​(Object input,
                                           Hints hints,
                                           String worldFileExtension,
                                           ImageReaderSpi formatSpecificSpi)
                                    throws DataSourceException
        Creates a new instance of a BaseGridCoverage2DReader. I assume nothing about file extension.
        input - Source object for which we want to build a BaseGridCoverage2DReader.
        hints - Hints to be used by this reader throughout his life.
        worldFileExtension - the specific world file extension of the underlying format
        formatSpecificSpi - an instance of a proper ImageReaderSpi.
    • Method Detail

      • setCoverageProperties

        protected abstract void setCoverageProperties​(ImageReader reader)
                                               throws IOException
        Implement this method to setup the coverage properties (Envelope, CRS, GridRange) using the provided ImageReader
      • read

        public GridCoverage2D read​(GeneralParameterValue[] params)
                            throws IllegalArgumentException,
        Returns a GridCoverage from this reader in compliance with the specified parameters.
        Specified by:
        read in interface GridCoverage2DReader
        Specified by:
        read in interface GridCoverageReader
        Specified by:
        read in class AbstractGridCoverage2DReader
        params - a GeneralParameterValue array to customize the read operation.
        a grid coverage from the input source.
        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.
      • parsePRJFile

        protected void parsePRJFile()
        Gets the coordinate reference system that will be associated to the GridCoverage by looking for a related PRJ.
      • parseWorldFile

        protected void parseWorldFile()
        Checks whether a world file is associated with the data source. If found, set a proper envelope.
      • getInputFile

        protected File getInputFile()
        the input file
      • getCoverageName

        public String getCoverageName()
        the coverage name
      • getNodata

        public Double getNodata()