Anda di halaman 1dari 1

I'm not a phyton programmer but I run into the same problem: finding the deviation from North.

I
solved it (or it seems) by swopping firstpoint and lastpoint in the following way:

180+math.atan2(( !Shape.firstpoint.X! - !Shape.lastpoint.X! ),( !Shape.firstpoint.Y! -
!Shape.lastpoint.Y! ) ) * (180 / math.pi )

It seems to me that it returns exactly the deviation from North!!

Please check this out

Cheers

Marco Rusmini

Anda mungkin juga menyukai