Skip to content

Improve DEM bounding box selection when product coordinates are in a different projection than the DEM#275

Open
gshiroma wants to merge 29 commits into
isce-framework:developfrom
gshiroma:fix_rtc_load_dem
Open

Improve DEM bounding box selection when product coordinates are in a different projection than the DEM#275
gshiroma wants to merge 29 commits into
isce-framework:developfrom
gshiroma:fix_rtc_load_dem

Conversation

@gshiroma
Copy link
Copy Markdown
Contributor

This PR improves the DEM bounding box selection when the product bounding box projection differs from the DEM projection, the previous implementation reprojected only the four corners of the bounding box to determine the DEM extent.

This is inaccurate when reprojecting between coordinate systems where straight edges become curves (e.g. UTM to geographic), causing the computed bounding box to miss the bulge introduced by geodetic curvature. The result was a DEM subset that was too small, leading to interpolation failures or incorrect elevation values near the edges.

Instead of projecting the four corners only, all four edges of the input bounding box are now densely sampled (n_edge_samples points per edge, default 11) before reprojection, ensuring the true geographic extent is captured regardless of projection curvature.

The antimeridian handling is simplified. Rather than treating the western and eastern edges separately, a single check over all sampled points is performed. If the DEM is in geographic coordinates and the reprojected X range exceeds 180 degrees, longitudes are remapped to [0, 360] before computing the extent.

gshiroma and others added 28 commits July 3, 2025 11:30
@gshiroma gshiroma added this to the R05.02.0 milestone May 26, 2026
@hfattahi hfattahi removed this from the R05.02.0 milestone May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants