CMakeLists.txt 13.3 KB
Newer Older
Thomas Feuvrier's avatar
Thomas Feuvrier committed
1
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
2
3
4
5
6

SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images)
SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
#Images de teledetection (grosses images )
7
8
9
IF(OTB_DATA_USE_LARGEINPUT)
  SET(IMAGEDATA ${OTB_DATA_LARGEINPUT_ROOT} )
ENDIF(OTB_DATA_USE_LARGEINPUT)
Thomas Feuvrier's avatar
Thomas Feuvrier committed
10
11
12
13
14
SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)


#Tolerance sur diff pixel image
SET(TOL 0.0)
15
SET(EPSILON 0.0001)
Thomas Feuvrier's avatar
Thomas Feuvrier committed
16

17
18
19
20
21
22
23
SET(PROJECTIONS_TESTS1 ${CXX_TEST_PATH}/otbProjectionsTests1)
SET(PROJECTIONS_TESTS2 ${CXX_TEST_PATH}/otbProjectionsTests2)
SET(PROJECTIONS_TESTS3 ${CXX_TEST_PATH}/otbProjectionsTests3)

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbPROJECTIONS_TESTS1 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thomas Feuvrier's avatar
Thomas Feuvrier committed
24

25
# TEST 1
26
ADD_TEST(prTuProjectionBaseNew ${PROJECTIONS_TESTS1}  otbProjectionBaseNew )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
27

28
# TEST 2
29
ADD_TEST(prTuMapProjectionsNew ${PROJECTIONS_TESTS1}  otbMapProjectionsNew )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
30

31
# TEST 3
32
ADD_TEST(prTuSensorModelsNew ${PROJECTIONS_TESTS1}  otbSensorModelsNew )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
33

34
# TEST 4
35
IF(OTB_DATA_USE_LARGEINPUT)
36
ADD_TEST(prTvTestCreateProjectionWithOSSIM_Toulouse ${PROJECTIONS_TESTS1}  
37
38
39
40
        otbCreateProjectionWithOSSIM
        ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
        )

41
# TEST 5
42
ADD_TEST(prTvTestCreateProjectionWithOSSIM_Cevennes ${PROJECTIONS_TESTS1}  
43
44
45
46
        otbCreateProjectionWithOSSIM
        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
        )

47
# TEST 6
48
ADD_TEST(prTvTestCreateProjectionWithOTB_Toulouse ${PROJECTIONS_TESTS1}  
49
50
51
52
        otbCreateProjectionWithOTB
        ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
        )

53
# TEST 7
54
ADD_TEST(prTvTestCreateProjectionWithOTB_Cevennes ${PROJECTIONS_TESTS1}  
55
56
57
58
        otbCreateProjectionWithOTB
        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
        )

59
# TEST 8
60
ADD_TEST(prTvTestCreateInverseForwardSensorModel_Toulouse ${PROJECTIONS_TESTS1}  
61
62
63
        otbCreateInverseForwardSensorModel
        ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
        )
64
65

# TEST 9
66
ADD_TEST(prTvTestCreateInverseForwardSensorModel_Cevennes ${PROJECTIONS_TESTS1}  
67
68
69
        otbCreateInverseForwardSensorModel
        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
        )
70
#=======================================================================================
71
# TEST 10
72
#   ADD_TEST(prTvRegionProjectionToulouse ${PROJECTIONS_TESTS1} 
73
74
75
76
77
78
79
80
81
82
83
84
#     --compare-image ${TOL}  ${BASELINE}/prTvRegionProjectionToulouse.tif
#                             ${TEMP}/prTvRegionProjectionToulouse.tif
#           otbRegionProjection
#           ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
#           ${TEMP}/prTvRegionProjectionToulouse.tif
#   				1.44 43.6050 # Long/Lat of Toulouse, Capitole
#           500
#           500
#           10
#   				0.00001
#   				-0.00001
#           )
85
# TEST 11
86
#   ADD_TEST(prTvRegionProjectionCevennes ${PROJECTIONS_TESTS1}  
87
88
89
90
91
92
93
94
95
96
97
98
#     --compare-image ${TOL}  ${BASELINE}/prTvRegionProjectionCevennes.tif
#                             ${TEMP}/prTvRegionProjectionCevennes.tif
#           otbRegionProjection
#           ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
#           ${TEMP}/prTvRegionProjectionCevennes.tif
#           3.7 44.08 
#           500
#   				500
#   				10
#   				0.00001
#   				-0.00001
#           )
99
100
#=======================================================================================
# TEST 12
101
ADD_TEST(prTvRegionProjectionResamplerToulouse ${PROJECTIONS_TESTS1}  
102
  --compare-image ${EPSILON}  ${BASELINE}/prTvRegionProjectionResamplerToulouse.tif
103
104
105
106
                          ${TEMP}/prTvRegionProjectionResamplerToulouse.tif
        otbRegionProjectionResampler
        ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
        ${TEMP}/prTvRegionProjectionResamplerToulouse.tif
107
				1.44 43.6050 # Long/Lat of Toulouse, Capitole
108
109
110
        500
        500
        100
111
112
				0.00001
				-0.00001
113
        )				
