Reputation: 343
I have a list of metars points (latitude, longitude, sea level pressure) and need to interpolate the pressure. I need 3D or 2D is fine?
I have seen Bicubic interpolation but it seems it only works for regular grids.
Here is some of the methods: Multivariate Interpolation
What is the most precise and the most adequate for my case? (I think kriging is the most precise but takes a lot of time, and the most adequate is maybe the Natural Neighbor)
Did I need to keep in memory a mesh or a grid with all interpolated points for this methods? I only want to call some function interpolate(lat, lon) and it returns the interpolated pressure for the available points.
Is there any java version of this algorithms? I only have seen this being aplied to image resizing.
I have also seen this Ruppert's algorithm.
Upvotes: 2
Views: 1239
Reputation: 478
I wish that I could have answered your question back when you posted it. But for what it's worth, I've had good luck working with unstructured data sets using Natural Neighbor Interpolation. Natural Neighbor Interpolation produces a smooth and visually pleasing surface and is relatively fast. You can find an open-source Java implementation at The Tinfour Project. I've posted some notes on the technique at Introduction to Natural Neighbor Interpolation. Coincidentally, the data source that I used as an example was the same METARs (meteorological aerodrome reports) that you mentioned.
Upvotes: 1
Reputation: 3623
For your case, where the physical domain is the earth, which is a closed surface, I would recommend using 3D. Namely, constructing your pressure P as a function of (x, y, z), instead of as a function of (longitude, latitude). When you call your function interpolate(lat, lon), you can internally convert (lat, long) to (x, y, z) first.
For scattered data interpolation, I had prior experience of using radial basis function, thin plate spline,..., etc. They are really easy to implement (you don't need to do triangulation or compute Voronoi diagram) and the result is typically good. The major downside is that it requires solving an (N x N) matrix (where N is the number of points) and therefore is only suitable when your number of points is at most thousands.
Upvotes: 1