-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blockwise coregistration apply method does not take nodata properly into account #195
Comments
Apparently, something funky is going on with the NaN mask. It should simply be translated and not warped like this. This is due to the lines here. I'm not sure why the filling is needed here, as in my test case, tranformed_points does not contain any gap. Any idea @erikmannerfelt ?
But I'm not sure if that won't break other things? This is another argument towards #140 ! |
Actually, it solves the issue for NuthKaab, but not for blockwise. For that one, apparently the dilate_mask option has no effect... |
Weirdly, in blockwise, the function apply_matrix is run during coreg.fit, instead of coreg.apply (as can be seen by printing out on screen during that function). I really don't understand what is going on... |
I'm giving up. @erikmannerfelt I hope you can check that when you come back. |
Am I right to assume that the problem only occurs when Rasters are supplied, and not when numpy arrays are given to the Coreg functions? I've identified the problem and I have a fix for Rasters. Now I just need to know if you found another problem or if we are talking about the same thing |
No, if you check the example script, a numpy array is passed, not a Raster. This issue actually occurred before PR #175. |
Okay, thanks. I'll see if my fixes solves it. |
Fantastic! |
When the DEM is resampled during the blockwise coregistration, if nodata value exist, they will "leak" around the gaps.
A way to visualize it is to run the plot_blockwise_coreg.py example script and at L 76* to create an artificial gap in the DEM, e.g. with:
The nodata "leak" shows up on the upper edge of the gap. See attached figure.
The issue is that the nodata values are used in the resampling, so the "leaked" values do not match the nodata value and can be extremely difficult to filter out.
I just checked and apparently, the issue shows up when running the same example with the Nuth & Kaab coregistration instead, but to a lesser extent.
The text was updated successfully, but these errors were encountered: