MGRS/USNG-检测区域变化

发布于 2024-11-08 10:53:15 字数 710 浏览 2 评论 0原文

我正在为 javascript 编写一个坐标转换库(适用于 NodeJS 和浏览器 javascript)。我已经做了很多了。如果您感兴趣,请查看。我没有编写大部分代码,所以我不确定一切是如何工作的。

据我所知,MGRS/USNG 区域基本上已重命名为 UTM 区域,而 UTM 区域又是根据纬度/经度定义的。

假设我有一个 MGRS 坐标并且我移动了一定的位移。我可以在不先转换为纬度/经度的情况下准确确定是否跨越区域边界吗?我知道如何在区域内移动时更新坐标,因为区域内的大多数东西都是正方形的。

有没有一种方法可以检测区域变化而无需转换为纬度/经度?

是否有任何语言的库可以执行此操作?

现有代码需要纬度和经度,所以我想我可以转换为纬度/经度,应用转换,然后转换回 MGRS。如果我只想确定我所在的区域,那么这还不错,然后我可以将其余的转换内容保留在 MGRS 中以保持精度。唯一的问题是,我想尽可能精确。

注意:

我确实找到这篇文章解释坐标转换,但这并没有并没有真正涵盖坐标变换。

I am writing a coordinate conversion library for javascript (for both NodeJS and browser javascript). I have quite a bit done already. Check it out if you're interested. I didn't write most of the code, so I'm not exactly sure how everything works.

From what I can tell, MGRS/USNG zones are basically renamed UTM zones, which in turn are defined in terms of lat/long.

Let's say I have an MGRS coordinate and I move a certain displacement. Can I accurately determine whether I crossed a zone boundary without first converting to lat/long? I know how to update coordinates as I move within a zone because most everything is square within zones.

Is there a way to detect zone changes without having to convert to lat/long?

Are there any libraries, in any language, that do this?

The existing code requires a latitude and longitude, so I guess I could convert to lat/long, apply the transformation, and then convert back to MGRS. This wouldn't be that bad if I only want to determine the zone I'm in, then I can keep the rest of the transformation stuff in MGRS to maintain precision. The only issue is, I want to be as precise as possible.

Note:

I did find this article explaining coordinate conversions, but this doesn't really cover coordinate transformations.

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

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

发布评论

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

评论(2

年华零落成诗 2024-11-15 10:53:15

openmap Java 库 可能有一些帮助(您可以将代码改编为 JavaScript)。它们可以将 MGRS 转换为纬度/经度等。至于检测区域变化,您可以尝试将此问题发布到 GIS Stack Exchange 站点。我相信那里有人会有答案。

MGRS 有网格参考号,而不是纬度/经度。请参阅此处。所以看来你不需要转换为纬度/经度来确定你穿过了网格。

The openmap Java library may be of some help (you could adapt the code to JavaScript). They have conversions for MGRS to Lat/Lon and more. As for detecting zone changes, you may try posting this question to the GIS Stack Exchange site. I'm sure someone there would have an answer.

MGRS has grid references numbers, not lat/lngs. See here. So it seems you should not need to convert to lat/lng to determine you crossed a grid.

旧城空念 2024-11-15 10:53:15

据我所知,MGRS 和纬度/经度之间无法直接转换。

MGRS(或 USNG)使用与 UTM 相同的区域定义,由纬度/经度坐标定义。 UTM 和 MGRS (USNG) 使世界本质上是平坦的,使用模糊因素来保持接近的精度(在一米左右)。由于这些网格被视为平坦的,因此它们对于确定根据大圆定义的区域边界并不可靠。

MGRS 和 UTM 之间的转换很容易(而且几乎无损),UTM 和纬度/经度之间的转换非常准确,尽管不是 100% 精确。

据我所知,准确翻译 MGRS 坐标的最佳方法是首先将其转换为纬度/经度,应用翻译,然后再转换回来。这有利于检测区域变化,但通过使用纬度/经度转换中的区域并应用 MGRS 坐标中的其余平移,可能会找到更准确的目的地点。这应该检测到中方区域的变化。

参考资料/资源:

http://en.wikipedia.org/wiki/Military_grid_reference_system

http://www.stellman-greene.com/mgrs_to_utm/

From what I've found, it is not possible to convert directly between MGRS and Lat/Long.

MGRS (or USNG for that matter) uses the same zone definitions as UTM, which is defined by lat/long coordinates. UTM and MGRS (USNG) make the world essentially flat, using fudge factors to maintain close accuracy (within a meter or so). Since these grids are treated as being flat, they are not reliable for determining zone boundaries, which are defined in terms of the great circle.

Conversion between MGRS and UTM is easy (and pretty much lossless), and conversion between UTM and lat/long is pretty accurate, albeit not 100% precise.

From what I've read, the best way to accurately translate an MGRS coordinate is to first convert it to lat/long, apply the tranlation, then convert back. This is good for detecting zone changes, but a more accurate destination point could potentially be found by using the zone from the lat/long conversion and applying the rest of the translation in MGRS coordinates. This should detect mid-square zone changes.

References/Resources:

http://en.wikipedia.org/wiki/Military_grid_reference_system

http://www.stellman-greene.com/mgrs_to_utm/

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