uk.ac.leeds.ccg.andyt.grids.exchange
Class ESRIAsciiGridImporter

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
      extended by uk.ac.leeds.ccg.andyt.grids.exchange.ESRIAsciiGridImporter
All Implemented Interfaces:
java.io.Serializable

public class ESRIAsciiGridImporter
extends ErrorHandler

Class for importing ESRI Asciigrid.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
handleOutOfMemoryErrorFalse, handleOutOfMemoryErrorTrue, memoryReserve
 
Constructor Summary
ESRIAsciiGridImporter()
          Creates a new instance of ESRIAsciiGridImporter
ESRIAsciiGridImporter(java.io.File file)
          Creates a new instance of ESRIAsciiGridImporter
 
Method Summary
 void close()
          For closing this.bufferedReader.
 Grid2DSquareCellDouble constructGrid2DSquareCellDouble(GridStatisticsAbstract gridStatistics, java.io.File outputDirectory, Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory, int chunkNrows, int chunkNcols)
          Returns a Grid2DSquareCellDouble loaded from this.file
 Grid2DSquareCellInt constructGrid2DSquareCellInt(GridStatisticsAbstract gridStatistics, java.io.File outputDirectory, Grid2DSquareCellIntChunkAbstractFactory grid2DSquareCellIntChunkFactory, int chunkNrows, int chunkNcols)
          Returns a Grid2DSquareCellInt loaded from this.file
 java.lang.String getFilenamePrefix()
          Returns the prefix (before "." part of filename of this.file.
 double readDouble()
          Returns the next value as a double or Double.NEGATIVE_INFINITY
 double[] readHeaderDouble()
          Reads the header of the file and returns a double[] where; [0] = (double) ncols; [1] = (double) nrows; [2] = xllcorner; [3] = yllcorner; [4] = cellsize; [5] = noDataValue if it exists or Double.NEGATIVE_INFINITY otherwise
 java.lang.Object[] readHeaderObject()
          Reads the header of the file and returns a Object[] where; [0] = Long( ncols ); [1] = (double) nrows; [2] = xllcorner; [3] = yllcorner; [4] = cellsize; [5] = noDataValue if it exists or Double.NEGATIVE_INFINITY otherwise
 int readInt()
          Returns the next value as a int or Integer.MIN_VALUE
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
clearMemoryReserve, initMemoryReserve, initMemoryReserve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESRIAsciiGridImporter

public ESRIAsciiGridImporter()
Creates a new instance of ESRIAsciiGridImporter


ESRIAsciiGridImporter

public ESRIAsciiGridImporter(java.io.File file)
Creates a new instance of ESRIAsciiGridImporter

Method Detail

constructGrid2DSquareCellInt

public Grid2DSquareCellInt constructGrid2DSquareCellInt(GridStatisticsAbstract gridStatistics,
                                                        java.io.File outputDirectory,
                                                        Grid2DSquareCellIntChunkAbstractFactory grid2DSquareCellIntChunkFactory,
                                                        int chunkNrows,
                                                        int chunkNcols)
Returns a Grid2DSquareCellInt loaded from this.file


constructGrid2DSquareCellDouble

public Grid2DSquareCellDouble constructGrid2DSquareCellDouble(GridStatisticsAbstract gridStatistics,
                                                              java.io.File outputDirectory,
                                                              Grid2DSquareCellDoubleChunkAbstractFactory grid2DSquareCellDoubleChunkFactory,
                                                              int chunkNrows,
                                                              int chunkNcols)
Returns a Grid2DSquareCellDouble loaded from this.file


readHeaderDouble

public double[] readHeaderDouble()
Reads the header of the file and returns a double[] where; [0] = (double) ncols; [1] = (double) nrows; [2] = xllcorner; [3] = yllcorner; [4] = cellsize; [5] = noDataValue if it exists or Double.NEGATIVE_INFINITY otherwise


readHeaderObject

public java.lang.Object[] readHeaderObject()
Reads the header of the file and returns a Object[] where; [0] = Long( ncols ); [1] = (double) nrows; [2] = xllcorner; [3] = yllcorner; [4] = cellsize; [5] = noDataValue if it exists or Double.NEGATIVE_INFINITY otherwise


readDouble

public double readDouble()
Returns the next value as a double or Double.NEGATIVE_INFINITY


readInt

public int readInt()
Returns the next value as a int or Integer.MIN_VALUE


close

public void close()
For closing this.bufferedReader.


getFilenamePrefix

public java.lang.String getFilenamePrefix()
Returns the prefix (before "." part of filename of this.file.