Skip to content

Commit 343b293

Browse files
gshiromaGitHub Enterprise
authored andcommitted
save interpolated DEM before evaluating if geocoded pixel is valid (#848)
1 parent f43aaed commit 343b293

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

cxx/isce3/geocode/GeocodeCov.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,6 +2529,20 @@ void Geocode<T>::_runBlock(
25292529
dem_last[j + 1] = dem11;
25302530
}
25312531

2532+
// save geo-edges
2533+
if (out_geo_dem != nullptr) {
2534+
if (i == 0) {
2535+
out_geo_dem_array(i, j + 1) = dem01[2];
2536+
}
2537+
if (i == 0 && j == 0) {
2538+
out_geo_dem_array(i, j) = dem00[2];
2539+
}
2540+
if (j == 0) {
2541+
out_geo_dem_array(i + 1, j) = dem10[2];
2542+
}
2543+
out_geo_dem_array(i + 1, j + 1) = dem11[2];
2544+
}
2545+
25322546
if (std::isnan(a00) || std::isnan(a10) || std::isnan(a10) ||
25332547
std::isnan(a11)) {
25342548
continue;
@@ -2717,20 +2731,6 @@ void Geocode<T>::_runBlock(
27172731
out_geo_rdr_r(i + 1, j + 1) = x11;
27182732
}
27192733

2720-
// save geo-edges
2721-
if (out_geo_dem != nullptr) {
2722-
if (i == 0) {
2723-
out_geo_dem_array(i, j + 1) = dem01[2];
2724-
}
2725-
if (i == 0 && j == 0) {
2726-
out_geo_dem_array(i, j) = dem00[2];
2727-
}
2728-
if (j == 0) {
2729-
out_geo_dem_array(i + 1, j) = dem10[2];
2730-
}
2731-
out_geo_dem_array(i + 1, j + 1) = dem11[2];
2732-
}
2733-
27342734
// x, y positions are binned by integer quotient (floor)
27352735
const int x = static_cast<int>(j / geogrid_upsampling);
27362736
const int y = static_cast<int>(i / geogrid_upsampling);

0 commit comments

Comments
 (0)