Parameterising

These are the command line parameters for convenience and because some that would likely change most frequently.

These are the command line parameters - things that would likely change most frequently:
 
configFile configuration file - all the additional information required to locate the plugins for parsing, tree and tile generation,  gui, scene; source and destination directories and other information that a user may wish to change with moderate to low frequency.
firstTreeLevel starting tree level
finalTreeLevel final tree level
detailScale a scale factor applied to adjust detail (LOD range values)
gzipFlag to compress the output files
samplingFlag turns on sampling of tiles to reduce number of polygons in low level of detail levels. For performance improvement.
SamplingIncrement the number by which the sample size is increased
horizontalScale The number by which the terrain size (x and z dimension) is multiplied. Must
be 1 for round-world projections like GeoElevationGrid
heightScale The number height is multiplied by (reducing height tends to
 improve performance).
minOutputTiledimension,
maxOutputTileDimension
min and maximum output tile dimensions when sampling large input tiles
translation x,
translation z
It may in some cases be necessary to apply translations (scaling not always enough)
treeType Generate binary tree(y) or quadtreee (n)
operationType
1 = split each source file into a multirez tree,
2 = combine an array of source elevation files into one output elevation
3 = all source tiles are treated as one combined tile which is then split
4 = (not available yet) each tile is processed to produce one output item (not split up or subdivided into a mutirez tree)
Initial longitude divisions
The starting number of times to divide the output in the longitude direction
Initial latititude divisions
The starting number of times to divide the output in the latitude direction

    // overall operation types:
    private static final int SPLITTING   = 1;  // each tile is split
    private static final int COMBINING   = 2;  // the tiles are combined into one
    private static final int WHOLE_SPLIT = 3;  // all tiles are treated as one big tile which is then split
    private static final int INDIVIDUAL  = 4;  // each tile is processed to produce one output item (not split up)

The above are the parameters that would change most often when calling Rez.  Other more constant parameters are
given in the configuration file.  The parameters that need to be changed with every new data to be processed
are:
 translation x,translation z:  it may be necessary to apply translations.  This can help reduce large values to a range where there is no jitter.

These translations are only applicable for non spherical (world) projections.  They are calculated by converting the  top left corner coordinate values into meters and negating them.They are applied as an offset to the generated tiles in order to tranlate them closer to zero.  This can reduce precision problems (jitter) when displaying the 3D terrain in VRML.

 The rest of the parameters could be kept the same but allowing one to change the following would be a good idea:
 horizontalScale:    The number by which the terrain size (x and z dimension) is multiplied. Must be 1 for GeoElevationGrid output
 heightScale: The number height is multiplied by (reducing height tends to improve performance).
 minOutputTiledimension:  min and maximum output tile dimensions when sampling large input tiles maxOutputTileDimension

Within the config file the following may need altering depending on how the  input and output file/directories
are to be specified before Rez is run:

# Source directory where the grid data is (use "." for current or empty dir)
sourceDirectory ../vrml/data/av1/
#
# Destination directory to put the final tree
#
destinationDirectory ../tmp/AVATest/
#
# One row in a tile array
TileList nwgrd5/xport1.asc

Example for running Rez:
java  -Xmx80M -DdebugOn=false -classpath .;.\Rez.jar rez.Rez ExampleConfig.txt 0 4 1.3  n y 0 50 0.01 30 40 -6752027 -388321 n 1
 
 
 The configuration file contains other information about the tiles to be processed:

======================================
#
# Configuration file for Rez.  This file tells Rez which plugin classes to
# use for parsing input, generating tiles and generating trees, for the GUI
# and main scene creation.  It also specifies the directory for the text
# properties which can be used to alter the text-based
# tree and tile output without having to alter code.
#
# Source directory where the grid data is (use "." for current or empty dir)
sourceDirectory ../../data/av1/
#
# Destination directory to put the final tree
#
destinationDirectory ../../tmp/AVATest/
#
#The main scene creation plugin
Scene rez.plugins.scene.VRMLScene
#
#The GUI plugin
GUI rez.plugins.gui.SimpleGUI
#
# The number of separate but adjacent tile arrays which should join seemlessly
#
TileArrays 1
#
#The dimensions of the next tile array
TileXDim 1
TileYDim 1
#
#The max number of digits after decimal point for height values - for asci output tilers
MaxDecimalPrecision 4
#
#Does each successive row in the output tiles take one from North to South?
#- It does for for Standard ElevationGrids but GeoElevationGrids go from South to north
#Does each successive row in the output tiles take one from North to South?
NorthToSouthRows y
#Does each successive row in the input tiles take one from North to South?
sourceDataNorthToSouthRows n
#
# Additional Info on the data that may be needed by parser
#
Info ....
#
#The elevation parser class
Parser rez.plugins.ParseAVAscii
#
#The tile builder class
Tiler rez.plugins.standard.VRMLElevationGridTile
#
# One row in a tile array
TileList nwgrd5/xport1.asc
======================================