Closed SteffenMeinecke closed 4 months ago
This issue is a bit broadly worded. It only failes if lines do not contain geodata.
How would you expect it to be handled if some lines do and some lines do not contain geodata? Draw all geodata based on the from_bus and to_bus or only use the bus geodata if the line does not contain its own geodata?
The issue itself is use_bus_geodata = len(net.line.geo) == 0
. This only evaluates true if no lines exist. Don't know what i was thinking there. 😅
But the create_line_collection is a bit unflexible. I would have to create two line collections if only some lines do not contain any geodata.
Or just move the check inside that function. Is there a reason to force use of bus geodata instead of present line geodata. Or is this something that could just be decided inside the create_line_collection?
[EDIT]
My prefered solution would be to use line geodata when present and only use bus geodata if no line geodata is present or use_bus_geodata
is set. I do not see any value in not drawing lines that have no geodata present but drawing lines where the geodata is present.
An alternative would be to only draw the lines where geodata is present and then using a second line collection to draw the lines where no geodata is present.
Hi @KS-HTK, I think it is a common use case that only geodata of buses are available and you want to have plotted lines between the buses. If geodata is available for some or several lines, I think, the default can still be that the geodata is filled by the geodata of two ends (buses) of the lines. In this case I would log the filling as info.
Bug report checklis
[X] Searched the issues page for similar reports
[X] Read the relevant sections of the documentation
[X] Browse the tutorials and tests for usefull code snippets and examples of use
[X] Reproduced the issue after updating with
pip install --upgrade pandapower
(orgit pull
)[X] Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
Issue Description and Traceback
Before merging #1731,
simple_plot()
was able to plot lines between buses. @KS-HTK and @vogt31337 can you have a look why this is failing now?Expected Behavior
grey lines between plotted blue buses
Installed Versions
Label