计算新的经度,纬度从旧+ N米 [英] Calculating new longtitude, latitude from old + n meters

查看:188
本文介绍了计算新的经度,纬度从旧+ N米的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图寻找这件事,但我不能在任何地方找到它:

I tried looking this up but I cant find it anywhere:

我要创建2个新的经度和2个基于一个坐标和在米的距离新的纬度,我想创建一个围绕某一个点一个漂亮的边框。它的规模小,最大1500米+和1500米 - 。所以它是一个城市的一部分,我不认为地球的曲线,必须考虑到。

I want to create 2 new longtitude and 2 new latitudes based on a coordinate and a distance in meters, I want to create a nice bounding box around a certain point. Its small scale and max 1500meters + and 1500meter -. So it is for a part of a city, I dont think the curve of the earth has to be taken into account.

所以,我有50.0452345(x)和4.3242234(Y),我想知道X +500米,X500米,Y-500米,Y +500米

So I have 50.0452345(x) and 4.3242234(y) and I want to know x+500meter, x-500meter, y-500meter, y+500meter

我发现有很多算法,但是几乎所有的似乎处理点之间的距离。

I found many algorithms but almost all seem to deal with the distance between points.

推荐答案

每经度程度公里​​数大约

The number of kilometers per degree of longitude is approximately

(2*pi/360) * r_earth * cos(theta)

其中, THETA 为度纬度和 r_earth 大约6378公里。

where theta is the latitude in degrees and r_earth is approximately 6378 km.

的每纬度的度数公里数大约相同,在所有位置,约

The number of kilometers per degree of latitude is approximately the same at all locations, approx

(2*pi/360) * r_earth = 111 km / degree 

所以,你可以这样做:

So you can do:

new_latitude  = latitude  + (dy / r_earth) * (180 / pi);
new_longitude = longitude + (dx / r_earth) * (180 / pi) / cos(latitude * pi/180);

只要 DX DY 小比地球的半径,你没有得到太靠近磁极

As long as dx and dy are small compared to the radius of the earth and you don't get too close to the poles.

这篇关于计算新的经度,纬度从旧+ N米的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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