You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DEM files are combined into a VRT to include a buffer for each HUC8. However, clipping the VRT to the extent of the buffered HUC8 results in a misaligned DEM. This misalignment propagates into the REM and inundation predictions.
The plot below shows the extent of the original DEM (black boxes) compared to the colormap of the clipped DEM. Additionally, using the GDAL argument -r bilinear causes the clipped DEM values to be inconsistent with the original DEM, further complicating debugging efforts.
The following code can be used to replicate the observations for HUC8 19020302:
Rob, the misalignment only occurs when clipping the VRT (from a 10m DEM) into a 10m clipped buffered DEM. This issue is present for both CONUS and Alaska HUCs. Below is a plot for CONUS HUC8 02050206, where the gray-scale pixels represent the clipped DEM and the red pixel represents the original DEM. I don't see that pre-clipping is contributing to this issue.
This issue also happens for DEM difference raster creation. Note that both clipped rasters are misaligned compared with the original raster.
This change is significant for the example shown here . In this case, using the bilinear method would show only the middle cell as non-inundated. However, switching to the near method makes all three bridge cells non-inundated. This occurs because the bilinear interpolation reduces the elevation differences by "smoothing" them, using neighboring non-bridge cells with zero difference values.
Because of this issue, and until we fix the misalignment, I am using -r near argument in clipping the difference rasters.
The DEM files are combined into a VRT to include a buffer for each HUC8. However, clipping the VRT to the extent of the buffered HUC8 results in a misaligned DEM. This misalignment propagates into the REM and inundation predictions.
The plot below shows the extent of the original DEM (black boxes) compared to the colormap of the clipped DEM. Additionally, using the GDAL argument
-r bilinear
causes the clipped DEM values to be inconsistent with the original DEM, further complicating debugging efforts.The following code can be used to replicate the observations for HUC8 19020302:
The text was updated successfully, but these errors were encountered: