Skip to content

Commit

Permalink
use try block
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Jan 7, 2025
1 parent 1035654 commit 800ed45
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions backend/app/nodes/conflation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ def add_conflated_nodes(node):

# now get distances between selected and conflated points
for network, conflatedNode in node['conflated'].items():
conflatedNode['distance'] = haversine(
(lat, lon),
(
conflatedNode['geometry']['coordinates'][1],
conflatedNode['geometry']['coordinates'][0]
),
unit='m'
)
try:
conflatedNode['distance'] = haversine(
(lat, lon),
(
conflatedNode['geometry']['coordinates'][1],
conflatedNode['geometry']['coordinates'][0]
),
unit='m'
)
except:
pass

return node

0 comments on commit 800ed45

Please sign in to comment.