Horyzon is a topographic library which can compute field of view for any place on Earth and make panoramatic plots such as this view on Tatra Mountains in Slovakia:
Horyzon currently uses Global Multi-Resolution Topographic data (GMRT) from https://www.gmrt.org/ .
Horyzon is in an early stage of development, its API is unstable and the features are not yet optimized for speed.
Horyzon depends on common libraries such as pandas, xarray, requests. Optionally, pyresample can be used to transform data to a different geographic projection.
Clone Horyzon from gitlab
git clone https://github.com/pythomec/horyzon.git
and use GMRT MapTool https://www.gmrt.org/GMRTMapTool/ to download data in your region of interest. Save the grid data in GMT v3 Compatible NetCDF format. Automatic data download is envisaged for future versions.
- Download topographic data from https://www.gmrt.org/GMRTMapTool/
- Load the data as xarray.DataArray
from horyzon import load_grt, Viewpoint
alt = load_grt(path_to_the_data)
- Create Viewpoint object (it may take some time)
lon, lat = 20, 49
view = Viewpoint(altitude=alt, lon=lon, lat=lat)
- Plot panorama looking towards North
view.plot_panorama(direction='N')
- And voilà ...
- You can also plot field of view, e.g. on the altitude map
import pylab as plt
plt.figure()
view.altitude.plot()
view.plot_horizon_lonlat('r')