GPS坐标:一个点周围1公里 [英] GPS coordinates: 1km square around a point

查看:320
本文介绍了GPS坐标:一个点周围1公里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,



我希望有人能为我提供一个方程来计算1公里的平方(X从a.aaa到b.bbb,Y从c.ccc到c.ccc),例如lat = 53.38292839和lon = -6.1843984?我还需要2公里,5公里和10公里的广场。



我尝试过使用Google搜索无济于事...这是深夜,希望有人在我深入研究三角函数之前,可能已经快速修复了...



我会在Javascript中运行所有这些,不过任何语言都可以。 b
$ b

不,这不是一个家庭作业问题;($ / b>

非常感谢,



纬度有因为所有的纬线都是相同的大小,所以1纬度等于地球圆周的1/ 360,这是40,075公里的1/ 360。

b
$ b

经度线的长度取决于纬度,纬度l处的经度线为cos(l)* 40,075 km,一度经度为该纬度的1/ 360 。



所以你可以从中反向工作。假设你想要一个非常接近1平方公里的距离,你需要1 *(360/40075)= 0.008983度的纬度。



在您的示例纬度53.38292839处,经度线为cos(53.38292839)* 40075 = [约23903.297公里长。所以1公里就是1 *(360 / 23903.297)= 0.015060度。实际上地球并不是一个完美的球体,它在赤道上更加肥壮。上面给出了世界上大部分有用面积的一个非常好的答案,但在极点附近(长/长方形的矩形停止看起来像地球上的矩形)有点奇怪。例如,如果您在赤道上,那么假想的经线长度为0公里。所以,如何处理需要计算学位的方法取决于您为何需要这些数字。


Greetings,

I was hoping someone out there could provide me with an equation to calculate a 1km square (X from a.aaa to b.bbb, Y from c.ccc to c.ccc) around a given point, say lat=53.38292839 and lon=-6.1843984? I'll also need 2km, 5km and 10km squares around a point.

I've tried googling around to no avail... It's late at night and was hoping someone might have quick fix handy before I delve into the trigonometry...

I'll be running all this in Javascript, although any language is fine.

And no, it's not a homework problem ;(

Many thanks in advance,

解决方案

If the world were a perfect sphere, according to basic trigonometry...

Degrees of latitude have the same linear distance anywhere in the world, because all lines of latitude are the same size. So 1 degree of latitude is equal to 1/360th of the circumference of the Earth, which is 1/360th of 40,075 km.

The length of a lines of longitude depends on the latitude. The line of longitude at latitude l will be cos(l)*40,075 km. One degree of longitude will be 1/360th of that.

So you can work backwards from that. Assuming you want something very close to one square kilometre, you'll want 1 * (360/40075) = 0.008983 degrees of latitude.

At your example latitude of 53.38292839, the line of longitude will be cos(53.38292839)*40075 = [approx] 23903.297 km long. So 1 km is 1 * (360/23903.297) = 0.015060 degrees.

In reality the Earth isn't a perfect sphere, it's fatter at the equator. And the above gives a really good answer for most of the useful area of the world, but is prone to go a little odd near the poles (where rectangles in long/lat stop looking anything like rectangles on the globe). If you were on the equator, for example, the hypothetical line of longitude is 0 km long. So how you'd deal with a need to count degrees on that will depend on why you want the numbers.

这篇关于GPS坐标:一个点周围1公里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