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

get_here_nodes_within should offer _option_ of limiting to congestion network nodes #179

Open
Nate-Wessel opened this issue Jan 10, 2025 · 1 comment
Assignees
Labels

Comments

@Nate-Wessel
Copy link
Contributor

Nate-Wessel commented Jan 10, 2025

Currently this is the default and it makes certain conflations impossible, like
/node/centreline/13459492?doConflation

because the query is limited to nodes of the congestion network. In that case the nearest node is 381m away!

@Nate-Wessel Nate-Wessel self-assigned this Jan 10, 2025
@Nate-Wessel
Copy link
Contributor Author

Nate-Wessel commented Jan 10, 2025

This gives the right results but is still taking unacceptably long (~2s)

SELECT 
    here_nodes.node_id::int,
    ST_AsGeoJSON(here_nodes.geom, 5) AS geom,
    array_agg(DISTINCT InitCap(streets.st_name)) FILTER (WHERE streets.st_name IS NOT NULL) AS street_names
FROM here.routing_nodes_23_4 AS here_nodes --USING (node_id)
JOIN here_gis.streets_att_23_4 AS streets USING (link_id)
GROUP BY
    here_nodes.node_id,
    here_nodes.geom
ORDER BY ST_Transform(here_nodes.geom, 2952) <-> ST_Transform(
        ST_SetSRID(ST_MakePoint(-79.355866287, 43.691944099), 4326),
        2952
    )
LIMIT 10;

even after

CREATE INDEX ON here_gis.zlevels_23_4 USING gist ( ST_Transform(geom,2952) )

Seems it's still doing a sequential scan...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant