找到一个离源的距离的坐标 [英] finding a coordinate at some distance from the source

查看:158
本文介绍了找到一个离源的距离的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个iPhone应用程序,在那里我需要找到一些距离给定点的协调员。
用户触摸地图,触摸坐标。现在我必须找到一些距离东约5公里的坐标,另一个距南部约5公里。我已经通过谷歌搜索,但找不到任何算法。



我不知道这是这个问题的正确的地方,或者我需要找到一些其他可以找到与数学有关的问题的部分。



任何帮助都会很棒。



感谢

Pankaj

解决方案

如果地球的圆周是C,那么给定点南部d公里的点在南方是360度/摄氏度。东面d公里的点在东方是360 * d /(C * cos(纬度))度。



所以如果地球的圆周是40075.04公里,移动距离南部5公里,您将从纬度中减去0.0449,并使用相同的经度。要向东移动5公里,您将使用相同的纬度,并向经度添加0.0449 / cos(纬度)。


I am working on an iPhone app where I need to find some coordinares at some distance from a given point. The user touches the map and I get coordinates at the touch. Now I have to find some coordinates which are about 5 km away towards east and another one about 5km down to south. I have searched over google but could not find any algo for it.

I am not sure this is correct place for this question or i need to find some other section where I can find questions related to maths.

Any help will be great.

Thanks
Pankaj

解决方案

If Earth's circumference is C, the point at d kilometers to south of a given point is 360*d/C degrees to the south. The point at d kilometers to east is 360*d/(C*cos(latitude)) degrees to the east.

So if Earth's circumference is 40075.04 km, to move 5 km to the south you would subtract 0.0449 from the latitude and use the same longitude. To move 5 km to the east you would use the same latitude and add 0.0449/cos(latitude) to the longitude.

这篇关于找到一个离源的距离的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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