-
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
Nuth & Kaab coregistration spreads NaNs #232
Comments
A simple solution is to replace the whole _apply_matrix method by something like this:
Note that one can check that the coregistration works well by running Nuth & Kaab a second time and checking the residual translation. The result is best if resampling with cubic. This is probably because in Nuth & Kaab fit function, the raster is resampled using RectBivariateSpline with degree 1. |
Actually, cubic interpolation spreads the NaNs even more, so bilinear is preferable, see below. See attached script for tests. |
This is most likely due to the |
The NaN spread is even worse with two coregistrations in a row, like |
The Nuth & Kaab coregistration (and I assume other types of coregistration as well) spread NaNs because of the resampling.
An easy way to see it is to run the Nuth & Kaab example and to add some random gaps in the DEM. See attached script (rrnamed to txt so that GitHub does not complain) and figure below.
plot_nuth_kaab.txt
The text was updated successfully, but these errors were encountered: