measure - 3 points distance calculation strategy -
problem: have (lat-long) co-ordinates of lot of points a, b, c, d . . . in database. now, when choose point a, need calculate distances of point each of other points , closest 1 eg. math requires cos , tan calculations of points. seems quite expensive on db side. so thought of strategy simplify this. below explanation of strategy. i have 3 known points (x, y, z) distance between 1 point other known. example lets assume 10. i.e. distance x y = 10; y z = 10; z x = 10. (this forms equilateral triangle. real scenario might not case) now lets have 2 points , b. calculate distances of point x, y , z , store respectively , point b. (say application logic) so have: for point a: ax, ay , az for point b: bx, , bz as strategy, question how can calculate distance between point point b. as problem itself, if apply above strategy it, question simplifying or complicating situation? thanks in advance answer. you can calculate distance between 2 points using pythagore...