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
When you happen to transform point on the edge of vertical shift grid file (e.g. at the south pole) the bilinear interpolation code accesses point outside of grid limits due to nature of bilinear interpolation which samples points (x, y), (x + 1, y), (x, y + 1), (x + 1, y + 1). Coordinates x and y are checked against limits but (x + 1) and (y + 1) are left unchecked. This causes undefined behaviour that sometimes leads to program crash (segmentation fault).
I've fixed the function in our installation by replacing 1 with variables next_x and next_y that are set to 1 everywhere except at the grid's right and bottom border. This effectively replicates values at border.
When you happen to transform point on the edge of vertical shift grid file (e.g. at the south pole) the bilinear interpolation code accesses point outside of grid limits due to nature of bilinear interpolation which samples points (x, y), (x + 1, y), (x, y + 1), (x + 1, y + 1). Coordinates x and y are checked against limits but (x + 1) and (y + 1) are left unchecked. This causes undefined behaviour that sometimes leads to program crash (segmentation fault).
I've fixed the function in our installation by replacing 1 with variables next_x and next_y that are set to 1 everywhere except at the grid's right and bottom border. This effectively replicates values at border.
The text was updated successfully, but these errors were encountered: