后吉斯计算点之间的距离超过两个
我有一张桌子上有位置的桌子。是否有任何可靠的方法来计算A-和GT之间的距离; b - > c - >使用Postgis的D等。
Distance = AB + AC + CD etc.
每个点都有{LAT,LNG}。
感谢您提供的任何帮助。
I have a table that has a position in it. Is there any solid way to calculate the distance between A --> B --> C --> D etc using Postgis.
Distance = AB + AC + CD etc.
Each point has {lat, lng}.
I appreciate any help you can provide.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
LEAD
或lag
与a window 。然后,您可以在外部查询中计算距离和sum
,如果需要的话。You can use
lead
orlag
to work with next/previous row of a window. You can then compute the distance andsum
it if you want, in an outer query.