Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update map version for node/ endpoint, remove CN constraint #157

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions backend/app/get_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@

SQL = '''
SELECT
ST_AsGeoJSON(cg_nodes.geom) AS geom,
ST_AsGeoJSON(
ST_GeometryN(here_nodes.geom, 1) -- necessary because currently stored as a multi-point
) AS geom,
array_agg(DISTINCT InitCap(streets.st_name)) FILTER (WHERE streets.st_name IS NOT NULL) AS street_names
FROM congestion.network_nodes AS cg_nodes
JOIN here.routing_nodes_21_1 AS here_nodes USING (node_id)
JOIN here_gis.streets_att_21_1 AS streets USING (link_id)
WHERE node_id = %(node_id)s
FROM here.routing_nodes_23_4 AS here_nodes
JOIN here_gis.streets_att_23_4 AS streets USING (link_id)
WHERE here_nodes.node_id = %(node_id)s
GROUP BY
node_id,
cg_nodes.geom;
here_nodes.node_id,
here_nodes.geom;
'''

def get_node(node_id):
Expand Down