Skip to content

Commit

Permalink
remove requirement that links belong to segments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Jul 24, 2024
1 parent 724e63b commit 57acdf3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions backend/app/get_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
results.link_dir,
InitCap(attr.st_name) AS st_name,
results.seq,
seg_lookup.segment_id,
ST_AsGeoJSON(streets.geom) AS geojson,
ST_Length( ST_Transform(streets.geom,2952) ) AS length_m
FROM results
JOIN here.routing_streets_22_2 AS streets USING ( link_dir )
JOIN here_gis.streets_att_22_2 AS attr
ON attr.link_id::int = left(link_dir, -1)::int
JOIN congestion.network_links_22_2 AS seg_lookup USING ( link_dir )
ORDER BY seq;
'''

Expand All @@ -43,10 +41,9 @@ def get_links(from_node_id, to_node_id):
'link_dir': link_dir,
'name': st_name,
'sequence': seq,
'segment_id': segment_id,
'geometry': json.loads(geojson),
'length_m': length_m
} for link_dir, st_name, seq, segment_id, geojson, length_m in cursor.fetchall()
} for link_dir, st_name, seq, geojson, length_m in cursor.fetchall()
]

connection.close()
Expand Down

0 comments on commit 57acdf3

Please sign in to comment.