Homepage of the service: https://maegger.github.io/getAustrianElevation.html (Copyright (c) 2017, Manfred Egger)
Related QGIS plugin: https://github.com/maegger/AustrianElevation
Elevation data source: CC BY 3.0 AT http://geoland.at/
import hvplot.pandas
from geopy.geocoders import Nominatim
from utils.dataaccess import get_elevation
from utils.converting import location_to_gdf
address = "Stephansdom, Wien"
locator = Nominatim(user_agent="OGD.AT-Lab")
location = locator.geocode(address)
print(location.address)
print("Latitude = {}, Longitude = {}".format(location.latitude, location.longitude))
gdf = location_to_gdf(location, address)
Before we can query the elevation, we need to reproject the coordinates to EPSG:3857
gdf = gdf.to_crs('epsg:3857')
gdf
gdf.loc[0, 'elevation'] = get_elevation(gdf.iloc[0].geometry)
gdf.to_crs('epsg:4326')
from utils.dataaccess import get_gdf_from_wfs
bike_gdf = get_gdf_from_wfs('RADGRAETZELOGD')
bike_gdf = bike_gdf.to_crs('epsg:3857')
def get_elevation_for_row(row):
return get_elevation(row.geometry)
bike_gdf['elevation'] = bike_gdf.apply(get_elevation_for_row, axis=1)
bike_gdf = bike_gdf.to_crs('epsg:4326')
bike_gdf.hvplot(c='elevation', geo=True, tiles='OSM', title='Bike station elevation')