How to calculate 3D distance (including altitude) between two points in GeoDjango

后端 未结 3 846
别那么骄傲
别那么骄傲 2020-12-17 03:28

Prologue:

This is a question arising often in SO:

  • 3d distance calculations with GeoDjango
  • Calculating distance between two po
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 04:26

    Once converted into Cartesian coordinates, you can compute the norm with numpy:

    np.linalg.norm(point_1 - point_2)
    

提交回复
热议问题