Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果摄像机角度不是90°该怎么办呢? #7

Open
yongyuanting opened this issue May 21, 2024 · 3 comments
Open

如果摄像机角度不是90°该怎么办呢? #7

yongyuanting opened this issue May 21, 2024 · 3 comments

Comments

@yongyuanting
Copy link

如果摄像机角度不是垂直于地面,而是斜向,该如何处理呢?

@Char-Ten
Copy link
Owner

可能你是使用cesium这类框架去制作gis的地图?
这就可能复杂一点,在2D地图之所以需要将经纬度转像素,是因为墨卡托投影的原因导致直接将经纬度变换时会产生畸变。
因此需要线将点击到的经纬度转成像素点,然后用像素点做矩阵变换,然后再转回经纬度,这样就可以保证变换后不会产生畸变。
你可以在当前地图点击获取经纬度,然后在背后运行另外一个2D地图框架,甚至用D3那个都可以,然后把经纬度传进去,用这个2D地图框架的计算方法传入到这个库里面就可以。

之前是为了省事,所以才没有把经纬度转像素、像素转经纬度的方法内置进去。

@yongyuanting
Copy link
Author

感谢解答,如果需要先有一个起飞点,然后才会画出一个多边形去进行航线规划,起飞点到多边形之间的线路该如何进行计算呢?
司空

@juny218
Copy link

juny218 commented May 30, 2024

这些线上面的航点怎么算呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants