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

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
      extended by uk.ac.leeds.ccg.andyt.grids.examples.GenerateRoofData

public class GenerateRoofData
extends Grid2DSquareCellProcessor


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
GenerateRoofData()
          Creates a new GenerateRoofData
GenerateRoofData(java.io.File _Directory)
          Creates a new GenerateRoofData using specified _Directory.
 
Method Summary
 void _AddColRidge(Grid2DSquareCellDouble _Grid2DSquareCellDouble, double _ColRidgeHeight, long nrows, long ncols, long _ColWithRidge, double _LeftColRidgeTanAngle, double _RightColRidgeTanAngle, boolean _HandleOutOfMemoryError)
           http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_AddColRidge This method adds a ridge along a column for both hipped and gabled roofs.
 void _AddRowRidge(Grid2DSquareCellDouble _Grid2DSquareCellDouble, double _RowRidgeHeight, long ncols, long nrows, long _RowWithRidge, double _BottomRowRidgeTanAngle, double _TopRowRidgeTanAngle, boolean _HandleOutOfMemoryError)
          Add Row Ridge http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_AddRowRidge This method adds a ridge along a row for both hipped and gabled roofs
 void _CreateGableRoofs(Grid2DSquareCellDouble _ResizedGrid2DSquareCellDouble, long nrows, long ncols, double _CellsizeDivideTwo, long _RowWithRidge, long _ColWithRidge, double _RowRidgeHeight, double _ColRidgeHeight)
           http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateGableRoofs This method is like the other _CreateGableRoofs method except it does the conversion to a standard dimension and rescales values from 1 to 10.0d
 void _CreateGableRoofs(long nrows, long ncols, double _CellsizeDivideTwo, long _RowWithRidge, long _ColWithRidge, double _RowRidgeHeight, double _ColRidgeHeight)
           http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateGableRoofs This method is used to create gabled roof using the following parameters
 void _CreateHippedRoofs(Grid2DSquareCellDouble _ResizedGrid2DSquareCellDouble, long nrows, long ncols, double _CellsizeDivideTwo, long _RowWithRidge, double _RowRidgeHeight, long _ColStartRidge, long _ColEndRidge, long _ColWithRidge, double _ColRidgeHeight, long _RowStartRidge, long _RowEndRidge)
           http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs file:///C:/Work/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs As _CreateHippedRoofs(long,long,long,double,long,long,long,double,long,long) except with Resize and Rescale Output to fit _Dimensions
 void _CreateHippedRoofs(long nrows, long ncols, double _CellsizeDivideTwo, long _RowWithRidge, double _RowRidgeHeight, long _ColStartRidge, long _ColEndRidge, long _ColWithRidge, double _ColRidgeHeight, long _RowStartRidge, long _RowEndRidge)
           http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs file:///C:/Work/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs
 void _Resize(Grid2DSquareCellDouble _ResizeGrid2DSquareCell, Grid2DSquareCellDouble _Grid2DSquareCellDouble, boolean _HandleOutOfMemoryError)
           http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_Resize This method is to resize the grid _Grid2DSquareCellDouble
 void _ResizeRescaleOutput(Grid2DSquareCellDouble _ResizedGrid2DSquareCellDouble, Grid2DSquareCellDouble _Grid2DSquareCellDouble, java.io.File _Output_Directory, ImageExporter _ImageExporter, java.lang.String[] _ImageTypes, ESRIAsciiGridExporter _ESRIAsciiGridExporter, boolean _HandleOutOfMemoryError)
          This method resizes the grid and rescales the values to between 1 and 10.
 Grid2DSquareCellDouble disaggregate(java.math.BigDecimal[] _Dimensions, Grid2DSquareCellDouble _Grid2DSquareCellDouble, AbstractGrid2DSquareCellFactory _Grid2DSquareCellFactory, boolean _HandleOutOfMemoryError)
          This method disaggregates the cells if the size of _Grid2DSquareCellDouble is less than 32 x 64
 long get_Time()
           
static void main(java.lang.String[] args)
           
 void run_0()
           
 void run_1()
          Creates ouputs with varied ridge heights and varied dimensions (rows and columns)
 void run_2()
          Creates ouputs with ridge heights between 1 and 10 and all the same dimensions (rows and columns)
 
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

GenerateRoofData

public GenerateRoofData()
Creates a new GenerateRoofData


GenerateRoofData

public GenerateRoofData(java.io.File _Directory)
Creates a new GenerateRoofData using specified _Directory. WARNING: Files in the specified _Directory may get overwritten.

Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments

run_2

public void run_2()
           throws java.io.IOException
