import hvplot.pandas
from geopy.geocoders import Nominatim
from utils.dataaccess import gdf_from_wfs
from utils.plotting import hvplot_with_buffer
from utils.converting import location_to_gdf
address = "Giefinggasse 2, 1210 Wien"
locator = Nominatim(user_agent="OGD.AT-Lab")
location = locator.geocode(address)
print(location.address)
print("Latitude = {}, Longitude = {}".format(location.latitude, location.longitude))
geocoded_gdf = location_to_gdf(location, address)
map_plot = hvplot_with_buffer(geocoded_gdf, 1000, size=400, title='Geocoded address with buffer')
map_plot
gdf = gdf_from_wfs('ELADESTELLEOGD')
map_plot * gdf.hvplot(geo=True).opts(active_tools=['wheel_zoom'])