如何找到围绕特定位置5英里半径的一组经纬度 [英] How to find a set of lat/long pairs surrounding a 5 miles radius of a certain location

查看:102
本文介绍了如何找到围绕特定位置5英里半径的一组经纬度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到围绕以纬度/长度表示的特定位置的5英里半径或作为地址的一组经纬度。

解决方案

首先,您决定您想要拥有多少(lat,lon)对:

您可以希望有4个坐标围绕中心点形成一个方形。

或者您决定在中心点附近有一个regualr N-gon。


然后,您可以使用从纬度/经度到米的投影,例如EquiDistantProjetion。

这允许您将纬度/经度中心转换为笛卡尔米,
然后你可以像在学校里学到的那样计算出来。



现在你在笛卡尔米的中心点:

然后您可以使用坐标(r,phi)的极坐标形式来计算正方形或N形角的角点。
(centerX + r * sin(phi),centerY + r * cos(phi))。

最后,您必须使用逆转换来转换坐标对返回经纬度。



EquiDistantProjection适用于长达100英里的距离。
它在80度以上不能正常工作。 (极地地区)

How to find a set of lat/long pairs surrounding a 5 miles radius of a certain location expressed in lat/long or as a address.

解决方案

First you decide how many (lat,lon) pairs you want to have:
You could want to have 4 cordinates forming a square arround the center point.
Or you decide to have a regualr N-Gon around the center point.

Then you use a projection from lat/lon to meters, e.g EquiDistantProjetion.

This allows you to transform the lat/lon center to cartesian meters, where you then can calculate like you have learned it in school.

Now you having the center point in cartesian meters:
Then you use the Polar coordinate form of a coordinate (r, phi) to calculate the corner points of the square or N-gon. (centerX + r* sin(phi), centerY + r* cos(phi)).

Finally you have to use the inverse tranformation to transform your coordinate pairs back to lat/lon.

The EquiDistantProjection works for distances up to some 100 miles. It does not work well above 80 deg latitude. (Polar region)

这篇关于如何找到围绕特定位置5英里半径的一组经纬度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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