如何确定纬度和纬度经度在椭圆内

发布于 2024-11-30 01:56:59 字数 178 浏览 0 评论 0原文

我有描述旋转椭圆的数据(纬度经度坐标中的椭圆中心、长轴和短轴的长度(以公里为单位)以及椭圆定向的角度)。我不知道焦点的位置,但假设有一种方法可以以某种方式找出它们。我想确定特定的纬度经度点是否在这个椭圆内。我找到了一种确定点是否在笛卡尔网格上的椭圆内的好方法,但不知道如何处理纬度经度点。 任何帮助将不胜感激。

-科迪·O.

I have data describing a rotated ellipse (the center of the ellipse in latitude longitude coordinates, the lengths of the major and minor axes in kilometers, and the angle that the ellipse is oriented). I do not know the location of the foci, but assume there is a way to figure them out somehow. I would like to determine if a specific latitude longitude point is within this ellipse. I have found a good way to determine if a point is within an ellipse on a Cartesian grid, but don't know how to deal with latitude longitude points.
Any help would be appreciated.

-Cody O.

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

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

发布评论

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

评论(3

泛泛之交 2024-12-07 01:56:59

在笛卡尔平面上执行此操作的标准方法是使用光线投射算法。由于您位于球体上,因此您需要使用大圆距离来准确表示椭圆。

编辑:标准光线投射算法将适用于您的椭圆,但其准确性取决于a)您的椭圆有多小,以及b)它离赤道有多近。请记住,您必须注意特殊情况,例如日期变更线,它从 179 -> 179 开始。 180/-180-> -179。

The standard way of doing this on a Cartesian plane would be with a ray-casting algorithm. Since you're on a sphere, you will need to use great circle distances to accurately represent the ellipse.

EDIT: The standard ray-casting algorithm will work on your ellipse, but its accuracy depends on a) how small your ellipse is, and b) how close to the equator it is. Keep in mind, you'd have to be aware of special cases like the date line, where it goes from 179 -> 180/-180 -> -179.

耳钉梦 2024-12-07 01:56:59

由于您已经有办法解决笛卡尔网格上的问题,我只需将您的点转换为 UTM 坐标。那么点和长度都将以米为单位,检查应该很容易。许多 matlab 代码可用于完成从 LL 到 UTM 的转换。 像这样

您在描述中没有提及椭圆的轴有多长。如果它们很长(比如数百公里),这种方法可能对您不起作用,您将不得不考虑大圆等。您必须确保指定要转换到的 UTM 区域。您希望所有点最终都位于同一个 UTM 区域,否则您将无法关联这些点。

Since you already have a way to solve the problem on a cartesian grid, I would just convert your points to UTM coordinates. The points and lengths will all be in meters then and the check should be easy. Lots of matlab code is available to do this conversion from LL to UTM. Like this.

You don't mention how long the axes of the ellipse are in the description. If they are very long (say hundreds of km), this approach may not work for you and you will have to resort to thinking about great circles and so on. You will have to make sure to specify the UTM zone to which you are converting. You want all your points to end up in the same UTM zone or you won't be able to relate the points.

坏尐絯℡ 2024-12-07 01:56:59

经过对我的问题进行更多研究并在另一个论坛上发布后,我找到了解决方案。我的椭圆相对较小,所以我认为它是一个真正的(平坦)椭圆。我能够找到椭圆焦点的经纬度,如果从兴趣点到每个焦点的距离总和小于 2a(长轴半径),那么它就在椭圆内。不过还是谢谢你的建议。
-科迪

After some more research into my problem and posting in another forum I was able to figure out a solution. My ellipse is relatively small so I assumed it was a true (flat) ellipse. I was able to locate the lat lon of the foci of the ellipse then if the sum of the distances from the point of interest to each focus is less than 2a (the major axis radius), then it is within the ellipse. Thanks for the suggestions though.
-Cody

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