File: testlistgeo

package info (click to toggle)
libgeotiff 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,300 kB
  • sloc: ansic: 8,080; sh: 3,977; makefile: 166
file content (225 lines) | stat: -rwxr-xr-x 8,073 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
:
# Test listgeo

TEST_CLI_DIR=`dirname $0`
DATA_DIR=`dirname $0`/data

EXE=$1

usage()
{
    echo "Usage: ${0} <path to 'listgeo' program>" 
    echo
    exit 1
}

if test -z "${EXE}"; then
    EXE=../bin/listgeo
fi

if test ! -x ${EXE}; then
    echo "*** ERROR: Can not find '${EXE}' program!"
    exit 1
fi

echo "============================================"
echo "Running ${0} using ${EXE}:"
echo "============================================"

OUT=testlistgeo_out

rm -f ${OUT}

echo "Testing listgeo ${DATA_DIR}/byte.tif" >> ${OUT}
$EXE ${DATA_DIR}/byte.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/pcs_32064.tif" >> ${OUT}
$EXE ${DATA_DIR}/pcs_32064.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif" >> ${OUT}
$EXE ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif" >> ${OUT}
$EXE ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif" >> ${OUT}
$EXE ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/cassini_soldner.tif" >> ${OUT}
$EXE ${DATA_DIR}/cassini_soldner.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/new_zealand_mapping_grid.tif" >> ${OUT}
$EXE ${DATA_DIR}/new_zealand_mapping_grid.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/polyconic.tif" >> ${OUT}
$EXE ${DATA_DIR}/polyconic.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif" >> ${OUT}
$EXE ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif" >> ${OUT}
$EXE ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/oblique_mercator_laborde.tif" >> ${OUT}
$EXE ${DATA_DIR}/oblique_mercator_laborde.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/lcc1sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/lcc1sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/mercator1sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/mercator1sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/mercator2sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/mercator2sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/oblique_stereographic.tif" >> ${OUT}
$EXE ${DATA_DIR}/oblique_stereographic.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/polar_stereographic_variant_a.tif" >> ${OUT}
$EXE ${DATA_DIR}/polar_stereographic_variant_a.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/polar_stereographic_variant_b.tif" >> ${OUT}
$EXE ${DATA_DIR}/polar_stereographic_variant_b.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/transverse_mercator.tif" >> ${OUT}
$EXE ${DATA_DIR}/transverse_mercator.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/transverse_mercator_south_oriented.tif" >> ${OUT}
$EXE ${DATA_DIR}/transverse_mercator_south_oriented.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3812_lcc2sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3812_lcc2sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/lcc2sp.tif" >> ${OUT}
$EXE ${DATA_DIR}/lcc2sp.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/albers_equal_area.tif" >> ${OUT}
$EXE ${DATA_DIR}/albers_equal_area.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/lambert_azimuthal_equal_area.tif" >> ${OUT}
$EXE ${DATA_DIR}/lambert_azimuthal_equal_area.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/lambert_cylindrical_equal_area.tif" >> ${OUT}
$EXE ${DATA_DIR}/lambert_cylindrical_equal_area.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ${DATA_DIR}/equidistant_cylindrical.tif" >> ${OUT}
$EXE ${DATA_DIR}/equidistant_cylindrical.tif >>${OUT}
echo "" >>${OUT}


# do 'diff' with distribution results
echo "diff ${OUT} with testlistgeo_out.dist"
diff -u ${OUT} ${TEST_CLI_DIR}/testlistgeo_out.dist
if [ $? -ne 0 ] ; then
    echo  ""
    echo "PROBLEMS HAVE OCCURRED"
    echo "test file ${OUT} saved"
    echo
    exit 100
else
    echo "TEST OK"
    echo "test file ${OUT} removed"
    echo
    /bin/rm -f ${OUT}
    exit 0
fi