]> git.openstreetmap.org Git - nominatim.git/blob - sql/postgis_20_aux.sql
moved bIncludePolygonAsPoints related logic into lib.php, added tests
[nominatim.git] / sql / postgis_20_aux.sql
1 -- Splits the line at the given point and returns the two parts
2 -- in a multilinestring.
3 CREATE OR REPLACE FUNCTION split_line_on_node(line GEOMETRY, point GEOMETRY)
4 RETURNS GEOMETRY
5   AS $$
6 BEGIN
7   RETURN ST_Split(ST_Snap(line, point, 0.0005), point);
8 END;
9 $$
10 LANGUAGE plpgsql;