MetAvg - Command Line Syntax

The metavg.exe can run from the following command line.

metavg.exe -input:[input_filename][,weight]  OR  -input_list:[list_filename] -output:[output_filename]

Inputs will be averaged with the following formula:

Output Pixel = Constant + (Wt1 * Lyr1 Sample) + (Wt2 * Lry2 Sample) + ...

Command Line Options:

-input:[filename][,weight]      REQUIRED - Add another input file with an optional weight.
                                           Multiple inputs are allowed.
                                           Inputs must have a '.tif', '.tiff', or '.tif8' extention.

-input_list:[list_filename]     REQUIRED - List each input file on a new line with an optional weight.
                                           Example input line: '[filename][,weight]'.
                                           Lines starting with a '#' will be ignored.
                                           Empty lines will be ignored.

                                **NOTE** - If no weights are specified the default of (1 / N) will be used.

-output:[output_filename]       REQUIRED - Provide an filename for the TIFF output.

-sample_size:[integer]          OPTIONAL - The size of the pixel box to be summed and averaged.
                                           Default is 3

-constant:[double]              OPTIONAL - Add a constant value after summing the weighted averages.
                                           Default is 0.0

-max_value:[integer]            OPTIONAL - Sets the maximum value of the output pixels after averaging.
                                           Default is 255.0 (valid input: 0.0 - 255.0)

-log:[log_filename]             OPTIONAL - Provide a filename to save logging to.

-silent                         OPTIONAL - Turns off messaging to stdout

-thrnum:[integer]               OPTIONAL - Sets the maximum number of threads available
                                           Default is set based on system cores reported


Input List File

The input list file allows the user to define the TIFF files to merge along with the weight of each file. There is no limit on the number of TIFF files to be merged but one can expect a slow down when more files are merged. Here is the content of a sample list file.

# Lines starting with the '#' symbol will be treated as comments
# Weights will be ignored when using the list as input for 'metslice.exe'
# Missing weights will be entered as '0.0' for 'metavg.exe'
# If all inputs are missing weights then a default weight of '1/N' will be applied
# To add more files use the following template:
# "[Quoted File Path]",[Weight]
# Relative paths and absolute paths are valid


"bitmaps/bottom.tif",0.2
"bitmaps/drill.tif",0.2
"bitmaps/ground.tif",0.2
"bitmaps/power.tif",0.2
"bitmaps/top.tif",0.2