114
# TEST 13				
115
ADD_TEST(prTvRegionProjectionResamplerCevennes ${PROJECTIONS_TESTS1}  
116
  --compare-image ${EPSILON}  ${BASELINE}/prTvRegionProjectionResamplerCevennes.tif
117
118
                          ${TEMP}/prTvRegionProjectionResamplerCevennes.tif
				otbRegionProjectionResampler
119
        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
120
        ${TEMP}/prTvRegionProjectionResamplerCevennes.tif
121
        3.7 44.08
122
        500
123
124
125
126
				500
				10
				0.00001
				-0.00001
127
        )
128
129
130
131
132

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbPROJECTIONS_TESTS2 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

133
#=======================================================================================
134
# TEST 14
135
#ADD_TEST(prTvSensorImageToCartoToulouse ${PROJECTIONS_TESTS2}  
Julien Michel's avatar
Julien Michel committed
136
137
138
139
140
141
142
143
144
145
146
147
148
#  --compare-image ${TOL}  ${BASELINE}/prTvSensorImageToCartoToulouse_UTM.tif
#                          ${TEMP}/prTvSensorImageToCartoToulouse_UTM.tif
#				   otbSensorImageToCarto
#	   ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF		
#           ${TEMP}/prTvSensorImageToCartoToulouse_UTM.tif
#	   374100.8
#	   4829184.8 
#	   500
#	   500 
#	   220
#	   0.5
#	   -0.5
#           )
149
150

# TEST 15
151
#ADD_TEST(prTvSensorImageToCartoCevennes ${PROJECTIONS_TESTS2}  
Julien Michel's avatar
Julien Michel committed
152
153
154
155
156
157
158
159
160
161
162
163
164
#  --compare-image ${TOL}  ${BASELINE}/prTvSensorImageToCartoCevennes_UTM.tif
#                          ${TEMP}/prTvSensorImageToCartoCevennes_UTM.tif
#				   otbSensorImageToCarto
#           ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
#           ${TEMP}/prTvSensorImageToCartoCevennes_UTM.tif
#	   			 556046 
#           4.881e+06 
#           500 
#           500 
#           220
#	   			 0.5
#	   			 -0.5
#           )
165
#=======================================================================================
166

167
168
ENDIF(OTB_DATA_USE_LARGEINPUT)

169
# TU pour otb::OrthoRectificationFilterBase otb::OrthoRectificationFilter 
170
ADD_TEST(prTuOrthoRectificationFilterNew ${PROJECTIONS_TESTS2} 
171
172
173
174
        otbOrthoRectificationFilterNew )


# TEST 16.2
175
IF(OTB_DATA_USE_LARGEINPUT)
176
ADD_TEST(prTvOrthoRectificationToulouse ${PROJECTIONS_TESTS2} 
177
  --compare-image ${EPSILON}  ${BASELINE}/prTvOrthoRectificationToulouse_UTM.tif
178
179
180
181
182
183
184
                          ${TEMP}/prTvOrthoRectificationToulouse_UTM.tif
        otbOrthoRectificationFilter
        ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
        ${TEMP}/prTvOrthoRectificationToulouse_UTM.tif
        374100.8
        4829184.8 
        500
185
        500 
186
#         220
187
        0.5
188
        -0.5
189
190
        31
        N
191
192
        )

