// ---
// File: orthoigen-test.kwl
// Generated by command: ossim-batch-test -w orthoigen-test.kwl
// Description: ossim-batch-test config file.
// ---

// ---
// 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:
// 1) Use forward slash, slash(c++ comment) at beginning of line for comments.
// 2) For environment variables use $(YOUR_VARIABLE).  They will be expanded at
//    run time if valid.
// 3) Clean, preprocess, run, and accept test sections can be switched on or off
//    at run time.  These override config file flags.  Optional arguments are:
//    --clean-test
//    --preprocess-test
//    --run-test
//    --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.
// ---

// Where you want the log files to go:
log_directory: $(OSSIM_TEST)/logs/osgeo

// ---
// Begin test1:
// ---
test1.name: test1
test1.description: Test height for the center of the image for test2 and test3.

// Controls/turns on/off whole test (all sections):
test1.enabled: 1

// Individual control flags:
test1.run_clean_commands: 0
test1.run_preprocessing_commands: 0
test1.run_expected_results_commands: 0
test1.run_test_commands: 1
test1.run_postprocessing_commands: 1

// Temp file to catch diff output.
test1.temp_file: /tmp/tmp.txt

// Clean up commands.
test1.clean_command0: rm -rf $(OSSIM_TEST)/exp/orthoigen-test/test1
test1.clean_command1: rm -rf $(OSSIM_TEST)/out/orthoigen-test/test1

// Pre-process commands:
test1.preprocess_command0: mkdir -p $(OSSIM_TEST)/exp/orthoigen-test/test1
test1.preprocess_command1: mkdir -p $(OSSIM_TEST)/out/orthoigen-test/test1
test1.preprocess_command1: mkdir -p $(OSSIM_TEST)/logs/osgeo

// Commands to generate expected results:

// Since test2 and test3 are dependent on elevation test the center of the image.
test1.expected_results_command0: ossim-info --height -42.8508 147.2537 > $(OSSIM_TEST)/exp/orthoigen-test/test1/height.txt

// The actual commands to test:

test1.test_command0: ossim-info --height -42.8508 147.2537 > $(OSSIM_TEST)/out/orthoigen-test/test1/height.txt

// Post process commands for diffs and stuff:

test1.postprocess_command0: diff -w $(OSSIM_TEST)/exp/orthoigen-test/test1/height.txt $(OSSIM_TEST)/out/orthoigen-test/test1/height.txt
 
// ---
// End test1:
// ---

// ---
// Begin test2:
// ---

test2.name: test2
test2.description: Test geometry for GeoEye NITF with RPC model.

// Controls/turns on/off whole test (all sections):
test2.enabled: 1

// Individual control flags:
test2.run_clean_commands: 0
test2.run_preprocessing_commands: 0
test2.run_expected_results_commands: 0
test2.run_test_commands: 1
test2.run_postprocessing_commands: 1

// Temp file to catch diff output.
test2.temp_file: /tmp/tmp.txt

// Clean up commands.
test2.clean_command0: rm -rf $(OSSIM_TEST)/exp/orthoigen-test/test2
test2.clean_command1: rm -rf $(OSSIM_TEST)/out/orthoigen-test/test2

// Pre-process commands:
test2.preprocess_command0: mkdir -p $(OSSIM_TEST)/exp/orthoigen-test/test2
test2.preprocess_command1: mkdir -p $(OSSIM_TEST)/out/orthoigen-test/test2
test2.preprocess_command1: mkdir -p $(OSSIM_TEST)/logs/osgeo

// Commands to generate expected results:
test2.expected_results_command0: ossim-info -d -i -p $(OSSIM_TEST)/source/GeoEye/GE1_Hobart_GeoStereo_NITF-NCD/5V090205M0001912264B220000100072M_001508507.ntf > $(OSSIM_TEST)/exp/orthoigen-test/test2/info.txt

// The actual commands to test:
test2.test_command0: ossim-info -d -i -p $(OSSIM_TEST)/source/GeoEye/GE1_Hobart_GeoStereo_NITF-NCD/5V090205M0001912264B220000100072M_001508507.ntf > $(OSSIM_TEST)/out/orthoigen-test/test2/info.txt

