A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

2

A little help for the Nearest Neighbor approach: WITH pts AS ( SELECT <id>, dmp.path[1] AS seq, dmp.geom FROM <lines> AS ln, LATERAL ST_DumpPoints(ln.geom) AS dmp ) SELECT pts.<id>, pts.seq, nw.<id>, ST_LineLocatePoint(nw.geom, pts.geom) AS frac FROM pts CROSS ...


Top 50 recent answers are included