Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
e0e05761
Commit
e0e05761
authored
Mar 23, 2021
by
Julien Osman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: Set Terrasar-x IMI with new framwork
parent
47364163
Pipeline
#7238
passed with stages
in 91 minutes and 20 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4783 additions
and
22 deletions
+4783
-22
Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_TerraSar.txt
...ine/OTB/Files/ioTvImageMetadataInterfaceTest_TerraSar.txt
+2
-2
Data/Input/terrasar/TSX1_SAR__SSC______SM_S_SRA_20080310T133220_20080310T133228.xml
...AR__SSC______SM_S_SRA_20080310T133220_20080310T133228.xml
+4524
-0
Data/Input/terrasar/terrasar-1.geom
Data/Input/terrasar/terrasar-1.geom
+222
-0
Modules/Core/Metadata/src/otbRadarsat2ImageMetadataInterface.cxx
.../Core/Metadata/src/otbRadarsat2ImageMetadataInterface.cxx
+0
-2
Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx
...s/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx
+34
-18
Modules/Core/Metadata/test/CMakeLists.txt
Modules/Core/Metadata/test/CMakeLists.txt
+1
-0
No files found.
Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_TerraSar.txt
View file @
e0e05761
...
...
@@ -10,8 +10,8 @@ OrbitNumber 4091
PRF 3832.52
RSF 1.09886e+08
RadarFrequency 9.65e+09
LineSpacing
9.10033e-09
PixelSpacing
0.000260925
LineSpacing
1.84541
PixelSpacing
1.36411
AcquisitionStartTime 2008-03-10T13:32:20.083162Z
AcquisitionStopTime 2008-03-10T13:32:28.617747Z
GCP <GCPParam>
...
...
Data/Input/terrasar/TSX1_SAR__SSC______SM_S_SRA_20080310T133220_20080310T133228.xml
0 → 100644
View file @
e0e05761
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Data/Input/terrasar/terrasar-1.geom
0 → 100644
View file @
e0e05761
acquisitionInfo
.
imagingMode
:
SM
acquisitionInfo
.
lookDirection
:
RIGHT
acquisitionInfo
.
polarisationList
[
0
]
:
HH
acquisitionInfo
.
polarisationMode
:
SINGLE
acquisitionInfo
.
sensor
:
SAR
alt_sr_gr_coeff0
:
0
.
00436664673020163
alt_sr_gr_coeff1
:
-
9.48308944196046e-09
alt_sr_gr_coeff2
:
1.68786149377483e-14
azimuth_start_time
:
2008
-
03
-
10
T13
:
32
:
20
.
083162
Z
azimuth_stop_time
:
2008
-
03
-
10
T13
:
32
:
28
.
617747
Z
calibration
.
calibrationConstant
.
calFactor
:
1.04344690525453e-05
ce90_absolute
:
0
ce90_relative
:
0
generation_time
:
2008
-
05
-
20
T16
:
49
:
26
.
000000
image_id
:
C25_N83_D_SM_strip_011_R_2008
-
03
-
10
T13
:
32
:
20
.
083162
Z
ll_lat
:
36
.
025
9097020113
ll_lon
:
-
111
.
897141746895
lr_lat
:
36
.
025
9097020113
lr_lon
:
-
111
.
897141746895
meters_per_pixel_x
:
1
.
36410510540009
meters_per_pixel_y
:
1
.
84541487693787
noise
.
nameOfNoisePolarisation
:
HH
noise
.
numberOfNoiseRecords
:
6
noise
[
0
]
imageNoise
.
noiseEstimate
.
coefficient
[
0
]
:
296
.
78925336395
noise
[
0
]
imageNoise
.
noiseEstimate
.
coefficient
[
1
]
:
-
59920
.
5451205947
noise
[
0
]
imageNoise
.
noiseEstimate
.
coefficient
[
2
]
:
254942587316
.
833
noise
[
0
]
imageNoise
.
noiseEstimate
.
coefficient
[
3
]
:
319252320475987
noise
[
0
]
imageNoise
.
noiseEstimate
.
polynomialDegree
:
3
noise
[
0
]
imageNoise
.
noiseEstimate
.
referencePoint
:
0
.
0042
9691090331
noise
[
0
]
imageNoise
.
noiseEstimate
.
validityRangeMax
:
0
.
004366655
83053138
noise
[
0
]
imageNoise
.
noiseEstimate
.
validityRangeMin
:
0
.
004227165
97608861
noise
[
0
]
imageNoise
.
timeUTC
:
2008
-
03
-
10
T13
:
32
:
20
.
083162
Z
noise
[
1
]
imageNoise
.
noiseEstimate
.
coefficient
[
0
]
:
318
.
71771108117
noise
[
1
]
imageNoise
.
noiseEstimate
.
coefficient
[
1
]
:
564641
.
500313845
noise
[
1
]
imageNoise
.
noiseEstimate
.
coefficient
[
2
]
:
228206382868
.
274
noise
[
1
]
imageNoise
.
noiseEstimate
.
coefficient
[
3
]
:
-
434965976202233
noise
[
1
]
imageNoise
.
noiseEstimate
.
polynomialDegree
:
3
noise
[
1
]
imageNoise
.
noiseEstimate
.
referencePoint
:
0
.
0042
9691090331
noise
[
1
]
imageNoise
.
noiseEstimate
.
validityRangeMax
:
0
.
004366655
83053138
noise
[
1
]
imageNoise
.
noiseEstimate
.
validityRangeMin
:
0
.
004227165
97608861
noise
[
1
]
imageNoise
.
timeUTC
:
2008
-
03
-
10
T13
:
32
:
21
.
790079
Z
noise
[
2
]
imageNoise
.
noiseEstimate
.
coefficient
[
0
]
:
330
.
284311437822
noise
[
2
]
imageNoise
.
noiseEstimate
.
coefficient
[
1
]
:
827430
.
421561689
noise
[
2
]
imageNoise
.
noiseEstimate
.
coefficient
[
2
]
:
210273032869
.
559
noise
[
2
]
imageNoise
.
noiseEstimate
.
coefficient
[
3
]
:
-
580660257704235
noise
[
2
]
imageNoise
.
noiseEstimate
.
polynomialDegree
:
3
noise
[
2
]
imageNoise
.
noiseEstimate
.
referencePoint
:
0
.
0042
9691090331
noise
[
2
]
imageNoise
.
noiseEstimate
.
validityRangeMax
:
0
.
004366655
83053138
noise
[
2
]
imageNoise
.
noiseEstimate
.
validityRangeMin
:
0
.
004227165
97608861
noise
[
2
]
imageNoise
.
timeUTC
:
2008
-
03
-
10
T13
:
32
:
23
.
496996
Z
noise
[
3
]
imageNoise
.
noiseEstimate
.
coefficient
[
0
]
:
333
.
839497172387
noise
[
3
]
imageNoise
.
noiseEstimate
.
coefficient
[
1
]
:
814387
.
512436218
noise
[
3
]
imageNoise
.
noiseEstimate
.
coefficient
[
2
]
:
200818404079
.
316
noise
[
3
]
imageNoise
.
noiseEstimate
.
coefficient
[
3
]
:
-
304143013275228
noise
[
3
]
imageNoise
.
noiseEstimate
.
polynomialDegree
:
3
noise
[
3
]
imageNoise
.
noiseEstimate
.
referencePoint
:
0
.
0042
9691090331
noise
[
3
]
imageNoise
.
noiseEstimate
.
validityRangeMax
:
0
.
004366655
83053138
noise
[
3
]
imageNoise
.
noiseEstimate
.
validityRangeMin
:
0
.
004227165
97608861
noise
[
3
]
imageNoise
.
timeUTC
:
2008
-
03
-
10
T13
:
32
:
25
.
203913
Z
noise
[
4
]
imageNoise
.
noiseEstimate
.
coefficient
[
0
]
:
334
.
084136084824
noise
[
4
]
imageNoise
.
noiseEstimate
.
coefficient
[
1
]
:
699261
.
233993026
noise
[
4
]
imageNoise
.
noiseEstimate
.
coefficient
[
2
]
:
197990453826
.
895
noise
[
4
]
imageNoise
.
noiseEstimate
.
coefficient
[
3
]
:
43223850135721
.
8
noise
[
4
]
imageNoise
.
noiseEstimate
.
polynomialDegree
:
3
noise
[
4
]
imageNoise
.
noiseEstimate
.
referencePoint
:
0
.
0042
9691090331
noise
[
4
]
imageNoise
.
noiseEstimate
.
validityRangeMax
:
0
.
004366655
83053138
noise
[
4
]
imageNoise
.
noiseEstimate
.
validityRangeMin
:
0
.
004227165
97608861
noise
[
4
]
imageNoise
.
timeUTC
:
2008
-
03
-
10
T13
:
32
:
26
.
910830
Z
noise
[
5
]
imageNoise
.
noiseEstimate
.
coefficient
[
0
]
:
338
.
791170684597
noise
[
5
]
imageNoise
.
noiseEstimate
.
coefficient
[
1
]
:
770956
.
351279653
noise
[
5
]
imageNoise
.
noiseEstimate
.
coefficient
[
2
]
:
197865579201
.
632
noise
[
5
]
imageNoise
.
noiseEstimate
.
coefficient
[
3
]
:
-
105106964332480
noise
[
5
]
imageNoise
.
noiseEstimate
.
polynomialDegree
:
3
noise
[
5
]
imageNoise
.
noiseEstimate
.
referencePoint
:
0
.
0042
9691090331
noise
[
5
]
imageNoise
.
noiseEstimate
.
validityRangeMax
:
0
.
004366655
83053138
noise
[
5
]
imageNoise
.
noiseEstimate
.
validityRangeMin
:
0
.
004227165
97608861
noise
[
5
]
imageNoise
.
timeUTC
:
2008
-
03
-
10
T13
:
32
:
28
.
617747
Z
number_lines
:
32710
number_samples
:
15328
optimization_bias_x
:
-
7557
optimization_bias_y
:
-
16353
optimization_factor_x
:
1
optimization_factor_y
:
1
platform_position
[
0
]
ephemeris
.
date
.
decimal
:
2.32458114624023e-06
platform_position
[
0
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
0
]
ephemeris
.
date
.
second
:
48696
platform_position
[
0
]
ephemeris
.
position
:
(
-
1580218
.
09609726
,
-
5170882
.
66054939
,
4259312
.
5221175
)
platform_position
[
0
]
ephemeris
.
velocity
:
(
-
2937
.
657
,
-
3968
.
613
,
-
5890
.
379
)
platform_position
[
10
]
ephemeris
.
date
.
decimal
:
0
.
999982953071594
platform_position
[
10
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
10
]
ephemeris
.
date
.
second
:
48795
platform_position
[
10
]
ephemeris
.
position
:
(
-
1866519
.
6615485
,
-
5533440
.
1205022
,
3645429
.
82137789
)
platform_position
[
10
]
ephemeris
.
velocity
:
(
-
2780
.
879
,
-
3275
.
547
,
-
6374
.
766
)
platform_position
[
11
]
ephemeris
.
date
.
decimal
:
9.17911529541016e-06
platform_position
[
11
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
11
]
ephemeris
.
date
.
second
:
48806
platform_position
[
11
]
ephemeris
.
position
:
(
-
1894238
.
13917809
,
-
5565838
.
33550964
,
3581460
.
28892684
)
platform_position
[
11
]
ephemeris
.
velocity
:
(
-
2762
.
743
,
-
3204
.
035
,
-
6419
.
011
)
platform_position
[
1
]
ephemeris
.
date
.
decimal
:
0
.
999988317489624
platform_position
[
1
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
1
]
ephemeris
.
date
.
second
:
48705
platform_position
[
1
]
ephemeris
.
position
:
(
-
1609526
.
8077097
,
-
5210232
.
3408218
,
4200149
.
23619295
)
platform_position
[
1
]
ephemeris
.
velocity
:
(
-
2924
.
01
,
-
3901
.
248
,
-
5942
.
159
)
platform_position
[
2
]
ephemeris
.
date
.
decimal
:
1.45435333251953e-05
platform_position
[
2
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
2
]
ephemeris
.
date
.
second
:
48716
platform_position
[
2
]
ephemeris
.
position
:
(
-
1638696
.
78134081
,
-
5248906
.
08918951
,
4140471
.
77330503
)
platform_position
[
2
]
ephemeris
.
velocity
:
(
-
2909
.
909
,
-
3833
.
428
,
-
5993
.
213
)
platform_position
[
3
]
ephemeris
.
date
.
decimal
:
5.36441802978516e-07
platform_position
[
3
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
3
]
ephemeris
.
date
.
second
:
48726
platform_position
[
3
]
ephemeris
.
position
:
(
-
1667723
.
47798298
,
-
5286899
.
3945862
,
4080287
.
42753126
)
platform_position
[
3
]
ephemeris
.
velocity
:
(
-
2895
.
355
,
-
3765
.
161
,
-
6043
.
535
)
platform_position
[
4
]
ephemeris
.
date
.
decimal
:
0
.
999986529350281
platform_position
[
4
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
4
]
ephemeris
.
date
.
second
:
48735
platform_position
[
4
]
ephemeris
.
position
:
(
-
1696602
.
36661488
,
-
5324207
.
83411204
,
4019603
.
55372346
)
platform_position
[
4
]
ephemeris
.
velocity
:
(
-
2880
.
348
,
-
3696
.
456
,
-
6093
.
118
)
platform_position
[
5
]
ephemeris
.
date
.
decimal
:
1.27553939819336e-05
platform_position
[
5
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
5
]
ephemeris
.
date
.
second
:
48746
platform_position
[
5
]
ephemeris
.
position
:
(
-
1725328
.
93225525
,
-
5360827
.
07
864187
,
3958427
.
57106599
)
platform_position
[
5
]
ephemeris
.
velocity
:
(
-
2864
.
89
,
-
3627
.
323
,
-
6141
.
956
)
platform_position
[
6
]
ephemeris
.
date
.
decimal
:
0
.
99999874830246
platform_position
[
6
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
6
]
ephemeris
.
date
.
second
:
48755
platform_position
[
6
]
ephemeris
.
position
:
(
-
1753898
.
66689525
,
-
5396752
.
88428615
,
3896766
.
95539604
)
platform_position
[
6
]
ephemeris
.
velocity
:
(
-
2848
.
982
,
-
3557
.
77
,
-
6190
.
043
)
platform_position
[
7
]
ephemeris
.
date
.
decimal
:
0
.
999984741210938
platform_position
[
7
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
7
]
ephemeris
.
date
.
second
:
48765
platform_position
[
7
]
ephemeris
.
position
:
(
-
1782307
.
07
85184
,
-
5431981
.
10400949
,
3834629
.
24575286
)
platform_position
[
7
]
ephemeris
.
velocity
:
(
-
2832
.
626
,
-
3487
.
807
,
-
6237
.
373
)
platform_position
[
8
]
ephemeris
.
date
.
decimal
:
1.09672546386719e-05
platform_position
[
8
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
8
]
ephemeris
.
date
.
second
:
48776
platform_position
[
8
]
ephemeris
.
position
:
(
-
1810549
.
68925413
,
-
5466507
.
67872351
,
3772022
.
041356
93
)
platform_position
[
8
]
ephemeris
.
velocity
:
(
-
2815
.
822
,
-
3417
.
443
,
-
6283
.
941
)
platform_position
[
9
]
ephemeris
.
date
.
decimal
:
0
.
999996960163116
platform_position
[
9
]
ephemeris
.
date
.
julian
:
2454535
.
5
platform_position
[
9
]
ephemeris
.
date
.
second
:
48785
platform_position
[
9
]
ephemeris
.
position
:
(
-
1838622
.
032
89163
,
-
5500328
.
6415771
,
3708952
.
99483651
)
platform_position
[
9
]
ephemeris
.
velocity
:
(
-
2798
.
573
,
-
3346
.
686
,
-
6329
.
741
)
platform_positions_count
:
12
product_georeferenced_flag
:
false
product_type
:
SSC____SM_S
radarFrequency
:
9650000000
radiometricCorrection
:
CALIBRATED
range_first_time
:
4.22716597608860812E-03
range_last_time
:
4.36664673020162927E-03
rect
:
0
0
15327
32709
ref_point
.
col
:
7557
ref_point
.
distance
:
643946
.
245005984
ref_point
.
ephemeris
.
date
.
decimal
:
0
.
350440800189972
ref_point
.
ephemeris
.
date
.
julian
:
2454535
.
5
ref_point
.
ephemeris
.
date
.
second
:
52344
ref_point
.
ephemeris
.
position
:
(
7.37049825842776e+46
,
-
1.38489850399653e+46
,
1.10528662103194e+46
)
ref_point
.
ephemeris
.
velocity
:
(
4.71616839044535e+44
,
-
8.89129326310894e+43
,
7.02715844107766e+43
)
ref_point
.
line
:
16353
ref_point_hgt
:
0
ref_point_lat
:
36
.
025
9097020113
ref_point_line
:
16353
ref_point_lon
:
-
111
.
897141746895
ref_point_samp
:
7557
sc_gr_sf
:
0
sc_rt
:
0
.
0042
9594693143337
sceneCoord
.
numberOfSceneCornerCoord
:
4
sceneCoord
.
sceneCenterCoord
.
azimuthTimeUTC
:
2008
-
03
-
10
T13
:
32
:
24
.
350454
Z
sceneCoord
.
sceneCenterCoord
.
incidenceAngle
:
39
.
1546891079297
sceneCoord
.
sceneCenterCoord
.
lat
:
36
.
025
9097020113
sceneCoord
.
sceneCenterCoord
.
lon
:
-
111
.
897141746895
sceneCoord
.
sceneCenterCoord
.
rangeTime
:
0
.
0042
9594693143337
sceneCoord
.
sceneCenterCoord
.
refColumn
:
7558
sceneCoord
.
sceneCenterCoord
.
refRow
:
16354
sceneCoord
.
sceneCornerCoord
[
0
].
azimuthTimeUTC
:
2008
-
03
-
10
T13
:
32
:
24
.
350454
Z
sceneCoord
.
sceneCornerCoord
[
0
].
incidenceAngle
:
37
.
9118762632605
sceneCoord
.
sceneCornerCoord
[
0
].
lat
:
36
.
025
9097020113
sceneCoord
.
sceneCornerCoord
[
0
].
lon
:
-
111
.
897141746895
sceneCoord
.
sceneCornerCoord
[
0
].
rangeTime
:
0
.
0042
9594693143337
sceneCoord
.
sceneCornerCoord
[
0
].
refColumn
:
1
sceneCoord
.
sceneCornerCoord
[
0
].
refRow
:
1
sceneCoord
.
sceneCornerCoord
[
1
].
azimuthTimeUTC
:
2008
-
03
-
10
T13
:
32
:
24
.
350454
Z
sceneCoord
.
sceneCornerCoord
[
1
].
incidenceAngle
:
40
.
6349384516261
sceneCoord
.
sceneCornerCoord
[
1
].
lat
:
36
.
025
9097020113
sceneCoord
.
sceneCornerCoord
[
1
].
lon
:
-
111
.
897141746895
sceneCoord
.
sceneCornerCoord
[
1
].
rangeTime
:
0
.
0042
9594693143337
sceneCoord
.
sceneCornerCoord
[
1
].
refColumn
:
15325
sceneCoord
.
sceneCornerCoord
[
1
].
refRow
:
1
sceneCoord
.
sceneCornerCoord
[
2
].
azimuthTimeUTC
:
2008
-
03
-
10
T13
:
32
:
24
.
350454
Z
sceneCoord
.
sceneCornerCoord
[
2
].
incidenceAngle
:
37
.
9607011512505
sceneCoord
.
sceneCornerCoord
[
2
].
lat
:
36
.
025
9097020113
sceneCoord
.
sceneCornerCoord
[
2
].
lon
:
-
111
.
897141746895
sceneCoord
.
sceneCornerCoord
[
2
].
rangeTime
:
0
.
0042
9594693143337
sceneCoord
.
sceneCornerCoord
[
2
].
refColumn
:
1
sceneCoord
.
sceneCornerCoord
[
2
].
refRow
:
32710
sceneCoord
.
sceneCornerCoord
[
3
].
azimuthTimeUTC
:
2008
-
03
-
10
T13
:
32
:
24
.
350454
Z
sceneCoord
.
sceneCornerCoord
[
3
].
incidenceAngle
:
40
.
5154335726891
sceneCoord
.
sceneCornerCoord
[
3
].
lat
:
36
.
025
9097020113
sceneCoord
.
sceneCornerCoord
[
3
].
lon
:
-
111
.
897141746895
sceneCoord
.
sceneCornerCoord
[
3
].
rangeTime
:
0
.
0042
9594693143337
sceneCoord
.
sceneCornerCoord
[
3
].
refColumn
:
15325
sceneCoord
.
sceneCornerCoord
[
3
].
refRow
:
32710
sensor
:
TSX
-
1
sensor_params
.
column_direction
:
1
sensor_params
.
doppler_centroid
:
0
sensor_params
.
doppler_centroid_linear_term
:
0
sensor_params
.
line_direction
:
1
sensor_params
.
number_azimuth_looks
:
1
sensor_params
.
number_range_looks
:
1
sensor_params
.
prf
:
3832
.
52399553571
sensor_params
.
radar_wave_length
:
0
.
031066575
9585492
sensor_params
.
sampling_frequency
:
109886128
sensor_params
.
semi_major_axis
:
6378137
sensor_params
.
semi_minor_axis
:
6356752
.
3142
sensor_params
.
sight_direction
:
1
sr_gr_coeffs_count
:
0
sr_gr_r0
:
0
type
:
ossimTerraSarModel
ul_lat
:
36
.
025
9097020113
ul_lon
:
-
111
.
897141746895
ur_lat
:
36
.
025
9097020113
ur_lon
:
-
111
.
897141746895
Modules/Core/Metadata/src/otbRadarsat2ImageMetadataInterface.cxx
View file @
e0e05761
...
...
@@ -257,7 +257,6 @@ void Radarsat2ImageMetadataInterface::ParseGdal(const MetadataSupplierInterface
// Fetch(MDStr::Mode, mds, "MODE");
Fetch
(
MDStr
::
OrbitDirection
,
mds
,
"ORBIT_DIRECTION"
);
// Fetch(MDNum::OrbitNumber, mds, "ORBIT_NUMBER");
Fetch
(
MDNum
::
PixelSpacing
,
mds
,
"PIXEL_SPACING"
);
Fetch
(
MDStr
::
ProductType
,
mds
,
"PRODUCT_TYPE"
);
Fetch
(
MDStr
::
Instrument
,
mds
,
"SATELLITE_IDENTIFIER"
);
Fetch
(
MDStr
::
SensorID
,
mds
,
"SENSOR_IDENTIFIER"
);
...
...
@@ -301,7 +300,6 @@ void Radarsat2ImageMetadataInterface::ParseGeom(const MetadataSupplierInterface
Fetch
(
MDTime
::
AcquisitionStartTime
,
mds
,
"support_data.image_date"
);
Fetch
(
MDNum
::
LineSpacing
,
mds
,
"meters_per_pixel_y"
);
Fetch
(
MDNum
::
PixelSpacing
,
mds
,
"meters_per_pixel_x"
);
Fetch
(
MDNum
::
PixelSpacing
,
mds
,
"meters_per_pixel_x"
);
Fetch
(
MDStr
::
Instrument
,
mds
,
"sensor"
);
m_Imd
.
Add
(
MDStr
::
SensorID
,
"SAR"
);
...
...
Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx
View file @
e0e05761
...
...
@@ -1245,36 +1245,24 @@ void TerraSarImageMetadataInterface::PrintSelf(std::ostream& os, itk::Indent ind
void
TerraSarImageMetadataInterface
::
ParseGdal
(
const
MetadataSupplierInterface
&
mds
)
{
// Metadata read by GDAL
Fetch
(
MDNum
::
LineSpacing
,
mds
,
"ROW_SPACING"
);
Fetch
(
MDStr
::
Mode
,
mds
,
"IMAGING_MODE"
);
Fetch
(
MDStr
::
OrbitDirection
,
mds
,
"ORBIT_DIRECTION"
);
Fetch
(
MDNum
::
OrbitNumber
,
mds
,
"ABSOLUTE_ORBIT"
);
Fetch
(
MDNum
::
PixelSpacing
,
mds
,
"COL_SPACING"
);
// Main XML file
std
::
string
MainFilePath
=
ExtractXMLFiles
::
GetResourceFile
(
itksys
::
SystemTools
::
GetFilenamePath
(
mds
.
GetResourceFile
(
""
)),
"T[S|D]X1_SAR__.*.xml"
)
;
if
(
!
MainFilePath
.
empty
())
{
XMLMetadataSupplier
MainXMLFileMS
(
MainFilePath
);
m_Imd
.
Add
(
MDNum
::
LineSpacing
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.productSpecific.complexImageInfo.projectedSpacingAzimuth"
));
m_Imd
.
Add
(
MDNum
::
PixelSpacing
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.productSpecific.complexImageInfo.projectedSpacingRange.slantRange"
));
m_Imd
.
Add
(
MDStr
::
Mission
,
MainXMLFileMS
.
GetAs
<
std
::
string
>
(
"level1Product.generalHeader.mission"
));
m_Imd
.
Add
(
MDStr
::
ProductType
,
MainXMLFileMS
.
GetAs
<
std
::
string
>
(
"level1Product.productInfo.productVariantInfo.productType"
));
// m_Imd.Add(MDStr::Mode, MainXMLFileMS.GetAs<std::string>("level1Product.productInfo.acquisitionInfo.imagingMode"));
m_Imd
.
Add
(
MDStr
::
SensorID
,
MainXMLFileMS
.
GetAs
<
std
::
string
>
(
"level1Product.productInfo.acquisitionInfo.sensor"
));
m_Imd
.
Add
(
MDNum
::
RadarFrequency
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.instrument.radarParameters.centerFrequency"
));
bool
hasValueStarttimeUTC
;
MainXMLFileMS
.
GetFirstMetadataValue
(
"level1Product.productInfo.sceneInfo.start.timeUTC"
,
hasValueStarttimeUTC
);
if
(
!
hasValueStarttimeUTC
)
m_Imd
.
Add
(
MDTime
::
AcquisitionStartTime
,
MainXMLFileMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"level1Product.instrument.settings.rxGainSetting.startTimeUTC"
));
else
m_Imd
.
Add
(
MDTime
::
AcquisitionStartTime
,
MainXMLFileMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"level1Product.productInfo.sceneInfo.start.timeUTC"
));
bool
hasValueStoptimeUTC
;
MainXMLFileMS
.
GetFirstMetadataValue
(
"level1Product.productInfo.sceneInfo.stop.timeUTC"
,
hasValueStoptimeUTC
);
if
(
!
hasValueStoptimeUTC
)
m_Imd
.
Add
(
MDTime
::
AcquisitionStopTime
,
MainXMLFileMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"level1Product.instrument.settings.settingRecord.dataSegment segmentID.stopTimeUTC"
));
else
m_Imd
.
Add
(
MDTime
::
AcquisitionStopTime
,
MainXMLFileMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"level1Product.productInfo.sceneInfo.stop.timeUTC"
));
m_Imd
.
Add
(
MDTime
::
AcquisitionStartTime
,
MainXMLFileMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"level1Product.productInfo.sceneInfo.start.timeUTC"
));
m_Imd
.
Add
(
MDTime
::
AcquisitionStopTime
,
MainXMLFileMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"level1Product.productInfo.sceneInfo.stop.timeUTC"
));
m_Imd
.
Add
(
MDNum
::
PRF
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.productSpecific.complexImageInfo.commonPRF"
));
m_Imd
.
Add
(
MDNum
::
RSF
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.productSpecific.complexImageInfo.commonRSF"
));
...
...
@@ -1292,13 +1280,41 @@ void TerraSarImageMetadataInterface::ParseGdal(const MetadataSupplierInterface &
void
TerraSarImageMetadataInterface
::
ParseGeom
(
const
MetadataSupplierInterface
&
mds
)
{
throw
"Not implemented"
;
Fetch
(
MDNum
::
LineSpacing
,
mds
,
"meters_per_pixel_y"
);
Fetch
(
MDNum
::
PixelSpacing
,
mds
,
"meters_per_pixel_x"
);
Fetch
(
MDStr
::
Mode
,
mds
,
"acquisitionInfo.imagingMode"
);
Fetch
(
MDStr
::
Mission
,
mds
,
"sensor"
);
Fetch
(
MDStr
::
ProductType
,
mds
,
"product_type"
);
Fetch
(
MDStr
::
SensorID
,
mds
,
"acquisitionInfo.sensor"
);
Fetch
(
MDTime
::
AcquisitionStartTime
,
mds
,
"azimuth_start_time"
);
Fetch
(
MDTime
::
AcquisitionStopTime
,
mds
,
"azimuth_stop_time"
);
Fetch
(
MDNum
::
PRF
,
mds
,
"sensor_params.prf"
);
// Main XML file
std
::
string
MainFilePath
=
ExtractXMLFiles
::
GetResourceFile
(
itksys
::
SystemTools
::
GetFilenamePath
(
mds
.
GetResourceFile
(
""
)),
"T[S|D]X1_SAR__.*.xml"
)
;
if
(
!
MainFilePath
.
empty
())
{
XMLMetadataSupplier
MainXMLFileMS
(
MainFilePath
);
m_Imd
.
Add
(
MDNum
::
RadarFrequency
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.instrument.radarParameters.centerFrequency"
));
m_Imd
.
Add
(
MDStr
::
OrbitDirection
,
MainXMLFileMS
.
GetAs
<
std
::
string
>
(
"level1Product.productInfo.missionInfo.orbitDirection"
));
m_Imd
.
Add
(
MDNum
::
OrbitNumber
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.productInfo.missionInfo.absOrbit"
));
m_Imd
.
Add
(
MDNum
::
RSF
,
MainXMLFileMS
.
GetAs
<
double
>
(
"level1Product.productSpecific.complexImageInfo.commonRSF"
));
}
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
SARParam
sarParam
;
for
(
int
bandId
=
0
;
bandId
<
mds
.
GetNbBands
()
;
++
bandId
)
{
Fetch
(
MDStr
::
Polarization
,
mds
,
(
"acquisitionInfo.polarisationList["
+
std
::
to_string
(
bandId
)
+
"]"
).
c_str
(),
bandId
);
m_Imd
.
Bands
[
bandId
].
Add
(
MDGeom
::
SAR
,
sarParam
);
}
}
void
TerraSarImageMetadataInterface
::
Parse
(
const
MetadataSupplierInterface
&
mds
)
{
// Try to fetch the metadata from GDAL Metadata Supplier
if
(
mds
.
GetAs
<
std
::
string
>
(
""
,
"DRIVER"
)
==
"TSX/TerraSAR-X Product"
)
if
(
boost
::
filesystem
::
path
(
mds
.
GetResourceFile
()).
filename
().
string
().
rfind
(
"TSX1_"
,
0
)
==
0
)
this
->
ParseGdal
(
mds
);
// Try to fetch the metadata from GEOM file
else
if
(
mds
.
GetAs
<
std
::
string
>
(
""
,
"sensor"
)
==
"TSX-1"
)
...
...
Modules/Core/Metadata/test/CMakeLists.txt
View file @
e0e05761
...
...
@@ -463,6 +463,7 @@ set(ikonos_geom_file ${INPUTDATA}/ikonos/ikonos-2.geom)
set
(
worldview2_geom_file
${
INPUTDATA
}
/wv2/wv2-2.geom
)
set
(
quickbird_geom_file
${
INPUTDATA
}
/QB/qb-2.geom
)
set
(
Radarsat2_geom_file
${
INPUTDATA
}
/radarsat2/radarsat2-1.geom
)
set
(
TerraSar_geom_file
${
INPUTDATA
}
/terrasar/terrasar-1.geom
)
set
(
CosmoSkyMed_geom_file
${
INPUTDATA
}
/cosmoskymed/cosmoskymed-1.geom
)
set
(
Sentinel1_geom_file
${
INPUTDATA
}
/sentinel1/sentinel1-2.geom
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment