//=============================================================================
// File: applanix-test.kwl
// 
// Description: ossim-batch-test config file.  
// 
// Test applanix data with UTM and ECEF support data format.
// 
// Control flags:
// Use 1 or true, 0 or false to turn on and off sections.
// Typically preprocess and expected results only turned on for first run.
// Clean commands should erase anything created by this test.
// Command order if flag turned on:
// 1) clean, 2) pre-process, 3) expected, 4) test, 5) post-process
// 
// NOTES:
// * The following environment variables must be set before running batch test:
//     OSSIM_BATCH_TEST_DATA     Top-level dir containing all test source data
//     OSSIM_BATCH_TEST_RESULTS  Top-level dir containing all test results (exp, 
//                               out and log),
// 
// * The variables OBT_EXP_DIR and OBT_OUT_DIR are assigned during run-time to
//   the proper paths according to the config filename. It isn't required to replace
//   these nor predefine them in the environment. You can leave them as is or modify
//   the paths to your unconventional file paths.
// 
// * In order to preserve platform independence, please utilize the following 
//   variables for the common OS commands when adding new commands to the test
//   configuration KWL file. Examples are provided in this template
//       $(DIFF_CMD) Use this var for windows "fc" or linux "diff"
//       $(COPY_CMD) Use this var for windows "copy" or linux "cp"
//       $(MKDIR_CMD) Use this var for windows "mkdir" or linux "mkdir"
//       $(RM_CMD) Use this var for windows "del /Q" or linux "rm -f"
//       $(RMDIR_CMD) Use this var for windows "rmdir /S /Q" or linux "rm -rf"
//   This application will set the environment variables to the proper values at 
//   runtime, so no need to worry about defining these.
// 
// * Use forward slashes "//", at beginning of line for comments.
// 
// * You can use existing environment variables as $(YOUR_VARIABLE). They will be 
//   expanded at run time if valid.
// 
// * Clean, preprocess, run, and accept test sections can be switched on or off
//   at run time.  These override config file flags.  Optional arguments are:
//      -c or --clean-test
//      -p or --preprocess-test
//      -r or --run-test
//      -a or --accept-test
//   Multiple tests can be entered by quoting string of space separated
//   test, e.g. "test1 test2". To accept all tests use "all" for test.
// 
//===================================================================================

// ---
// Begin test1:
// ---
test1.name: test1
test1.description: Test height for center of image from test2 as it is affected by height.

// Clean up commands.
test1.clean_command0: $(RMDIR_CMD) $(OBT_OUT_DIR)/test1-info-height.txt

// Commands to generate expected results:

// Height center of image for test2
test1.expected_results_command0: ossim-info --height 46.5518724502617 -87.3832426544229 > $(OBT_EXP_DIR)/test1-info-height.txt

// The actual commands to test:

test1.test_command0: ossim-info --height 46.5518724502617 -87.3832426544229 > $(OBT_OUT_DIR)/test1-info-height.txt

// Post process commands for diffs and stuff:

test1.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test1-info-height.txt $(OBT_OUT_DIR)/test1-info-height.txt
 
// ---
// End test1:
// ---

// ---
// Begin test2:
// ---
test2.name: test2
test2.description: Test applanix data with UTM support data and a tiff with embedded thumbnail.

