-
Notifications
You must be signed in to change notification settings - Fork 96
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
interpIDW offset issue. #1186
Comments
Thanks. The problem seems to stem from setting the
I believe this is a bug in GDALGRID |
That's great, many thanks! |
As suggested by Even Roualt, this is caused by taking the first five points that are within the circle; in order of appearance. For that reason you do not see this effect if you first randomize the order of the points
|
That is super interesting! That solution solves things for me. I'd be happy to submit a PR with some suggestions for docs if it's useful but I suppose it is a fairly specific issue that occurs where the points to interpolate are derived from a grid? perhaps something in details along the lines of: "Where maxPoints is finite and y contains point locations that are orderd by spatial location or derived from a grid, the point ordering should be randomised to avoid offset values in the retutned SpatRaster." Cheers! |
I think the solution is to use I now get:
Thank you for reporting this and for the nice repex. |
Perfect thanks so much for resolving this so quickly! Have a good weekend. |
Hey,
I recently stumbled across this issue where it appears that increasing the radius argument in
interpIDW
results in an increased offset between the original and interpolated raster.I've put together a minimal example below (terra v ‘1.7.35’):
Created on 2023-06-15 with reprex v2.0.2
As always many thanks for this excellent package!
The text was updated successfully, but these errors were encountered: