diff --git a/pandapower/plotting/plotly/mapbox_plot.py b/pandapower/plotting/plotly/mapbox_plot.py index cdec01449..9dfbbed6b 100644 --- a/pandapower/plotting/plotly/mapbox_plot.py +++ b/pandapower/plotting/plotly/mapbox_plot.py @@ -6,10 +6,6 @@ import os -from typing_extensions import deprecated - -from pandapower.plotting import geo - try: import pandaplan.core.pplog as logging except ImportError: @@ -44,23 +40,6 @@ def _on_map_test(x, y): return True -@deprecated('geo_data_to_latlong is deprecated and will be removed shortly, use pandapower.geo.convert_crs instead') -def geo_data_to_latlong(net, projection): - """ - Transforms network's geodata (in `net.bus_geodata` and `net.line_geodata`) from specified projection to lat/long (WGS84). - - INPUT: - **net** (pandapowerNet) - The pandapower network - - **projection** (String) - projection from which geodata are transformed to lat/long. some examples - - - "epsg:31467" - 3-degree Gauss-Kruger zone 3 - - "epsg:2032" - NAD27(CGQ77) / UTM zone 18N - - "epsg:2190" - Azores Oriental 1940 / UTM zone 26N - """ - geo.convert_crs(net, epsg_in=projection.split(':')[1], epsg_out=4326) - - def set_mapbox_token(token): from pandapower.__init__ import pp_dir path = os.path.join(pp_dir, "plotting", "plotly") diff --git a/pandapower/plotting/plotly/simple_plotly.py b/pandapower/plotting/plotly/simple_plotly.py index 0d61998ca..509e5e359 100644 --- a/pandapower/plotting/plotly/simple_plotly.py +++ b/pandapower/plotting/plotly/simple_plotly.py @@ -3,15 +3,12 @@ # Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. - -import warnings -from typing_extensions import overload import pandas as pd from pandapower.plotting.generic_geodata import create_generic_coordinates from pandapower.plotting.plotly.traces import create_bus_trace, create_line_trace, \ create_dcline_trace, create_scale_trace, create_trafo_trace, draw_traces, \ - _create_node_trace, _create_branch_trace + _create_node_trace from pandapower.plotting.plotly.mapbox_plot import * try: @@ -100,29 +97,8 @@ def get_hoverinfo(net, element, precision=3, sub_index=None): return hoverinfo -@overload -def simple_plotly(net, respect_switches=True, use_line_geo=None, on_map=False, - *, map_style='basic', figsize=1.0, aspectratio='auto', - line_width=1.0, bus_size=10.0, ext_grid_size=20.0, - bus_color="blue", line_color='grey', trafo_color='green', - trafo3w_color='green', ext_grid_color="yellow", - filename='temp-plot.html', auto_open=True, showlegend=True, - additional_traces=None, zoomlevel=11, auto_draw_traces=True, hvdc_color='cyan'): ... - - -@overload -@deprecated("projection is deprecated and will be removed in future versions. geojson should always be WGS84.") -def simple_plotly(net, respect_switches=True, use_line_geo=None, on_map=False, - projection='epsg:4326', map_style='basic', figsize=1.0, aspectratio='auto', - line_width=1.0, bus_size=10.0, ext_grid_size=20.0, - bus_color="blue", line_color='grey', trafo_color='green', - trafo3w_color='green', ext_grid_color="yellow", - filename='temp-plot.html', auto_open=True, showlegend=True, - additional_traces=None, zoomlevel=11, auto_draw_traces=True, hvdc_color='cyan'): ... - - def simple_plotly(net, respect_switches=True, use_line_geo=None, on_map=False, - projection=None, map_style='basic', figsize=1.0, aspectratio='auto', + map_style='basic', figsize=1.0, aspectratio='auto', line_width=1.0, bus_size=10.0, ext_grid_size=20.0, bus_color="blue", line_color='grey', trafo_color='green', trafo3w_color='green', ext_grid_color="yellow", @@ -196,13 +172,6 @@ def simple_plotly(net, respect_switches=True, use_line_geo=None, on_map=False, OUTPUT: **figure** (graph_objs._figure.Figure) figure object """ - if projection is not None: - warnings.warn( - FutureWarning( - "projection is deprecated and will be removed in future versions. geojson should always be WGS84." - ), - stacklevel=2 - ) settings = dict( on_map=on_map, @@ -262,15 +231,6 @@ def _simple_plotly_generic(net, respect_separators, use_branch_geodata, branch_w branch_trace_func, node_trace_func, hoverinfo_func, hvdc_color="cyan", settings=None, **kwargs): - if 'projection' in kwargs: - warnings.warn( - FutureWarning( - "projection is deprecated and will not be used. geojson should always be WGS84." - ), - stacklevel=2 - ) - kwargs.pop('projection') - settings_defaults = { # if no settings are provided, these are used 'on_map': kwargs.get('on_map', True), 'map_style': kwargs.get('map_style', 'basic'),