Subscribe to this thread
Home - General / All posts - Split Line with point - M8

1,736 post(s)
#26-Apr-18 14:26


I cannot find any Transform tool to split a line with a point in M8. Nor any spatial SQL extension to do this. Any suggestion to achieve this ?

SQL is really what I'm after. I have lines that are made of multiples segments. There is a point on each line and I want to break the line in two parts at the point location.

Thank you !


1,736 post(s)
#26-Apr-18 14:46

The SQL's Split BY clause came back to my mind. I should be able to achieve my goal with that isn't ?


8,474 post(s)
#26-Apr-18 15:08

What you want is the Spatial Extension function IntersectLine(line, geom). The second argument can be a point.


1,736 post(s)
#26-Apr-18 15:58

I tried that at first, but it doesn't return anything but the input line, not splitted. My query was badly written I guess.

I just made the most simple example I can think of and it works. The line still have to be exploded after to obtain distinct lines. This was not obvious. Other GIS I know do this in one step.

Also, in the Transform Toolbar, Intersect Lines requires lines in both input fields. This made me doubt about using the SQL extension.

So, to complete my query, I simply add a SPLIT BY Branches ?

Thanks again


8,289 post(s)
#26-Apr-18 16:14

More or less.

See attached MAP file. The query:


SELECT intbranch FROM (

  SELECT IntersectLine(A.ID, B.ID) AS intline FROM A, B

SPLIT BY Branches(intline) AS intbranch

Whether or not a point is on a line is determined by the value of the location precision parameter (of the drawing that contains the line, IIRC).



1,736 post(s)
#26-Apr-18 17:05

Got it. Thank you for the syntax.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.