1

I have a dataset with 2157335 entries, and I am performing IDW/Kriging to interpolate.

But the code is running very slow. I am not sure this is because of a large dataset or there is something wrong with my code.

grd <- Sobj_SpatialGrid(ndvi_pts, maxDim=100)$SG
response <- unclass(ndvi_pts@data)[[1]]
ndvi_idw <- idw(response~1, ndvi_pts, newdata=grd)

or for kriging,

kriging_result=autoKrige(response~1, ndvi_pts, new_data=grd, nmax=7)

I cannot see anything wrong with it and R doesn't show any error. It just keeps running with no sign of stopping.

1 Answer 1

1

You can find out if its your code or your data size by subsetting your data randomly (try 200 points first) and seeing if that runs. Then maybe try 2000 points. With enough smaller test data sets you can possibly predict how long two million data points will take.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.