uk.ac.leeds.ccg.andyt.grids.examples
Class GenerateTestData

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
      extended by uk.ac.leeds.ccg.andyt.grids.examples.GenerateTestData
All Implemented Interfaces:
java.lang.Runnable

public class GenerateTestData
extends Grid2DSquareCellProcessor
implements java.lang.Runnable

TODO: docs


Field Summary
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
_Directory, _Grid2DSquareCellDoubleChunk64CellMapFactory, _Grid2DSquareCellDoubleChunkArrayFactory, _Grid2DSquareCellDoubleChunkFactory, _Grid2DSquareCellDoubleChunkJAIFactory, _Grid2DSquareCellDoubleChunkMapFactory, _Grid2DSquareCellDoubleChunkRAFFactory, _Grid2DSquareCellDoubleFactory, _Grid2DSquareCellIntChunk64CellMapFactory, _Grid2DSquareCellIntChunkArrayFactory, _Grid2DSquareCellIntChunkJAIFactory, _Grid2DSquareCellIntChunkMapFactory, _Grid2DSquareCellIntChunkRAFFactory, _Grid2DSquareCellIntFactory, _Grid2DSquareCelllIntChunkFactory, _GridStatistics, _GridStatistics0, _GridStatistics1, log, logIndentation, startTime
 
Constructor Summary
GenerateTestData()
          Creates new GenerateTestData.
GenerateTestData(java.io.File workspace)
          Creates new GenerateTestData.
 
Method Summary
 Grid2DSquareCellDouble[] generateCatchment(boolean _HandleOutOfMemoryError)
           
 Grid2DSquareCellDouble[] generateCircularData(boolean _HandleOutOfMemoryError)
           
 Grid2DSquareCellDouble[] generateSquareData(boolean _HandleOutOfMemoryError)
           
 java.util.HashSet getCellIDs(Grid2DSquareCellDouble grid, long row, long col, double minRadius, double maxRadius, boolean _HandleOutOfMemoryError)
           
 java.util.HashSet getCellIDsHashSet(Grid2DSquareCellDouble grid, long row, long col, double radius, boolean _HandleOutOfMemoryError)
           
 long getRandomCol(long ncols, double maxRadius)
           
 long getRandomRow(long nrows, double maxRadius)
           
static void main(java.lang.String[] args)
           
 void printCircularFeatureInfo(java.io.PrintWriter pw, double minRadius, double maxRadius, double height, long row, long col)
           
 double random(double min, double max)
           
 void removeAll(java.util.HashSet cellIDHashSetToRemoveFrom, java.util.HashSet cellIDHashSetToRemove)
          Taken from HashSet.removeAll(Collection)
 void run()
           
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
_Output, _OutputESRIAsciiGrid, _OutputImage, _Rescale, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, aggregate, aggregate, angle, angle, angle, copyAndSetUpNewLog, distance, distance, distance, get_Directory, getGrid2DSquareCell, getGrid2DSquareCell, getRowProcessData, getRowProcessInitialData, getTime0, getTime0, log, log, log, mask, mask, mask, mask, set_Directory, set_Directory, set_Directory, setValueALittleBitLarger, setValueALittleBitSmaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerateTestData

public GenerateTestData()
                 throws java.io.IOException
Creates new GenerateTestData.

Throws:
java.io.IOException

GenerateTestData

public GenerateTestData(java.io.File workspace)
                 throws java.io.IOException
Creates new GenerateTestData.

Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable

generateCircularData

public Grid2DSquareCellDouble[] generateCircularData(boolean _HandleOutOfMemoryError)

printCircularFeatureInfo

public void printCircularFeatureInfo(java.io.PrintWriter pw,
                                     double minRadius,
                                     double maxRadius,
                                     double height,
                                     long row,
                                     long col)

getCellIDs

public java.util.HashSet getCellIDs(Grid2DSquareCellDouble grid,
                                    long row,
                                    long col,
                                    double minRadius,
                                    double maxRadius,
                                    boolean _HandleOutOfMemoryError)

removeAll

public void removeAll(java.util.HashSet cellIDHashSetToRemoveFrom,
                      java.util.HashSet cellIDHashSetToRemove)
Taken from HashSet.removeAll(Collection)


getCellIDsHashSet

public java.util.HashSet getCellIDsHashSet(Grid2DSquareCellDouble grid,
                                           long row,
                                           long col,
                                           double radius,
                                           boolean _HandleOutOfMemoryError)

getRandomRow

public long getRandomRow(long nrows,
                         double maxRadius)

getRandomCol

public long getRandomCol(long ncols,
                         double maxRadius)

random

public double random(double min,
                     double max)

generateSquareData

public Grid2DSquareCellDouble[] generateSquareData(boolean _HandleOutOfMemoryError)

generateCatchment

public Grid2DSquareCellDouble[] generateCatchment(boolean _HandleOutOfMemoryError)