Skip to content

Commit a9cd337

Browse files
gshiromaGitHub Enterprise
authored andcommitted
Quick PR to fix GCOV block artifacts due to insufficient DEM margin (#857)
* fix DEM loading margin * change DEM loading margin default from 50 pixels to 100 pixels * use default DEM loading margin
1 parent 9a7850e commit a9cd337

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

cxx/isce3/geocode/GeocodeCov.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,11 +2109,9 @@ void Geocode<T>::_runBlock(
21092109
getDemCoords = isce3::geometry::getDemCoordsDiffEpsg;
21102110
}
21112111

2112-
// Load DEM using the block geogrid with a margin of 100 pixels
2113-
const double margin_x = std::abs(_geoGridSpacingX) * 100;
2114-
const double margin_y = std::abs(_geoGridSpacingY) * 100;
2112+
// Load DEM using the block geogrid extents
21152113
auto error_code = loadDemFromProj(dem_raster, minX, maxX, minY, maxY,
2116-
&dem_interp_block, proj, margin_x, margin_y);
2114+
&dem_interp_block, proj);
21172115

21182116
if (error_code != isce3::error::ErrorCode::Success) {
21192117
_saveOptionalFiles(block_x, block_size_x, block_y, block_size_y,

cxx/isce3/geometry/RTC.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,11 +1265,8 @@ void _RunBlock(const int jmax, const int block_size,
12651265
getDemCoords = getDemCoordsDiffEpsg;
12661266
}
12671267

1268-
const int dem_margin_in_pixels = 100;
1269-
12701268
auto error_code = loadDemFromProj(dem_raster, minX, maxX, minY, maxY,
1271-
&dem_interp_block, proj, dem_margin_in_pixels,
1272-
dem_margin_in_pixels);
1269+
&dem_interp_block, proj);
12731270

12741271
if (error_code != isce3::error::ErrorCode::Success) {
12751272
return;

cxx/isce3/geometry/RTC.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ isce3::error::ErrorCode loadDemFromProj(isce3::io::Raster& dem_raster,
355355
const double minX, const double maxX, const double minY,
356356
const double maxY, DEMInterpolator* dem_interp_block,
357357
isce3::core::ProjectionBase* proj = nullptr,
358-
const int dem_margin_x_in_pixels = 50,
359-
const int dem_margin_y_in_pixels = 50);
358+
const int dem_margin_x_in_pixels = 100,
359+
const int dem_margin_y_in_pixels = 100);
360360

361361
void areaProjIntegrateSegment(double y1, double y2, double x1, double x2,
362362
int length, int width,

0 commit comments

Comments
 (0)