【问题标题】:Bash code to convert UTM x/y to lat/long Decimal Degrees将 UTM x/y 转换为 lat/long 十进制度的 Bash 代码
【发布时间】:2016-01-05 22:48:04
【问题描述】:

我想知道是否有 bash 代码(或者可能是其他语言,例如 Python、Perl)将 UTM x/y 坐标转换为纬度/经度坐标?一次可以转换多个坐标的代码。我在 UTM 29N 区工作,使用 WGS84 基准。

UTM x/y 坐标示例:

616928  6877084
621751  6877314
614317  6871645
588506  6883397
570571  6886266

所需的十进制度数输出:

62.008000   -6.766680087
62.008542   -6.674491852
61.960009   -6.819994839
62.072357   -7.306064871
62.101883   -7.648054115

【问题讨论】:

  • 你应该解释一下转换算法是什么。像我这样不想搜索 UTM 坐标,但可能知道如何实现算法的人可以回答您的问题。
  • 如果您仍然想知道转换算法是什么:uwgb.edu/dutchs/usefuldata/utmformulas.htm
  • @DrGranit - 谢谢。然而,我实际上是在前一段时间发现了这个网站,但忘了在这里报告。 Steven Dutch 在这个问题上帮助了我们。

标签: bash grid latitude-longitude utm wgs84


【解决方案1】:

转换单个坐标

echo 616928  6877084  | gdaltransform -s_srs epsg:25829 -t_srs epsg:4326

要像您的示例那样转换一组坐标:

616928  6877084
621751  6877314
614317  6871645
588506  6883397
570571  6886266

将它们保存到 coords.txt 并运行:

cat coords.txt | gdaltransform -s_srs epsg:25829 -t_srs epsg:4326

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-16
    • 2018-05-20
    • 2020-09-11
    • 2015-05-06
    • 1970-01-01
    • 2012-03-12
    • 2017-12-27
    • 2022-07-30
    相关资源
    最近更新 更多