未提供项目说明
python-srtm的Python项目详细描述
NASA SRTM高度数据的Python解析
为SRTM .hgt
或.hgt.zip
文件提供API。在
需要Python3.8,可以与Python3.6&3.7一起使用。在
安装
pip install python-srtm
export SRTM1_DIR=/path/to/srtm1/
export SRTM3_DIR=/path/to/srtm3/
使用
您可以访问SRTM1或SRTM3数据。SRTM 1,例如:
^{pr2}$或SRTM3:
# SRTM3 - 90m resolution>>>fromsrtmimportSrtm3HeightMapCollection>>>srtm3_data=Srtm3HeightMapCollection()>>>srtm3_data.get_altitude(latitude=40.123,longitude=-7.456)608>>>Srtm3HeightMapCollection().get_elevation_profile(40.123,-7.456,40.129,-7.460)[626,616,585,593,577,548,528,514]
分析
importcProfilecProfile.run('function_to_profile()',filename='output.cprof')
brew install qcachegrind pip install pyprof2calltree pyprof2calltree -k -i /pythonprofiling/profiler/first_iteration.cprof
释放过程
内部参考:
# Run the tests
pytest
# Update the setup.py
dephell convert
black setup.py
# Ensure poetry.lock is up to date
poetry lock
export VERSION="VERSION HERE"
# Version bump
poetry version $VERSION
# Commit
git add .
git commit -m "Releasing version $VERSION"
# Tagging and branching
git tag "v$VERSION"
git branch "v$VERSION"
git push origin \
refs/tags/"v$VERSION" \
refs/heads/"v$VERSION" \
master
poetry publish --build
- 项目
标签: