oeo4b / kriging.js

Javascript library for geospatial prediction and mapping via ordinary kriging
oeo4b.github.io
MIT License
325 stars 130 forks source link

large data set #8

Open luismiguelbravo opened 9 years ago

luismiguelbravo commented 9 years ago

Hello, Thanks a lot for your work with kriging.js

Hear is the problem. I have a data set with 118632 register sampledata

whe I create a model var model = "spherical"; var sigma2 = 0, alpha = 100; var variogram = kriging.train(array_z, array_x, array_y, model, sigma2, alpha);

I get error "RangeError: invalid array length @ file:///E:/kringingjs/javascript/kriging.js-master/kriging.js:233" image

What can I do to make kriging with this dataset? maybe select few data. convert 118632 samples in 500 samples?

gagan-bansal commented 8 years ago

I started exploring this module recently, I am curious how did you solve it?

Instead of random 500 samples you can take every nth in x direction and nth in y direction depending on data density you want.

mathiasleroy commented 7 years ago

I have the same issue. I have found the limit to be 501 data points. But I have a different error message in the console:

kriging.js:15 Uncaught RangeError: Maximum call stack size exceeded at Array.rep (kriging.js:15) at kriging_matrix_diag (kriging.js:34) at Object.kriging.train (kriging.js:333)

gagan-bansal commented 7 years ago

This error is due to recursive function call. Check here at stackoverflow with nice explanation. But this in not solution, further @oeo4b can throw some light on this.