193
# TEST 17
194
ADD_TEST(prTvOrthoRectificationCevennes ${PROJECTIONS_TESTS2} 
195
  --compare-image ${EPSILON}  ${BASELINE}/prTvOrthoRectificationCevennes_UTM.tif
196
                          ${TEMP}/prTvOrthoRectificationCevennes_UTM.tif
197
198
        otbOrthoRectificationFilter
        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
199
200
201
        ${TEMP}/prTvOrthoRectificationCevennes_UTM.tif
        556046 
        4.881e+06 
202
        500
203
        500 
204
#         220
205
        0.5
206
        -0.5
207
208
        31
        N
209
        )
210
#=======================================================================================				
211
# TEST 18
212
#ADD_TEST(prTvSensorImageDEMToCartoToulouse ${PROJECTIONS_TESTS2}  
Julien Michel's avatar
Julien Michel committed
213
214
215
216
217
218
219
220
221
222
223
224
225
226
#  --compare-image ${TOL}  ${BASELINE}/prTvSensorImageDEMToCartoToulouse_UTM.tif
#                          ${TEMP}/prTvSensorImageDEMToCartoToulouse_UTM.tif
#        otbSensorImageDEMToCarto
#        ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
#        ${TEMP}/prTvSensorImageDEMToCartoToulouse_UTM.tif
#        374100.8
#        4829184.8 
#        500
#				500 
#				220
#        ${INPUTDATA}/DEM/srtm_directory/ 
#				0.5
#				-0.5
#        )
227
228
				
# TEST 19
229
#ADD_TEST(prTvSensorImageDEMToCartoCevennes ${PROJECTIONS_TESTS2}  
Julien Michel's avatar
Julien Michel committed
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#  --compare-image ${TOL}  ${BASELINE}/prTvSensorImageDEMToCartoCevennes_UTM.tif
#                          ${TEMP}/prTvSensorImageDEMToCartoCevennes_UTM.tif
#        otbSensorImageDEMToCarto
#        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
#        ${TEMP}/prTvSensorImageDEMToCartoCevennes_UTM.tif
#        556046 
#        4.881e+06 
#        500 
#        500 
#        200 
#        ${INPUTDATA}/DEM/srtm_directory/ 
#				0.5
#				-0.5
#        )
244
#=======================================================================================
245

