Tests the class clQuadratGLILight.
More...
#include <TestQuadratGLILight.h>
|
void | TestGridSetup (clSimManager *p_oSimManager) |
| Tests the setup for the "Quadrat GLI" grid.
|
|
void | TestParameterSetup (clSimManager *p_oSimManager) |
| Tests the setup for the parameters.
|
|
void | TestNormalProcessingRun1 (clSimManager *p_oSimManager) |
| Makes sure Quadrat GLI processing is performed correctly.
|
|
void | TestNormalProcessingRun2 (clSimManager *p_oSimManager) |
| Makes sure Quadrat GLI processing is performed correctly.
|
|
void | TestErrorProcessing (clSimManager *p_oSimManager) |
| Tests error processing.
|
|
const char * | WriteXMLFile1 () |
| Writes a parameter file to direct testing.
|
|
const char * | WriteXMLFile2 () |
| Writes a parameter file to direct testing.
|
|
const char * | WriteXMLFile3 () |
| Writes a parameter file to direct testing.
|
|
const char * | WriteXMLFile4 () |
| Writes a parameter file to direct testing.
|
|
const char * | WriteXMLFile5 () |
| Writes a parameter file to direct testing.
|
|
const char * | WriteXMLErrorFile1 () |
| Writes a parameter file to direct error testing.
|
|
const char * | WriteXMLErrorFile2 () |
| Writes a parameter file to direct error testing.
|
|
const char * | WriteXMLErrorFile3 () |
| Writes a parameter file to direct error testing.
|
|
void | WriteCommonStuff (std::fstream &oOut) |
| Writes common portions of the test parameter files (tree pop, plot, etc).
|
|
Tests the class clQuadratGLILight.
void clTestQuadratGLILight::TestErrorProcessing |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests error processing.
Each of the error files is fed in to make sure that clQuadratGLILight correctly throws an error.
void clTestQuadratGLILight::TestGridSetup |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests the setup for the "Quadrat GLI" grid.
Tests the following conditions:
-
The "Quadrat GLI" grid is correctly set up when there is no grid setup information in the parameter file. WriteXMLFile1() is used to create the parameter file in question. "Quadrat GLI" should have an 8m X 8m resolution.
-
The "Quadrat GLI" grid is correctly set up when there is grid setup information in the parameter file. WriteXMLFile2() is used to create the parameter file in question. "Quadrat GLI" should have a 10m X 10m resolution with no map values.
- Parameters
-
p_oSimManager | Sim manager for running tests. |
void clTestQuadratGLILight::TestNormalProcessingRun1 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Makes sure Quadrat GLI processing is performed correctly.
WriteXMLFile2() does setup. Two "Quadrat GLI" grid cells, (0, 0) and (5, 5), have their GLIs tested according to expected values from a spreadsheet. This verifies that GLI is being correctly calculated. All other cell values should be -1.
- Parameters
-
p_oSimManager | Sim manager for running tests. |
void clTestQuadratGLILight::TestNormalProcessingRun2 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Makes sure Quadrat GLI processing is performed correctly.
WriteXMLFile5() does setup. This makes sure that every cell gets a GLI value when that flag is set.
- Parameters
-
p_oSimManager | Sim manager for running tests. |
void clTestQuadratGLILight::TestParameterSetup |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests the setup for the parameters.
Tests the following conditions:
-
The Quadrat GLI behavior is the only light behavior in the list. WriteXMLFile1() creates the parameter file. The brightness array is checked to make sure it has non-zero values.
-
The Quadrat GLI behavior and the GLI Light behavior are both in the list, and the GLI Light behavior comes first (meaning the Quadrat GLI behavior can borrow brightness array information from it). WriteXMLFile2() creates the parameter file. The brightness array has non-zero values. The Quadrat GLI has its correct settings for sky grids.
-
The GLI light behavior and the Quadrat GLI Light behavior are both in the list, and the GLI Light behavior comes second (meaning the Quadrat GLI behavior cannot borrow brightness array information from it). WriteXMLFile3() creates the parameter file. The brightness array has non- zero values. The Quadrat GLI has its correct settings for sky grids.
-
The Quadrat GLI behavior and the GLI light behavior are both in the list, the Quadrat GLI behavior comes second, and the light settings are different. WriteXMLFile6() creates the parameter file. The Quadrat GLI grid is of the right size for its sky grids and contains non-zero values.
- Parameters
-
p_oSimManager | Sim manager for running tests. |
void clTestQuadratGLILight::TestQuadratGLILight |
( |
| ) |
|
Rolls all other tests into a single function to call.
void clTestQuadratGLILight::WriteCommonStuff |
( |
std::fstream & |
oOut | ) |
|
|
protected |
Writes common portions of the test parameter files (tree pop, plot, etc).
- Parameters
-
oOut | File stream to write to. |
const char* clTestQuadratGLILight::WriteXMLErrorFile1 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct error testing.
The number of azimuth grids for Quadrat GLI is less than or equal to 0.
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLErrorFile2 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct error testing.
The number of altitude grids for Quadrat GLI is less than or equal to 0.
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLErrorFile3 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct error testing.
The height of the GLI photo is less than 0.
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLFile1 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct testing.
-
Two tree species
-
One behavior - Quadrat GLI
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLFile2 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct testing.
-
Two tree species
-
Grid information for "Quadrat GLI" setting it to 10m by 10m with full map information
-
First behavior - GLI Light
-
Second behavior - Quadrat GLI
-
Same sky grid information for Quadrat GLI Light and GLI Light - 12 alt and 18 azi grids
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLFile3 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct testing.
-
Two tree species
-
Tree densities - to provide canopy cover to calculate GLI against
-
First behavior - Quadrat GLI
-
Second behavior - Quadrat GLI Light
-
Same sky grid information for Quadrat GLI Light and GLI Map - 12 alt and 18 azi grids
-
Both behaviors have their light heights set to 0 m
-
Quadrat GLI grid set to 8 X 8 cells so it will match GLI Map
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLFile4 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct testing.
-
Two tree species
-
First behavior - GLI Light
-
Second behavior - GLI Map
-
Different sky grid information for GLI Light and GLI Map
- Returns
- Filename written.
const char* clTestQuadratGLILight::WriteXMLFile5 |
( |
| ) |
|
|
protected |
Writes a parameter file to direct testing.
-
Two tree species
-
Tree densities - to provide canopy cover to calculate GLI against
-
Only behavior - Quadrat GLI
-
Quadrat GLI forced to calculate every cell
- Returns
- Filename written.
The documentation for this class was generated from the following file: