X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c755733b03a1a5c4a1243af09bee5af7f3a226d3..00cd69ea237c44fa76d450739240fab3223b845f:/sql/postgis_20_aux.sql?ds=sidebyside

diff --git a/sql/postgis_20_aux.sql b/sql/postgis_20_aux.sql
index dc74e093..749e2a43 100644
--- a/sql/postgis_20_aux.sql
+++ b/sql/postgis_20_aux.sql
@@ -4,7 +4,7 @@ CREATE OR REPLACE FUNCTION split_line_on_node(line GEOMETRY, point GEOMETRY)
 RETURNS GEOMETRY
   AS $$
 BEGIN
-  RETURN ST_Split(line, ST_ClosestPoint(line, point));
+  RETURN ST_Split(ST_Snap(line, point, 0.0005), point);
 END;
 $$
 LANGUAGE plpgsql;
