Last active
April 20, 2020 03:43
-
-
Save justacec/e2e3346bd2b74821f24b4e25bdfcabe4 to your computer and use it in GitHub Desktop.
Akima vs Interp Interpolation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(sp) | |
library(akima) | |
library(interp) | |
load('depth_data.RData') | |
result = akima::interpp(sf::as_Spatial(grid_points), z='z', xo=sf::as_Spatial(line_points)) | |
grid_coords = sf::st_coordinates(grid_points) | |
line_coords = sf::st_coordinates(line_points) | |
result2 = interp::interp(grid_coords[,1], grid_coords[,2], grid_points$z, line_coords[,1], line_coords[,2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment