@@ -45,6 +45,9 @@ class Geocode {
45
45
* @param[out] output_raster Output raster
46
46
* @param[in] dem_raster Input DEM raster
47
47
* @param[in] output_mode Geocode method
48
+ * @param[in] flag_az_baseband_doppler Shift SLC azimuth spectrum to baseband
49
+ * (using Doppler centroid) before interpolation
50
+ * @param[in] flatten Flatten the geocoded SLC
48
51
* @param[in] geogrid_upsampling Geogrid upsampling (in each direction)
49
52
* @param[in] flag_upsample_radar_grid Double the radar grid sampling rate
50
53
* @param[in] flag_apply_rtc Apply radiometric terrain correction (RTC)
@@ -54,7 +57,7 @@ class Geocode {
54
57
* The value 0 indicates that the the exponent is based on the data type of
55
58
* the input raster (1 for real and 2 for complex rasters).
56
59
* @param[in] rtc_min_value_db Minimum value for the RTC area factor.
57
- * Radar data with RTC area factor below this limit are ignored .
60
+ * Radar data with RTC area factor below this limit will be set to NaN .
58
61
* @param[in] rtc_geogrid_upsampling Geogrid upsampling (in each
59
62
* direction) used to compute the radiometric terrain correction RTC.
60
63
* @param[in] rtc_algorithm RTC algorithm (RTC_BILINEAR_DISTRIBUTION
@@ -72,15 +75,20 @@ class Geocode {
72
75
* @param[out] out_geo_rdr Raster to which the radar-grid
73
76
* positions (range and azimuth) of the geogrid pixels vertices will be
74
77
* saved.
75
- * @param[out] out_geo_dem Raster to which the interpolated DEM
78
+ * @param[out] out_geo_dem Raster to which the interpolated DEM
76
79
* will be saved.
77
80
* @param[out] out_nlooks Raster to which the number of radar-grid
78
81
* looks associated with the geogrid will be saved.
79
82
* @param[out] out_geo_rtc Output RTC area factor (in
80
83
* geo-coordinates).
81
- * @param[in] in_rtc Input RTC area factor (in slant-range).
82
- * @param[out] out_rtc Output RTC area factor (in slant-range).
83
- * @param[in] geocode_memory_mode Select memory mode
84
+ * @param[in] phase_screen_raster Phase screen to be removed before geocoding
85
+ * @param[in] offset_az_raster Azimuth offset raster (reference
86
+ * radar-grid geometry)
87
+ * @param[in] offset_rg_raster Range offset raster (reference
88
+ * radar-grid geometry)
89
+ * @param[in] in_rtc Input RTC area factor (in slant-range).
90
+ * @param[out] out_rtc Output RTC area factor (in slant-range).
91
+ * @param[in] geocode_memory_mode Select memory mode
84
92
* @param[in] min_block_size Minimum block size (per thread)
85
93
* @param[in] max_block_size Maximum block size (per thread)
86
94
* @param[in] dem_interp_method DEM interpolation method
@@ -89,12 +97,15 @@ class Geocode {
89
97
geocode (const isce3::product::RadarGridParameters& radar_grid,
90
98
isce3::io::Raster& input_raster, isce3::io::Raster& output_raster,
91
99
isce3::io::Raster& dem_raster,
92
- geocodeOutputMode output_mode = geocodeOutputMode::AREA_PROJECTION,
100
+ geocodeOutputMode output_mode = geocodeOutputMode::INTERP,
101
+ bool flag_az_baseband_doppler = false ,
102
+ bool flatten = false ,
93
103
double geogrid_upsampling = 1 ,
94
104
bool flag_upsample_radar_grid = false ,
95
105
bool flag_apply_rtc = false ,
96
- isce3::geometry::rtcInputTerrainRadiometry input_terrain_radiometry =
97
- isce3::geometry::rtcInputTerrainRadiometry::BETA_NAUGHT,
106
+ isce3::geometry::rtcInputTerrainRadiometry
107
+ input_terrain_radiometry = isce3::geometry::
108
+ rtcInputTerrainRadiometry::BETA_NAUGHT,
98
109
isce3::geometry::rtcOutputTerrainRadiometry
99
110
output_terrain_radiometry = isce3::geometry::
100
111
rtcOutputTerrainRadiometry::GAMMA_NAUGHT,
@@ -114,6 +125,9 @@ class Geocode {
114
125
isce3::io::Raster* out_geo_dem = nullptr ,
115
126
isce3::io::Raster* out_geo_nlooks = nullptr ,
116
127
isce3::io::Raster* out_geo_rtc = nullptr ,
128
+ isce3::io::Raster* phase_screen_raster = nullptr ,
129
+ isce3::io::Raster* offset_az_raster = nullptr ,
130
+ isce3::io::Raster* offset_rg_raster = nullptr ,
117
131
isce3::io::Raster* input_rtc = nullptr ,
118
132
isce3::io::Raster* output_rtc = nullptr ,
119
133
geocodeMemoryMode geocode_memory_mode = geocodeMemoryMode::AUTO,
@@ -130,12 +144,68 @@ class Geocode {
130
144
* @param[in] input_raster Input raster
131
145
* @param[out] output_raster Output raster
132
146
* @param[in] dem_raster Input DEM raster
147
+ * @param[in] flag_az_baseband_doppler Shift SLC azimuth spectrum to baseband
148
+ * (using Doppler centroid) before interpolation
149
+ * @param[in] input_terrain_radiometry Input terrain radiometry
150
+ * @param[in] output_terrain_radiometry Output terrain radiometry
151
+ * @param[in] rtc_min_value_db Minimum value for the RTC area factor.
152
+ * Radar data with RTC area factor below this limit will be set to NaN.
153
+ * @param[in] rtc_geogrid_upsampling Geogrid upsampling (in each
154
+ * direction) used to compute the radiometric terrain correction RTC.
155
+ * @param[in] rtc_algorithm RTC algorithm (RTC_BILINEAR_DISTRIBUTION or
156
+ * RTC_AREA_PROJECTION)
157
+ * @param[in] abs_cal_factor Absolute calibration factor.
158
+ * @param[in] clip_min Clip (limit) minimum output values
159
+ * @param[in] clip_max Clip (limit) maximum output values
160
+ * @param[out] out_geo_rdr Raster to which the radar-grid
161
+ * positions (range and azimuth) of the geogrid pixels centers will be
162
+ * saved.
163
+ * @param[out] out_geo_dem Raster to which the interpolated DEM
164
+ * will be saved.
165
+ * @param[out] out_geo_rtc Output RTC area factor (in
166
+ * geo-coordinates).
167
+ * @param[in] flatten Flatten the geocoded SLC
168
+ * @param[in] phase_screen_raster Phase screen to be removed before geocoding
169
+ * @param[in] offset_az_raster Azimuth offset raster (reference
170
+ * radar-grid geometry)
171
+ * @param[in] offset_rg_raster Range offset raster (reference radar-grid
172
+ * geometry)
173
+ * @param[in] in_rtc Input RTC area factor (in slant-range).
174
+ * @param[out] out_rtc Output RTC area factor (in slant-range).
175
+ * @param[in] dem_interp_method DEM interpolation method
133
176
*/
134
177
template <class T_out >
135
- void geocodeInterp (const isce3::product::RadarGridParameters& radar_grid,
136
- isce3::io::Raster& input_raster,
137
- isce3::io::Raster& output_raster,
138
- isce3::io::Raster& demRaster);
178
+ void geocodeInterp (
179
+ const isce3::product::RadarGridParameters& radar_grid,
180
+ isce3::io::Raster& input_raster, isce3::io::Raster& output_raster,
181
+ isce3::io::Raster& dem_raster,
182
+ bool flag_apply_rtc = false ,
183
+ bool flag_az_baseband_doppler = false , bool flatten = false ,
184
+ isce3::geometry::rtcInputTerrainRadiometry
185
+ input_terrain_radiometry = isce3::geometry::
186
+ rtcInputTerrainRadiometry::BETA_NAUGHT,
187
+ isce3::geometry::rtcOutputTerrainRadiometry
188
+ output_terrain_radiometry = isce3::geometry::
189
+ rtcOutputTerrainRadiometry::GAMMA_NAUGHT,
190
+ float rtc_min_value_db = std::numeric_limits<float >::quiet_NaN(),
191
+ double rtc_geogrid_upsampling =
192
+ std::numeric_limits<double>::quiet_NaN(),
193
+ isce3::geometry::rtcAlgorithm rtc_algorithm =
194
+ isce3::geometry::rtcAlgorithm::RTC_AREA_PROJECTION,
195
+ double abs_cal_factor = 1,
196
+ float clip_min = std::numeric_limits<float>::quiet_NaN(),
197
+ float clip_max = std::numeric_limits<float>::quiet_NaN(),
198
+ isce3::io::Raster* out_geo_rdr = nullptr,
199
+ isce3::io::Raster* out_geo_dem = nullptr,
200
+ isce3::io::Raster* out_geo_rtc = nullptr,
201
+ isce3::io::Raster* phase_screen_raster = nullptr,
202
+ isce3::io::Raster* offset_az_raster = nullptr,
203
+ isce3::io::Raster* offset_rg_raster = nullptr,
204
+ isce3::io::Raster* input_rtc = nullptr,
205
+ isce3::io::Raster* output_rtc = nullptr,
206
+ isce3::core::dataInterpMethod dem_interp_method =
207
+ isce3::core::dataInterpMethod::BIQUINTIC_METHOD);
208
+
139
209
140
210
/* * Geocode using the area projection algorithm (adaptive multilooking)
141
211
*
@@ -175,10 +245,10 @@ class Geocode {
175
245
* geo-coordinates).
176
246
* @param[in] in_rtc Input RTC area factor (in slant-range).
177
247
* @param[out] out_rtc Output RTC area factor (in slant-range).
178
- * @param[in] dem_interp_method DEM interpolation method
179
248
* @param[in] min_block_size Minimum block size (per thread)
180
249
* @param[in] max_block_size Maximum block size (per thread)
181
250
* @param[in] geocode_memory_mode Select memory mode
251
+ * @param[in] dem_interp_method DEM interpolation method
182
252
*/
183
253
template <class T_out >
184
254
void geocodeAreaProj (
@@ -277,6 +347,8 @@ class Geocode {
277
347
278
348
void doppler (isce3::core::LUT2d<double > doppler) { _doppler = doppler; }
279
349
350
+ void nativeDoppler (isce3::core::LUT2d<double > nativeDoppler) { _nativeDoppler = nativeDoppler; }
351
+
280
352
void orbit (isce3::core::Orbit& orbit) { _orbit = orbit; }
281
353
282
354
void ellipsoid (isce3::core::Ellipsoid& ellipsoid)
@@ -363,18 +435,87 @@ class Geocode {
363
435
isce3::core::ProjectionBase* _proj, int lineStart,
364
436
int blockLength, int blockWidth, double demMargin);
365
437
366
- void _geo2rdr (const isce3::product::RadarGridParameters& radar_grid,
367
- double x, double y, double & azimuthTime, double & slantRange,
368
- isce3::geometry::DEMInterpolator& demInterp,
369
- isce3::core::ProjectionBase* proj);
370
-
438
+ std::string _get_nbytes_str (long nbytes);
439
+
440
+ int _geo2rdr (const isce3::product::RadarGridParameters& radar_grid,
441
+ double x, double y, double & azimuthTime, double & slantRange,
442
+ isce3::geometry::DEMInterpolator& demInterp,
443
+ isce3::core::ProjectionBase* proj,
444
+ float &dem_value);
445
+
446
+ /* *
447
+ * @param[in] rdrDataBlock a basebanded block of data in radar coordinate
448
+ * @param[out] geoDataBlock a block of data in geo coordinates
449
+ * @param[in] radarX the radar-coordinates x-index of the pixels in geo-grid
450
+ * @param[in] radarY the radar-coordinates y-index of the pixels in geo-grid
451
+ * @param[in] radarBlockWidth width of the data block in radar coordinates
452
+ * @param[in] radarBlockLength length of the data block in radar coordinates
453
+ * @param[in] azimuthFirstLine azimuth time of the first sample
454
+ * @param[in] rangeFirstPixel range of the first sample
455
+ * @param[in] interp interpolator object
456
+ * @param[in] radarGrid radar grid parameter
457
+ * @param[in] nativeDoppler 2D LUT Doppler of the SLC image
458
+ * @param[in] flatten flag to flatten the geocoded SLC
459
+ * @param[in] phase_screen_raster Phase screen raster
460
+ * @param[in] phase_screen_array Phase screen array
461
+ * @param[in] abs_cal_factor Absolute calibration factor.
462
+ * @param[in] clip_min Clip (limit) minimum output values
463
+ * @param[in] clip_max Clip (limit) maximum output values
464
+ * @param[in] flag_run_rtc Flag to indicate if RTC is enabled
465
+ * @param[in] rtc_area RTC area normalization factor array
466
+ * @param[out] out_geo_rtc Output RTC area factor raster (in
467
+ * geo-coordinates)
468
+ * @param[out] out_geo_rtc Output RTC area factor array (in
469
+ * geo-coordinates)
470
+ */
371
471
template <class T_out >
372
- void
373
- _interpolate (isce3::core::Matrix<T_out>& rdrDataBlock,
374
- isce3::core::Matrix<T_out>& geoDataBlock,
375
- std::valarray<double >& radarX, std::valarray<double >& radarY,
376
- int rdrBlockWidth, int rdrBlockLength, int azimuthFirstLine,
377
- int rangeFirstPixel, isce3::core::Interpolator<T_out>* interp);
472
+ inline void _interpolate (const isce3::core::Matrix<T_out>& rdrDataBlock,
473
+ isce3::core::Matrix<T_out>& geoDataBlock,
474
+ const std::valarray<double >& radarX,
475
+ const std::valarray<double >& radarY,
476
+ const int radarBlockWidth, const int radarBlockLength,
477
+ const int azimuthFirstLine, const int rangeFirstPixel,
478
+ const isce3::core::Interpolator<T_out>* interp,
479
+ const isce3::product::RadarGridParameters& radarGrid,
480
+ const bool flag_az_baseband_doppler, const bool flatten,
481
+ isce3::io::Raster* phase_screen_raster,
482
+ isce3::core::Matrix<float >& phase_screen_array,
483
+ double abs_cal_factor, float clip_min, float clip_max,
484
+ bool flag_run_rtc, const isce3::core::Matrix<float >& rtc_area,
485
+ isce3::io::Raster* out_geo_rtc,
486
+ isce3::core::Matrix<float >& out_geo_rtc_arraya);
487
+
488
+
489
+ /* *
490
+ * param[in,out] data a matrix of data that needs to be base-banded in
491
+ * azimuth param[in] starting_range starting range of the data block
492
+ * param[in] sensing_start starting azimuth time of the data block
493
+ * param[in] range_pixel_spacing spacing of the slant range
494
+ * param[in] prf pulse repetition frequency
495
+ * param[in] doppler_lut 2D LUT of the image Doppler
496
+ */
497
+ template <class T2 >
498
+ inline void _baseband (isce3::core::Matrix<T2>& data, const double starting_range,
499
+ const double sensing_start, const double range_pixel_spacing,
500
+ const double prf,
501
+ const isce3::core::LUT2d<double >& doppler_lut);
502
+
503
+ /* *
504
+ * param[in,out] data a matrix of data that needs to be base-banded in
505
+ * azimuth param[in] starting_range starting range of the data block
506
+ * param[in] sensing_start starting azimuth time of the data block
507
+ * param[in] range_pixel_spacing spacing of the slant range
508
+ * param[in] prf pulse repetition frequency
509
+ * param[in] doppler_lut 2D LUT of the image Doppler
510
+ */
511
+ template <class T2 >
512
+ inline void _baseband (isce3::core::Matrix<std::complex <T2>>& data,
513
+ const double starting_range, const double sensing_start,
514
+ const double range_pixel_spacing, const double prf,
515
+ const isce3::core::LUT2d<double >& doppler_lut);
516
+
517
+
518
+
378
519
379
520
// isce3::core objects
380
521
isce3::core::Orbit _orbit;
@@ -389,6 +530,9 @@ class Geocode {
389
530
// radar grids parameters
390
531
isce3::core::LUT2d<double > _doppler;
391
532
533
+ // native Doppler
534
+ isce3::core::LUT2d<double > _nativeDoppler;
535
+
392
536
// start X position for the output geogrid
393
537
double _geoGridStartX = std::numeric_limits<double >::quiet_NaN();
394
538
0 commit comments