Emil
Emil

Reputation: 13789

Finding nearest point's in space time to interpolate data

I have a set of data in the following format:

Date/time | Latitude | Longitude | Height | Temp

These data can be entered by the user based on atmospheric temperature measurements at different space and time.The space is represented by Latitude,Longitude, and Height.Now from this set of data I have to get the temperature at any given space and time by interpolation.I not sure what kind of data structure I must use in such a scenario.I have read about Kd-tree,is that an option ?

Upvotes: 2

Views: 916

Answers (2)

Fred Foo
Fred Foo

Reputation: 363807

It seems you're looking for a k-nearest-neighbor clustering algorithm. Yes, kd-trees are an option, and in fact the fastest option that I am aware of.

To cite the Wikipedia: k-nearest neighbor clustering "can be used for regression, by simply assigning the property value for the object to be the average of the values of its k nearest neighbors. It can be useful to weight the contributions of the neighbors, so that the nearer neighbors contribute more to the average than the more distant ones." This seems to be what you want.

Upvotes: 2

Related Questions