gpt4 book ai didi

python - 在 Python 中使用 egms 评估大地水准面高度

转载 作者:行者123 更新时间:2023-12-04 11:47:42 37 4
gpt4 key购买 nike

Python 中是否有任何库具有使用 egm84、egm96 和 egm2008 计算大地水准面高度的函数?

我知道 geolib 有一个函数( http://geographiclib.sourceforge.net/html/classGeographicLib_1_1GravityModel.html )使用三个 egms 计算大地水准面高度,但我不知道如何在 Python 中实现它们(如果它们真的适用)。你如何实现?或者如果它不适用于Python,是否有任何可以使用的库?

谢谢你。

最佳答案

这里有一些相关的工作:
https://github.com/mrJean1/PyGeodesy
他们的使用说明不是最新的,但这里有一个 TLDR:
首先下载您选择的大地水准面 from here ,像这样:

wget https://sourceforge.net/projects/geographiclib/files/geoids-distrib/egm2008-5.tar.bz2
bzip2 -d egm2008-5.tar.bz2
tar -xvf egm2008-5.tar
然后在你的python脚本中使用:
import pygeodesy
from pygeodesy.ellipsoidalKarney import LatLon
ginterpolator = pygeodesy.GeoidKarney("./geoids/egm2008-5.pgm")

# Make an example location
lat=51.416422
lon=-116.217151

# Get the geoid height
single_position=LatLon(lat, lon)
h = ginterpolator(single_position)
print(h)
这将为您提供与该位置椭球的偏差(以米为单位):
-11.973145778529625
这与我们在 we use an online calculator 时发现的大致相符。 .

关于python - 在 Python 中使用 egms 评估大地水准面高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22564727/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com