]> git.openstreetmap.org Git - nominatim.git/blob - sql/postgis_20_aux.sql
tablespace definition belongs before the where clause
[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(line, ST_ClosestPoint(line, point));
8 END;
9 $$
10 LANGUAGE plpgsql;