com.moseph.gis.raster
Class RasterWriter

java.lang.Object
  extended by com.moseph.gis.raster.RasterWriter

public class RasterWriter
extends java.lang.Object

Writes rasters out to files.

Author:
dmrust

Constructor Summary
RasterWriter()
           
 
Method Summary
 void setCellFormat(java.text.NumberFormat format)
          Can be used to set a number format for the cells.
 void writeRaster(java.lang.String filename, double[][] data, double xll, double yll, double size, java.lang.String ndata)
          Shortcut method, if you just have some data and want to write it out as a Raster.
 void writeRaster(java.lang.String filename, Raster r)
          Writes out the given Raster object to the given filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterWriter

public RasterWriter()
Method Detail

writeRaster

public void writeRaster(java.lang.String filename,
                        Raster r)
                 throws java.io.IOException
Writes out the given Raster object to the given filename. Throws the exceptions associated with filehandling

Parameters:
filename -
r -
Throws:
java.io.IOException

writeRaster

public void writeRaster(java.lang.String filename,
                        double[][] data,
                        double xll,
                        double yll,
                        double size,
                        java.lang.String ndata)
                 throws java.io.IOException
Shortcut method, if you just have some data and want to write it out as a Raster. There is no error checking at the moment (e.g. about equal size rows)

Parameters:
filename -
data -
xll -
yll -
size -
ndata -
Throws:
java.io.IOException

setCellFormat

public void setCellFormat(java.text.NumberFormat format)
Can be used to set a number format for the cells. For example, if they are all integer values, you can set an integer format. This should help with roundtrippability for existing Raster files

Parameters:
format -