Class HMModelIM

    • Field Detail

      • inRasterIterators

        protected List<javax.media.jai.iterator.RandomIter> inRasterIterators
      • inRasterNovalues

        protected List<Double> inRasterNovalues
      • inRasters

        protected List<org.geotools.coverage.grid.GridCoverage2D> inRasters
      • outRasterIterators

        protected List<javax.media.jai.iterator.WritableRandomIter> outRasterIterators
      • outGridCoverages

        protected List<org.geotools.coverage.grid.GridCoverage2D> outGridCoverages
      • locationField

        protected String locationField
      • xRes

        protected double xRes
      • yRes

        protected double yRes
      • crs

        protected org.opengis.referencing.crs.CoordinateReferenceSystem crs
      • llCorner

        protected double[] llCorner
      • urCorner

        protected double[] urCorner
      • boundsGeometries

        protected List<org.locationtech.jts.geom.Geometry> boundsGeometries
      • cellBuffer

        protected int cellBuffer
      • readGridGeometry

        protected org.geotools.coverage.grid.GridGeometry2D readGridGeometry
    • Constructor Detail

      • HMModelIM

        public HMModelIM()
    • Method Detail

      • getGridCoverage

        protected org.geotools.coverage.grid.GridCoverage2D getGridCoverage​(int readerNum,
                                                                            double north,
                                                                            double south,
                                                                            double east,
                                                                            double west)
                                                                     throws Exception
        Get the GridCoverage2D in a certain region.

        It might be usefull for faster access to the underlying data to extract the raster before creatin the iterator, instead of iterating directly.

        This can be done on the returned gridcoverage through: Raster readRaster = readGC.getRenderedImage().getData(); RandomIter readIter = RandomIterFactory.create(readRaster, null);

        Parameters:
        readerNum - the number of the reader to use.
        north -
        south -
        east -
        west -
        Returns:
        the gridcoverage inside the supplied bounds.
        Throws:
        Exception
      • getGridCoverage

        protected org.geotools.coverage.grid.GridCoverage2D getGridCoverage​(int readerNum,
                                                                            org.locationtech.jts.geom.Envelope envelope)
                                                                     throws Exception
        Throws:
        Exception
      • processByTileCells

        protected void processByTileCells()
                                   throws Exception
        Throws:
        Exception
      • dispose

        protected void dispose()
        Disposes resources.
      • processCell

        protected abstract void processCell​(int readCol,
                                            int readRow,
                                            int writeCol,
                                            int writeRow,
                                            int readCols,
                                            int readRows,
                                            int writeCols,
                                            int writeRows)
        Process one cell.

        This is used when processByTileCells() is called.

        Parameters:
        readCol - the column of the cell to read.
        readRow - the row of the cell to read.
        writeCol - the column of the cell to write.
        writeRow - the row of the cell to write.
        readCols - the total columns of the current handled read tile.
        readRows - the total rows of the current handled read tile.
        writeCols - the total columns of the current handled written tile.
        writeRows - the total rows of the current handled written tile.