// Post process commands for diffs and stuff:
test2.postprocess_command0: diff -w $(OSSIM_TEST)/exp/orthoigen-test/test2/info.txt $(OSSIM_TEST)/out/orthoigen-test/test2/info.txt

// ---
// End test2:
// ---

// ---
// Begin test3:
// ---
test3.name: test3
test3.description: Test orthorectification of a GeoEye NITF with RPC model.

// Controls/turns on/off whole test (all sections):
test3.enabled: 1

// Individual control flags:
test3.run_clean_commands: 0
test3.run_preprocessing_commands: 0
test3.run_expected_results_commands: 0
test3.run_test_commands: 1
test3.run_postprocessing_commands: 1

// Temp file to catch diff output.
test3.temp_file: /tmp/tmp.txt

// Clean up commands.
test3.clean_command0: rm -rf $(OSSIM_TEST)/exp/orthoigen-test/test3
test3.clean_command1: rm -rf $(OSSIM_TEST)/out/orthoigen-test/test3

// Pre-process commands:
test3.preprocess_command0: mkdir -p $(OSSIM_TEST)/exp/orthoigen-test/test3
test3.preprocess_command1: mkdir -p $(OSSIM_TEST)/out/orthoigen-test/test3
test3.preprocess_command1: mkdir -p $(OSSIM_TEST)/logs/osgeo

// Commands to generate expected results:

// Put the output in the "out" directory as the "exp" may be under svn for small things:

// Ortho:
test3.expected_results_command0: ossim-orthoigen -t 1024 --geo-scaled -42.85 --resample-type bilinear $(OSSIM_TEST)/source/GeoEye/GE1_Hobart_GeoStereo_NITF-NCD/5V090205M0001912264B220000100072M_001508507.ntf $(OSSIM_TEST)/out/orthoigen-test/test3/t1.tif

// Histogram:
test3.expected_results_command1: ossim-img2rr -r --create-histogram $(OSSIM_TEST)/out/orthoigen-test/test3/t1.tif

// Geometry:
test3.expected_results_command2: ossim-info -d -i -p $(OSSIM_TEST)/out/orthoigen-test/test3/t1.tif > $(OSSIM_TEST)/out/orthoigen-test/test3/t1-info.txt

// Copy to exp directory which is under svn control:
test3.expected_results_command3: cp $(OSSIM_TEST)/out/orthoigen-test/test3/t1.his $(OSSIM_TEST)/exp/orthoigen-test/test3/t1.his

test3.expected_results_command4: cp $(OSSIM_TEST)/out/orthoigen-test/test3/t1-info.txt $(OSSIM_TEST)/exp/orthoigen-test/test3/t1-info.txt

// The actual commands to test:
// Ortho:
test3.test_command0: ossim-orthoigen -t 1024 --geo-scaled -42.85 --resample-type bilinear $(OSSIM_TEST)/source/GeoEye/GE1_Hobart_GeoStereo_NITF-NCD/5V090205M0001912264B220000100072M_001508507.ntf $(OSSIM_TEST)/out/orthoigen-test/test3/t2.tif

// Histogram:
test3.test_command1: ossim-img2rr -r --create-histogram $(OSSIM_TEST)/out/orthoigen-test/test3/t2.tif

// Geometry:
test3.test_command2: ossim-info -d -i -p $(OSSIM_TEST)/out/orthoigen-test/test3/t2.tif > $(OSSIM_TEST)/out/orthoigen-test/test3/t2-info.txt

// Post process commands for diffs and stuff:

// Histogram:
test3.postprocess_command0: diff -w $(OSSIM_TEST)/out/orthoigen-test/test3/t1.his $(OSSIM_TEST)/out/orthoigen-test/test3/t2.his

// Geometry:
test3.postprocess_command1: diff -w $(OSSIM_TEST)/out/orthoigen-test/test3/t1-info.txt $(OSSIM_TEST)/out/orthoigen-test/test3/t2-info.txt

// ---
// End test3:
// ---

