Skip to content

Commit

Permalink
refactor: change code to expect (lat, lon) instead of (lon, lat) (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen authored Sep 20, 2021
1 parent 2ff0015 commit 4c39c30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prereise/gather/griddata/hifld/data_process/transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def find_closest_substation_and_distance(coordinates, name, substations_groupby)
# Coordinates are initially (lon, lat); we reverse to (lat, lon) for haversine
start_subs = lines.apply(
lambda x: find_closest_substation_and_distance(
x.loc["COORDINATES"][0][::-1], x.loc["SUB_1"], substations_groupby
x.loc["COORDINATES"][0], x.loc["SUB_1"], substations_groupby
),
axis=1,
)
end_subs = lines.apply(
lambda x: find_closest_substation_and_distance(
x.loc["COORDINATES"][-1][::-1], x.loc["SUB_2"], substations_groupby
x.loc["COORDINATES"][-1], x.loc["SUB_2"], substations_groupby
),
axis=1,
)
Expand Down

0 comments on commit 4c39c30

Please sign in to comment.