0

I have a set of coordiantes(long,lat) as stations and one center coordinate which I should compute the weight of each station to this center coordinate using IDW.

My problem is that all of the implementation for IDW are for cartesian coordinate(x,y) on a flat map and not langitute and latitude for the earth. I use Haversine_formula to get the distance between locations and after that I don't know how to apply it to IDW formula.

I would appretiate any help and code in advanced.

Masoud
  • 124
  • 1
  • 8
  • If I understand your problem correctly, you need to convert Cartesian coordinates to longitude & latitude. The conversion formula is: lat = asin(z / R) lon = atan2(y, x) For more details, look at this answer: https://stackoverflow.com/questions/1185408/converting-from-longitude-latitude-to-cartesian-coordinates – Shahar Rotshtein Apr 30 '19 at 11:31
  • @Shahar-Rotshtein , Not really, IDW formula computes the weight based on the distances between two point and now here I compute the distance differently because of the earth's surface – Masoud Apr 30 '19 at 11:41

0 Answers0