246
# TEST 20.2
247
ADD_TEST(prTvOrthoRectificationToulouseWithDEM ${PROJECTIONS_TESTS2}  
248
  --compare-image ${EPSILON}  ${BASELINE}/prTvOrthoRectificationToulouseWithDEM_UTM.tif
249
250
251
252
253
254
255
                          ${TEMP}/prTvOrthoRectificationToulouseWithDEM_UTM.tif
        otbOrthoRectificationFilterWithDEM	
	${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
        ${TEMP}/prTvOrthoRectificationToulouseWithDEM_UTM.tif
        374100.8
        4829184.8 
        500
256
257
258
259
260
261
        500 
# 				220
        0.5
        -0.5
        31
        N
262
        ${INPUTDATA}/DEM/srtm_directory/ 
263
#         ${TEMP}/prTvOrthoRectificationToulouseWithDEM_UTM.tif
264
        )
265

266
# TEST 21
267
ADD_TEST(prTvOrthoRectificationCevennesWithDEM ${PROJECTIONS_TESTS2}  
268
  --compare-image ${EPSILON}  ${BASELINE}/prTvOrthoRectificationCevennesWithDEM_UTM.tif
269
270
271
272
273
274
275
276
                          ${TEMP}/prTvOrthoRectificationCevennesWithDEM_UTM.tif
        otbOrthoRectificationFilterWithDEM
        ${IMAGEDATA}/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF
        ${TEMP}/prTvOrthoRectificationCevennesWithDEM_UTM.tif
        556046 
        4.881e+06 
        500 
        500 
277
278
279
280
281
#         200 
        0.5
        -0.5
        31
        N
282
        ${INPUTDATA}/DEM/srtm_directory/ 
283
#         ${TEMP}/prTvOrthoRectificationCevennesWithDEM_UTM.tif
284
        )
285

286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
#========================= Ortho rectif SPOT5 ===============================        

ADD_TEST(prTvOrthoRectificationSPOT5 ${PROJECTIONS_TESTS2} 
  --compare-image ${EPSILON}  ${BASELINE}/prTvOrthoRectificationSPOT5_UTM.tif
                          ${TEMP}/prTvOrthoRectificationSPOT5_UTM.tif
        otbOrthoRectificationFilter
        ${IMAGEDATA}/SPOT5_SCENE01/IMAGERY.TIF
        ${TEMP}/prTvOrthoRectificationSPOT5_UTM.tif
        536187
        3950748
        500
        500 
        5
        -5
        39
        N
        )        
        
304
305
306
307
308
309
310
311
312
313
314
315
316
317
 ADD_TEST(prTvOrthoRectificationMonoThreadSPOT5 ${PROJECTIONS_TESTS2} 
  --compare-image ${EPSILON}  ${BASELINE}/prTvOrthoRectificationSPOT5_UTM.tif
                          ${TEMP}/prTvOrthoRectificationMonoThreadSPOT5_UTM.tif
        otbOrthoRectificationMonoThreadFilter
        ${IMAGEDATA}/SPOT5_SCENE01/IMAGERY.TIF
        ${TEMP}/prTvOrthoRectificationMonoThreadSPOT5_UTM.tif
        536187
        3950748
        500
        500 
        5
        -5
        39
        N
318
319
        )
ENDIF(OTB_DATA_USE_LARGEINPUT)
320
321
#========================= TESTS SINGAPOUR ===============================

322
#SET(EMMANUELDATA ${OTB_DATA_ROOT}/Emmanuel/Singapour/000000173549_01_P001_MUL)
323
324

# TEST 22
325
#ADD_TEST(prTvRegionProjectionResamplerSingapour ${PROJECTIONS_TESTS2}  
326
327
328
329
330
#				otbRegionProjectionResampler
#        ${EMMANUELDATA}/04MAR21031747-M1BS-000000173549_01_P001.TIF
#        ${TEMP}/prTvRegionProjectionResamplerSingapour.tif
#        103.8464 1.31
#        500
331
332
333
334
#				 500
#				 10
#				 0.00001
#				 -0.00001
335
#        )
336
337

# TEST 23
338
#ADD_TEST(prTvOrthoRectificationSingapour ${PROJECTIONS_TESTS2} 
339
340
341
342
343
#        otbOrthoRectificationFilter
#        ${EMMANUELDATA}/04MAR21031747-M1BS-000000173549_01_P001.TIF
#        ${TEMP}/prTvOrthoRectificationSingapour_UTM.tif
#        371997.12 144885.4
#        500
344
345
346
#				 500 
#				 220
#				 1
347
348
#        -1
#        )
349
350


351
352
353
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbPROJECTIONS_TESTS3 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
354

355
#=======================================================================================
356
SET(Projections_SRCS1
Thomas Feuvrier's avatar
Thomas Feuvrier committed
357
358
359
otbProjectionBaseNew.cxx
otbMapProjectionsNew.cxx
otbSensorModelsNew.cxx
360
361
otbCreateProjectionWithOSSIM.cxx
otbCreateProjectionWithOTB.cxx
362
otbCreateInverseForwardSensorModel.cxx
363
#otbRegionProjection.cxx
364
otbRegionProjectionResampler.cxx
365
366
)
SET(Projections_SRCS2
367
otbOrthoRectificationFilterNew.cxx
368
otbOrthoRectificationFilter.cxx
369
otbOrthoRectificationFilterWithDEM.cxx
370
otbOrthoRectificationMonoThreadFilter.cxx
Julien Michel's avatar
Julien Michel committed
371
372
#otbSensorImageToCarto.cxx
#otbSensorImageDEMToCarto.cxx
Thomas Feuvrier's avatar
Thomas Feuvrier committed
373
)
374
375
SET(Projections_SRCS3
)
Thomas Feuvrier's avatar
Thomas Feuvrier committed
376
377
378
379


INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")

380
ADD_EXECUTABLE(otbProjectionsTests1 otbProjectionsTests1.cxx ${Projections_SRCS1})
381
TARGET_LINK_LIBRARIES(otbProjectionsTests1  OTBProjections OTBIO)
382
ADD_EXECUTABLE(otbProjectionsTests2 otbProjectionsTests2.cxx ${Projections_SRCS2})
383
TARGET_LINK_LIBRARIES(otbProjectionsTests2  OTBProjections OTBIO)
384
ADD_EXECUTABLE(otbProjectionsTests3 otbProjectionsTests3.cxx ${Projections_SRCS3})
385
TARGET_LINK_LIBRARIES(otbProjectionsTests3  OTBProjections OTBIO)
Thomas Feuvrier's avatar
Thomas Feuvrier committed
386

Thomas Feuvrier's avatar
Thomas Feuvrier committed
387
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )