在某个方向上移动坐标点X米

问题描述 投票:0回答:1

我有一个存储在postgresql中的坐标点,例如33.215,35.124 ......我的方位向量方向(北方的角度)为55,我希望将方位角方向的点移动20米,如何我可以做到这一点吗?

谢谢

mysql postgresql geolocation coordinate-systems
1个回答
1
投票

如果你已经安装了PostGIS扩展,你可以使用ST_Project

SELECT ST_AsText(ST_Project('POINT(35.124 33.215)'::geography, 20, radians(55.0)));
© www.soinside.com 2019 - 2024. All rights reserved.