jwo.landserf.process.io
Class TextRasterIO
java.lang.Object
jwo.landserf.process.io.FileIO
jwo.landserf.process.io.TextRasterIO
- public class TextRasterIO
- extends FileIO
Contains a collection of static methods for reading and
writing text raster files.
- Version:
- 2.1, 31st August, 2004.
- Author:
- Jo Wood
Fields inherited from class jwo.landserf.process.io.FileIO |
BIG_ENDIAN, bitsPerValue, byteOrder, errorMessage, filePointer, GATHER_INFO, lineNumber, LITTLE_ENDIAN, LOAD_ALL, LOAD_SELECTED, nullCode, substituteNull, useMultiplier, zMultiplier |
Constructor Summary |
TextRasterIO()
There should be no need to call the constructor explicitly since
all methods are static. |
Method Summary |
static RasterMap |
readRaster(String fileName,
int fileFormat,
GISFrame gisFrame)
Reads a text file in the given format and creates a raster map from it. |
static boolean |
writeRaster(RasterMap rasterMap,
String fileName,
int fileFormat,
GISFrame gisFrame)
Writes a text file in the given format based on the supplied raster map. |
Methods inherited from class jwo.landserf.process.io.FileIO |
getErrorMessage, readByte, readByte, readCharacters, readDouble, readDouble, readDoubleBigEndian, readDoubleBigEndian, readDoubleLittleEndian, readDoubleLittleEndian, readFloat, readFloat, readFloatBigEndian, readFloatBigEndian, readFloatLittleEndian, readFloatLittleEndian, readInt, readInt, readIntBigEndian, readIntBigEndian, readIntLittleEndian, readIntLittleEndian, readNextWord, readShort, readShort, readShortBigEndian, readShortBigEndian, readShortLittleEndian, readShortLittleEndian, reset, seek, skip, skip, writeByte, writeCharacters, writeDouble, writeDoubleBigEndian, writeDoubleLittleEndian, writeFloat, writeFloatBigEndian, writeFloatLittleEndian, writeInt, writeIntBigEndian, writeIntLittleEndian, writeLine, writeShort, writeShortBigEndian, writeShortLittleEndian |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextRasterIO
public TextRasterIO()
- There should be no need to call the constructor explicitly since
all methods are static.
readRaster
public static RasterMap readRaster(String fileName,
int fileFormat,
GISFrame gisFrame)
- Reads a text file in the given format and creates a raster map from it.
- Parameters:
fileName
- Name of file to read.fileFormat
- Type of text file to read (see FileHandler
).gisFrame
- GUI in which to report results.
- Returns:
- Raster map containing read data, or null if problems reading.
- See Also:
FileHandler
writeRaster
public static boolean writeRaster(RasterMap rasterMap,
String fileName,
int fileFormat,
GISFrame gisFrame)
- Writes a text file in the given format based on the supplied raster map.
- Parameters:
rasterMap
- Raster map to write.fileName
- Name of file to create.fileFormat
- Type of text file to create (see FileHandler
).gisFrame
- GUI in which to report results.
- Returns:
- True if written sucessfully.
- See Also:
FileHandler
Copyright Jo Wood, 1996-2004, last modified, 3rd September, 2004