|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjwo.landserf.process.io.FileIO
jwo.landserf.process.io.BinRasterIO
Contains a collection of static methods for reading and writing binary raster files.
Field Summary |
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 | |
BinRasterIO()
There should be no need to call the constructor explicitly since all methods are static. |
Method Summary | |
static Footprint |
readGeoW(String rasterFileName,
int rasterHeight)
Reads a world file containing the affine transformation that adds georeferencing to a raster file. |
static Projection |
readProjection(String fileName)
Creates a projection object based on a 'prj' file. |
static RasterMap |
readRaster(String fileName,
int fileFormat,
GISFrame gisFrame,
LSThread lsThread)
Reads a binary file in the given format and creates a raster map from it. |
static boolean |
writeGeoW(String rasterFileName,
Footprint bounds,
float xRes,
float yRes)
Writes a 'world' file containing the affine transformation that adds georeferencing to a binary raster or imagefile. |
static boolean |
writeRaster(RasterMap raster,
String fileName,
int fileFormat,
GISFrame gisFrame,
LSThread lsThread)
Writes a binary file in the given format based on the given raster map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BinRasterIO()
Method Detail |
public static RasterMap readRaster(String fileName, int fileFormat, GISFrame gisFrame, LSThread lsThread)
fileName
- Name of file to read.fileFormat
- Type of binary file to read (see FileHandler
).gisFrame
- GUI in which to report results.lsThread
- Thread that called this method (allows this to be interrupted).
FileHandler
public static boolean writeRaster(RasterMap raster, String fileName, int fileFormat, GISFrame gisFrame, LSThread lsThread)
raster
- Raster map to write out as file.fileName
- Name of file to write.fileFormat
- Type of binary file to write (see FileHandler
).gisFrame
- GUI in which to report results.lsThread
- Thread that called this method (allows this to be interrupted).
Can be null, in which case, method cannot be interrupted.
FileHandler
public static Footprint readGeoW(String rasterFileName, int rasterHeight)
rasterFileName
- Name of raster to georeference.rasterHeight
- Height of raster (needed to transform top-left to bottom left origin).
public static boolean writeGeoW(String rasterFileName, Footprint bounds, float xRes, float yRes)
rasterFileName
- Name of raster to georeference.bounds
- Georeferenced bounds used to calculate transformation.xRes
- x Resolution of single raster cell.yRes
- y Resolution of single raster cell.
public static Projection readProjection(String fileName)
fileName
- Name of file associated with projection (the name without
extension is used to find .prj file name).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |