将我的 WGS 84 坐标转换为屏幕 x 和 y

发布于 2024-12-06 08:20:20 字数 454 浏览 0 评论 0原文

我在创建一个简单的地图应用程序时遇到了一个小问题。我想要学习的是 WGS 84 GPS 坐标转换背后的数学。

这就是问题:

我有两个 WGS 84 坐标;纬度:53.7506 长:-2.3931 + 纬度:53.7638 长:-2.4212 我想将这些值转换为屏幕上的点 x = 'a' 值在 0 到 200 之间,y = 'a' 值在 0 到 200 之间

我已经说了一个值,因为该值将从纬度和经度数字导出,如下所示上面提到过。

有人可以帮忙吗?

我尝试使用公式 N = V/D 对数字进行标准化(N 是标准化值,V 是坐标值,D 是屏幕区域的最大值,在我的例子中是 200。这并不起作用生成的数字都在 199 - 200 范围内,但我现在已经迷失了这一点,所以我需要一些帮助,

我确信有一个计算正确的公式,但我似乎找不到它,

请帮忙。我需要今晚睡个好觉:)

谢谢

I am stuck on a little problem of creating a simple map app. what i am trying to learn is the mathematics behind the conversion of my WGS 84 GPS co-ordinates.

this is the problem:

I have two WGS 84 co-ordinates; lat:53.7506 Long:-2.3931 + lat:53.7638 Long:-2.4212
I want to convert these values onto points on my screen x = 'a' value between 0 and 200 and y = 'a' value between 0 and 200

i have said a value as this value will be derived from the lat and long figures as mentioned above.

can anyone help please?

i have tried normalising the figures using the formula N = V/D (N being the normailsed value with V being the co-ordinate value and D being the max value of the screen area which in my case is 200. this didnt work as all the figures generated was all in the 199 - 200 range but I have gotten lost with the thought process on this now so I need some help.

I am sure there is a formula for calculating the right but i cannot seem to find it

please help as I need to sleep well tonight :)

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

衣神在巴黎 2024-12-13 08:20:20

这是 x 的简单线性映射,以及带有扭曲的 y 的线性映射:

x) 因为下限是左侧,您可以简单地使用

x = (long + 180)/360 * x_max

y),因为只要 0 在中间,您就需要减去/相应添加:

y = (y_max/2) - (lat/90) * (y_max/2)

It is a simple linear mapping for x, and one for y with a twist:

x) as the lower limit is the left hand side, you can simply use

x = (long + 180)/360 * x_max

y) as long 0 is in the middle, you'll need to substract/add accordingly:

y = (y_max/2) - (lat/90) * (y_max/2)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文