mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 19:07:58 +00:00
interpolations: snap lines to points, not vice versa
Avoids the occasional rounding problem which might occur when splitting a line anywhere but on a support point, see postgis doc for ST_Split. Fixes #253
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user