| 1 |
Test GCTPC: |
| 2 |
|
| 3 |
The test directory structure and contents for GCTPC are as follows: |
| 4 |
|
| 5 |
gctpc/test/test_proj |
| 6 |
|
| 7 |
files included: |
| 8 |
testproj.c -- "C" code to make files of projected values |
| 9 |
Makefile -- file used to compile code |
| 10 |
|
| 11 |
gctpc/test/proj |
| 12 |
|
| 13 |
files include: |
| 14 |
Proj.name -- shell script to run a test on each projection |
| 15 |
<proj name> -- 30 directories, one for each projection |
| 16 |
|
| 17 |
gctpc/test/proj/<proj name> |
| 18 |
|
| 19 |
files include: |
| 20 |
data* -- files containing projection data |
| 21 |
parm* -- parameter files to be used with "testproj" |
| 22 |
<proj name>_test -- shell script to run tests on <proj name> |
| 23 |
README -- comments pertaining to testing--not included |
| 24 |
with all projections |
| 25 |
|
| 26 |
Throughout the test procedures, global variables are required. They are |
| 27 |
listed below along with their contents: |
| 28 |
|
| 29 |
LIBGCTP -- directory containing geolib.a |
| 30 |
SRCGCTP -- directory containing proj.h and cproj.h |
| 31 |
CMPGCTP -- directory containing the TESTPROJ executable |
| 32 |
|
| 33 |
The user has several options to test the projection values. They are |
| 34 |
listed below from most manual to most automated. The information provided |
| 35 |
in each option may apply to any option following it. |
| 36 |
|
| 37 |
Option 1--Use data file to compare individual points |
| 38 |
|
| 39 |
The data files (in the form--data<proj #><letter>) in the individual |
| 40 |
projection directories contain a table of projected values that may |
| 41 |
be used to compare individual points. The beginning of this file |
| 42 |
contains projection information. The first two columns of the table |
| 43 |
are the Longitude and Latitude entered as input. The third and |
| 44 |
fourth columns contain the x and y projected values using columns one |
| 45 |
and two as input. The fifth and sixth columns contain the Longitude |
| 46 |
and Latitude results using columns three and four as input. |
| 47 |
|
| 48 |
Option 2--Run "testproj" to make a grid for individual projections |
| 49 |
|
| 50 |
To compile testproj.c the global variable LIBGCTP must be set to the |
| 51 |
directory containing geolib.a and the global variable SRCGCTP must be |
| 52 |
set to the directory containing cproj.h and proj.h. Type "make" in |
| 53 |
the directory gctpc/test/test_proj. |
| 54 |
|
| 55 |
To run "testproj" without a parameter file. You will |
| 56 |
be prompted for the input. Input includes: |
| 57 |
|
| 58 |
- Projection number |
| 59 |
- Zone code (for UTM and State Plane only) |
| 60 |
- Projection parameters (See Appendix A) |
| 61 |
- Range of Longitude |
| 62 |
- Range of Latitude |
| 63 |
- Increment of Longitude |
| 64 |
- Increment of Latitude |
| 65 |
- Name of data file containing new projected points |
| 66 |
- 'Yes' or 'No' if values are to be compared |
| 67 |
- If 'Yes': |
| 68 |
* Name of existing data file for comparison |
| 69 |
* Tolerance value representing the exceptable difference |
| 70 |
between the new and existing data. |
| 71 |
* Name of comparison file which includes the long/lat |
| 72 |
of any points whose difference is more than the tolerance |
| 73 |
value and if an error occurs reading the input data. |
| 74 |
|
| 75 |
Option 3--Run "testproj" with a parameter file |
| 76 |
|
| 77 |
Parameter files are located in each separate projection directory |
| 78 |
(in the form--parm<proj #><letter>). These files may be |
| 79 |
redirected as input for "testproj". All projection files are |
| 80 |
set up to compare the results with a data file called |
| 81 |
data<proj #><letter>. The new data file will be called |
| 82 |
temp<proj #><letter> and the comparison file will be called |
| 83 |
cmp<proj #><letter>. |
| 84 |
|
| 85 |
Example: testproj < parm10a |
| 86 |
|
| 87 |
Option 4--Run all parameters for a projection |
| 88 |
|
| 89 |
Each separate projection directory has a file called <proj name>_test |
| 90 |
that is a UNIX shell script for running "testproj" with all parameter |
| 91 |
files in that directory. The global variable CMPGCTP must be set |
| 92 |
to the directory containing the executable "testproj". See option |
| 93 |
3 for results. |
| 94 |
|
| 95 |
Example: In directory gctpc/test/proj/stereo type |
| 96 |
|
| 97 |
"stereo_test" |
| 98 |
|
| 99 |
Option 5--Run all projection parameters at one time |
| 100 |
|
| 101 |
Proj.name located in gctpc/test/proj is a UNIX shell script that |
| 102 |
will run <proj name>_test in each projection directory. This script |
| 103 |
changes to each directory and runs <proj name>_test. The global |
| 104 |
variable CMPGCTP must be set as in Option 4 and the result will be |
| 105 |
the same as in Option 3. |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
******** Disclaimer ********* |
| 110 |
|
| 111 |
This test procedure was set up to handle testing of GCTPC at EDC. This |
| 112 |
was not intended to be used for production. Any part of this test procedure |
| 113 |
may or may not be used. This program has not been set up to handle errors |
| 114 |
with input. Therefore, unpredictable results may occur. The user may want |
| 115 |
to adapt testproj.c for their purposes. For example, error messages are |
| 116 |
currently sent to "error_file.txt". This may be changed to the output file |
| 117 |
so that the Lat/Long may be identified with the error. |
| 118 |
|
| 119 |
Due to precision errors of systems, forward conversions may not be accurate |
| 120 |
beyond the units digit for certain projections, however, most projections |
| 121 |
should have more accuracy. Be aware that sign differences may occur at |
| 122 |
longitude 180 (-180) degrees and differences may occur at latitude 90 (-90) |
| 123 |
degrees. Input longitude and latitude values that lie outside of the |
| 124 |
reasonable area of coverage for non-global projections will return |
| 125 |
unpredictable results, as will input easting and northing values that |
| 126 |
are outside of the data area. |