Using PostgreSQL and PostGIS. I have two sets of point data (geoms), one is a node graph indicating roads and the other represents street crossings. For my set of crossing data I want to find the single closest node to all the crossings. And use these geoms for further analysis. However, I am having trouble with nearest neighbour techniques as they mainly seem to only function for one point instead of for a set of points e.g.
SELECT
streets.gid,
streets.name
FROM
nyc_streets streets
ORDER BY
streets.geom <->
(SELECT geom FROM nyc_subway_stations WHERE name = 'Broad St')
LIMIT 10;