Creates ouputs with ridge heights between 1 and 10 and all the same dimensions (rows and columns)

Throws:
java.io.IOException

run_1

public void run_1()
           throws java.io.IOException
Creates ouputs with varied ridge heights and varied dimensions (rows and columns)

Throws:
java.io.IOException

run_0

public void run_0()
           throws java.io.IOException
Throws:
java.io.IOException

_AddRowRidge

public void _AddRowRidge(Grid2DSquareCellDouble _Grid2DSquareCellDouble,
                         double _RowRidgeHeight,
                         long ncols,
                         long nrows,
                         long _RowWithRidge,
                         double _BottomRowRidgeTanAngle,
                         double _TopRowRidgeTanAngle,
                         boolean _HandleOutOfMemoryError)
Add Row Ridge http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_AddRowRidge This method adds a ridge along a row for both hipped and gabled roofs

Parameters:
_Grid2DSquareCellDouble - .This is the grid that is to be created.
_RowRidgeHeight - .This is the height of the ridge along a row
ncols - .This is the number of rows in the grid
nrows - .This is the number of columns in the grid
_RowWithRidge - .This is the column that has the ridge
_BottomRowRidgeTanAngle - .This is the ridge height over the distance between the ridge and the left edge of the roof.
_TopRowRidgeTanAngle - .This is the ridge height over the distance between the ridge and the right edge of the roof.
_HandleOutOfMemoryError - .This is to handle the out of memory error.

_AddColRidge

public void _AddColRidge(Grid2DSquareCellDouble _Grid2DSquareCellDouble,
                         double _ColRidgeHeight,
                         long nrows,
                         long ncols,
                         long _ColWithRidge,
                         double _LeftColRidgeTanAngle,
                         double _RightColRidgeTanAngle,
                         boolean _HandleOutOfMemoryError)
http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_AddColRidge This method adds a ridge along a column for both hipped and gabled roofs. Add col ridge

Parameters:
_Grid2DSquareCellDouble - .This is the grid that is to be created.
_ColRidgeHeight - .This is the height of the ridge along a column
nrows - .This is the number of rows in the grid
ncols - .This is the number of columns in the grid
_ColWithRidge - .This is the column that has the ridge
_LeftColRidgeTanAngle - .This is the ridge height over the distance between the ridge and the left edge of the roof.
_RightColRidgeTanAngle - .This is the ridge height over the distance between the ridge and the right edge of the roof.
_HandleOutOfMemoryError - .This is to handle the out of memory error.

_CreateHippedRoofs

public void _CreateHippedRoofs(Grid2DSquareCellDouble _ResizedGrid2DSquareCellDouble,
                               long nrows,
                               long ncols,
                               double _CellsizeDivideTwo,
                               long _RowWithRidge,
                               double _RowRidgeHeight,
                               long _ColStartRidge,
                               long _ColEndRidge,
                               long _ColWithRidge,
                               double _ColRidgeHeight,
                               long _RowStartRidge,
                               long _RowEndRidge)
                        throws java.io.IOException
http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs file:///C:/Work/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs As _CreateHippedRoofs(long,long,long,double,long,long,long,double,long,long) except with Resize and Rescale Output to fit _Dimensions

Parameters:
_ResizedGrid2DSquareCellDouble - .This is to output the resized grid
nrows - .This is the number of rows in the grid
ncols - .This is the number of cols in the grid
_CellsizeDivideTwo - .
_RowWithRidge - .This is the row that has the ridge
_RowRidgeHeight - .The height of ridge along a row.
_ColStartRidge - .This is the column at which the ridge must start for the ridge along a row
_ColEndRidge - .This is the column at which the ridge must end for the ridge along a row
_ColWithRidge - .This is the column that has the ridge
_ColRidgeHeight - .The height of ridge along a column
_RowStartRidge - .This is the row at which the ridge must start for the ridge along a column
_RowEndRidge - .This is the row at which the ridge must end for the ridge along a column
Throws:
java.io.IOException

_CreateHippedRoofs

public void _CreateHippedRoofs(long nrows,
                               long ncols,
                               double _CellsizeDivideTwo,
                               long _RowWithRidge,
                               double _RowRidgeHeight,
                               long _ColStartRidge,
                               long _ColEndRidge,
                               long _ColWithRidge,
                               double _ColRidgeHeight,
                               long _RowStartRidge,
                               long _RowEndRidge)
                        throws java.io.IOException
http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs file:///C:/Work/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateHippedRoofs

Parameters:
nrows - .This is the number of rows in the grid
ncols - .This is the number of columns in the grid
_CellsizeDivideTwo - .This is to divide the size of the cell by 2
_RowWithRidge - .This is the row that has the ridge
_RowRidgeHeight - .This is the height of the ridge
_ColStartRidge - .This is the column at which the ridge must start for the ridge along a row
_ColEndRidge - .This is the column at which the ridge must end for the ridge along a row
_ColWithRidge - .This is the column that has the ridge
_ColRidgeHeight - .This is the height of the ridge
_RowStartRidge - .This is the row at which the ridge must start for the ridge along a column
_RowEndRidge - .This is the row at which the ridge must end for the ridge along a column
Throws:
java.io.IOException

_CreateGableRoofs

public void _CreateGableRoofs(Grid2DSquareCellDouble _ResizedGrid2DSquareCellDouble,
                              long nrows,
                              long ncols,
                              double _CellsizeDivideTwo,
                              long _RowWithRidge,
                              long _ColWithRidge,
                              double _RowRidgeHeight,
                              double _ColRidgeHeight)
                       throws java.io.IOException
http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateGableRoofs This method is like the other _CreateGableRoofs method except it does the conversion to a standard dimension and rescales values from 1 to 10.0d

Parameters:
_ResizedGrid2DSquareCellDouble. - This is to output the resized grid
nrows - .This is the number of rows in the grid
ncols - .This is the number of cols in the grid
_CellsizeDivideTwo - .This is to divide the size of the cell by 2
_RowWithRidge - .This is the row that contains the ridge
_ColWithRidge - .This is the column that contains the ridge
_RowRidgeHeight - .This is the height of the row ridge
_ColRidgeHeight - .This is the height of the column ridge
Throws:
java.io.IOException

_ResizeRescaleOutput

public void _ResizeRescaleOutput(Grid2DSquareCellDouble _ResizedGrid2DSquareCellDouble,
                                 Grid2DSquareCellDouble _Grid2DSquareCellDouble,
                                 java.io.File _Output_Directory,
                                 ImageExporter _ImageExporter,
                                 java.lang.String[] _ImageTypes,
                                 ESRIAsciiGridExporter _ESRIAsciiGridExporter,
                                 boolean _HandleOutOfMemoryError)
                          throws java.io.IOException
This method resizes the grid and rescales the values to between 1 and 10.

Parameters:
_ResizedGrid2DSquareCellDouble - This is the resized grid.
_Grid2DSquareCellDouble - This is the original grid.
_Output_Directory - This is the output directory of the resized and rescaled grid
_ImageExporter - .
_ImageTypes - This is the type of the output image.
_ESRIAsciiGridExporter - .
_HandleOutOfMemoryError - This is to handle out of memory error.
Throws:
java.io.IOException

_CreateGableRoofs

public void _CreateGableRoofs(long nrows,
                              long ncols,
                              double _CellsizeDivideTwo,
                              long _RowWithRidge,
                              long _ColWithRidge,
                              double _RowRidgeHeight,
                              double _ColRidgeHeight)
                       throws java.io.IOException
http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_CreateGableRoofs This method is used to create gabled roof using the following parameters

Parameters:
nrows - .This is the number of rows in the grid
ncols - .This is the number of cols in the grid
_CellsizeDivideTwo - .This is to divide the size of the cell by 2
_RowWithRidge - .This is the row that contains the ridge
_ColWithRidge - .This is the column that contains the ridge
_RowRidgeHeight - .This is the height of the row ridge
_ColRidgeHeight - .This is the height of the column ridge
Throws:
java.io.IOException

disaggregate

public Grid2DSquareCellDouble disaggregate(java.math.BigDecimal[] _Dimensions,
                                           Grid2DSquareCellDouble _Grid2DSquareCellDouble,
                                           AbstractGrid2DSquareCellFactory _Grid2DSquareCellFactory,
                                           boolean _HandleOutOfMemoryError)
This method disaggregates the cells if the size of _Grid2DSquareCellDouble is less than 32 x 64


_Resize

public void _Resize(Grid2DSquareCellDouble _ResizeGrid2DSquareCell,
                    Grid2DSquareCellDouble _Grid2DSquareCellDouble,
                    boolean _HandleOutOfMemoryError)
http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/dist/javadoc/uk/ac/leeds/ccg/andyt/grids/examples/GenerateRoofData.html#_Resize This method is to resize the grid _Grid2DSquareCellDouble

Parameters:
_ResizeGrid2DSquareCell - This is the grid that will be resized to.
_Grid2DSquareCellDouble - This is the original grid.
_HandleOutOfMemoryError - This is to handle the out of memory error

get_Time

public long get_Time()