Skip to content

Commit

Permalink
fix: create-geojson.network fails because Python 3.9 flipped coordina…
Browse files Browse the repository at this point in the history
…te x/y for projections
  • Loading branch information
billyc committed Jan 3, 2022
1 parent 8b299ba commit 4bc9e9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/create-geojson-network.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
for link in links.values:
coords = []

fromY, fromX = coord_transformer.transform(link[1],link[2])
coords.extend([round(fromX, 5), round(fromY, 5)])
toY, toX = coord_transformer.transform(link[3], link[4])
coords.extend([round(toX, 5), round(toY, 5)])
fromY, fromX = coord_transformer.transform(link[2],link[1])
coords.extend([round(fromX, 6), round(fromY, 6)])
toY, toX = coord_transformer.transform(link[4], link[3])
coords.extend([round(toX, 6), round(toY, 6)])

converted_links[link[0]] = coords

Expand Down

0 comments on commit 4bc9e9d

Please sign in to comment.