|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.util.RasterUtil
public class RasterUtil
This Class provides some simple mostly independent functions
related to Geo-Rasters and WritableGrids
.
Constructor Summary | |
---|---|
RasterUtil()
|
Method Summary | |
---|---|
static boolean |
checkEqual(WritableGrid a,
WritableGrid b,
boolean outputToConsole)
Runs through every grid cell and checks if the two Grids are equal (based on the RasterMetaData of the first Grid. |
static void |
copyInto(WritableGrid src,
WritableGrid target)
Copies all values from a WritableGrid into another
WritableGrid . |
static RasterMetaData |
getRasterMetaData_from_ArcGridASCII_File(File src)
Extracts metadata out of a ArcGridASCII File without reading the whole Grid (only the Header is parsed). |
static void |
printGrid(WritableGrid grid)
Prints the grid to the console (useful for testing). |
static void |
printGrid(WritableGrid grid,
int spacing,
int precision,
String name)
Prints the grid to the console (useful for testing). |
static void |
printGrid(WritableGrid grid,
String name)
Prints the grid to the console (useful for testing). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RasterUtil()
Method Detail |
---|
public static RasterMetaData getRasterMetaData_from_ArcGridASCII_File(File src)
src
- the ArcInfoASCII file
public static boolean checkEqual(WritableGrid a, WritableGrid b, boolean outputToConsole)
RasterMetaData
of the first Grid. If the difference is
smaller than 0.0001 only conversion Warning is given. Output to console
may be enabled. Writes out warning to sysout, if metaData is not equal,
but continues checking
a
- 1st gridb
- 2nd gridoutputToConsole
- if true the results and some infos are written on System.out
public static void copyInto(WritableGrid src, WritableGrid target)
WritableGrid
into another
WritableGrid
. Of course the grids must have the same dimensions.
src
- target
-
UnsupportedOperationException
- if the dimensions of the grids does not match or one of the
grids is nullpublic static void printGrid(WritableGrid grid, int spacing, int precision, String name)
grid
- the grid to be printedspacing
- the space to be reserved for one cell-valueprecision
- the decimal places to be printed outname
- the name will be shown in the heading of the outputpublic static void printGrid(WritableGrid grid, String name)
grid
- the grid to be printedname
- the name will be shown in the heading of the outputpublic static void printGrid(WritableGrid grid)
grid
- the grid to be printed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |