Mike Jenne a écrit :

Given a set of points (specifically, a hurricane track) I am trying to select one point in sequence, then the next point in sequence, extract the angle and distance between the two, and then create intermediate points using the Offset function, the angle, and a fractional portion of the distance.

I’m using

ANGL = Asin(Distance(F_XX2,F_YY2,F_XX2,F_YY1,"mi")/Distance(F_XX1,F_YY1,F_XX2,F_YY2,"mi"))* RAD_2_DEG

to measure the angle, where F_ANGL is the angle, F_XX2 is the CentroidX of the second point, F_YY2 is the CentroidY of the second point, F_XX1 is the CentroidX of the first point, and F_YY1 is the CentroidY of the first point. All variables (in this instance) are float values,


If you need only the angle to create intermediate points, you can make your
code much simpler using a proportinal divide beetween point 1 and 2 :

If you want N-1 intermediate point run for i = 1 to N-1 :

Xi = F_XX1 + (F_XX2 - F_XX1) * i/N
Yi = F_YY1 + (F_YY2 _ F_YY1) * i/N


--
Michel Wurtz
MAP/SG/SM/SDSI/CERIT/DIG
B.P. 12668 - 31326 Castanet-Tolosan Cedex

_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to