// Clean up commands.
test2.clean_command0: $(RM_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.geom
test2.clean_command1: $(RM_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.his
test2.clean_command2: $(RM_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.ovr
test2.clean_command3: $(RMDIR_CMD) $(OBT_OUT_DIR)/test2

// Pre-process commands:
test2.preprocess_command0: $(MKDIR_CMD) $(OBT_EXP_DIR)/test2
test2.preprocess_command1: $(MKDIR_CMD) $(OBT_OUT_DIR)/test2


// Commands to generate expected results:

// Reduced res sets with histogram.
test2.expected_results_command0: ossim-preproc -r --ch $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.tif

test2.expected_results_command1: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.his $(OBT_EXP_DIR)/test2/17657707.his

// Geometry file:
test2.expected_results_command2: ossim-applanix2ogeom  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/sn0085D_25Jan2011_camfile.txt  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/event1_eo_110625_1.txt  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.tif

test2.expected_results_command3: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.geom $(OBT_EXP_DIR)/test2/17657707.geom

// ossim-info:
test2.expected_results_command4: ossim-info -d -i -p  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.tif > $(OBT_EXP_DIR)/test2/17657707-info.txt

// The actual commands to test:
test2.test_command0: ossim-preproc -r --ch $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.tif

test2.test_command1: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.his $(OBT_OUT_DIR)/test2/17657707.his

// Geometry file:
test2.test_command2: ossim-applanix2ogeom  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/sn0085D_25Jan2011_camfile.txt  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/event1_eo_110625_1.txt  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.tif

test2.test_command3: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.geom $(OBT_OUT_DIR)/test2/17657707.geom

// ossim-info:
test2.test_command4: ossim-info -d -i -p  $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.tif > $(OBT_OUT_DIR)/test2/17657707-info.txt


// Post process commands for diffs and stuff:
test2.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test2/17657707.geom $(OBT_OUT_DIR)/test2/17657707.geom
test2.postprocess_command1: $(DIFF_CMD) $(OBT_EXP_DIR)/test2/17657707.his $(OBT_OUT_DIR)/test2/17657707.his
test2.postprocess_command2: $(DIFF_CMD) $(OBT_EXP_DIR)/test2/17657707-info.txt $(OBT_OUT_DIR)/test2/17657707-info.txt
 
// ---
// End test2:
// ---

// ---
// Begin test3:
// ---
test3.name: test3
test3.description: Test height for center of image from test 4 as it is affected by height.


// Clean up commands.
test3.clean_command0: $(RMDIR_CMD) $(OBT_OUT_DIR)/test3-info-height.txt

// Commands to generate expected results:

// Height center of image for test4.
test3.expected_results_command0: ossim-info --height 33.7519522209528 -117.013690129189 > $(OBT_EXP_DIR)/test3-info-height.txt

// The actual commands to test:

test3.test_command0: ossim-info --height 33.7519522209528 -117.013690129189 > $(OBT_OUT_DIR)/test3-info-height.txt

// Post process commands for diffs and stuff:

test3.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test3-info-height.txt $(OBT_OUT_DIR)/test3-info-height.txt
 
// ---
// End test3:
// ---

// ---
// Begin test4:
// ---
test4.name: test4
test4.description: Test applanix data with ECEF support data.

// Clean up commands.
test4.clean_command0: $(RM_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.geom
test4.clean_command1: $(RM_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.his
test4.clean_command2: $(RM_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/utm/17657707.ovr
test4.clean_command3: $(RMDIR_CMD) $(OBT_OUT_DIR)/test4

// Pre-process commands:
test4.preprocess_command0: $(MKDIR_CMD) $(OBT_EXP_DIR)/test4
test4.preprocess_command1: $(MKDIR_CMD) $(OBT_OUT_DIR)/test4


// Commands to generate expected results:

// Reduced res sets with histogram.
test4.expected_results_command0: ossim-preproc -r --ch --compute-min-max $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.tif

test4.expected_results_command1: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.his $(OBT_EXP_DIR)/test4/18056119.his

// Geometry file:
test4.expected_results_command2: ossim-applanix2ogeom  $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/sn0056.kwl  $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/eo_ECEF_050629.txt $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.tif

test4.expected_results_command3: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.geom $(OBT_EXP_DIR)/test4/18056119.geom

// ossim-info:
test4.expected_results_command4: ossim-info -d -i -p  $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.tif > $(OBT_EXP_DIR)/test4/18056119-info.txt

// The actual commands to test:
test4.test_command0: ossim-preproc -r --ch --compute-min-max $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.tif

test4.test_command1: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.his $(OBT_OUT_DIR)/test4/18056119.his

// Geometry file:
test4.test_command2: ossim-applanix2ogeom  $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/sn0056.kwl $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/eo_ECEF_050629.txt $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.tif

test4.test_command3: $(COPY_CMD) $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.geom $(OBT_OUT_DIR)/test4/18056119.geom

// ossim-info:
test4.test_command4: ossim-info -d -i -p  $(OSSIM_BATCH_TEST_DATA)/public/applanix/ecef/18056119.tif > $(OBT_OUT_DIR)/test4/18056119-info.txt


// Post process commands for diffs and stuff:
test4.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test4/18056119.geom $(OBT_OUT_DIR)/test4/18056119.geom
test4.postprocess_command1: $(DIFF_CMD) $(OBT_EXP_DIR)/test4/18056119.his $(OBT_OUT_DIR)/test4/18056119.his
test4.postprocess_command2: $(DIFF_CMD) $(OBT_EXP_DIR)/test4/18056119-info.txt $(OBT_OUT_DIR)/test4/18056119-info.txt
 
// ---
// End test4:
// ---
