Subscribe to this thread
Home - General / All posts - Intersection Points
atrushwo71 post(s)
#01-Jul-20 17:14

Hello Everyone,

Given two drawings of lines [a] and [b], how would I get the points where the lines intersect in Manifold 9? Apologies if this is too simple, I couldn't find any documentation in the forums or the users manual. I've tried the following:


   GeomIntersectLines([S_GEOM],[O_GEOM], 0) AS [GEOM]

FROM (TABLE CALL GeomOverlayIntersecting([A][B], 0))

atrushwo71 post(s)
#01-Jul-20 18:45

I figured it out. The above query is fine.

The problem was that coordinate system metrics were different between the two drawings... I don't know if its possible to resolve this, but issues like this represent a significant barrier to new users.


9,320 post(s)
#01-Jul-20 19:14

Whew. I thought your SQL looked fine, I'm glad my eyes aren't completely bung.

It is easy to resolve the issue of different coordinate systems in SQL. There are loads of examples (search on CoordConverterMake) and it is well documented.

Necessary, but easy.

It would be wrong for this to be automated within SQL, because manual choices sometimes matter (e.g. about conversion paths).

It is effectively automated for transforms, of course. Default conversion paths are used. (That is not always best, but there must be some default.)

New users tend to use transforms, before SQL. That is my assumption.


9,299 post(s)
#02-Jul-20 13:06

I see that the problem was related to the coordinate systems and was resolved. That's great.

A minor side note: you don't have to write ... FROM (TABLE CALL ...). You can just write ... FROM CALL ..., omitting parentheses and TABLE.

RAR30 post(s)
#02-Jul-20 13:45


The GeomIntersectLines assumes that we have two different drawings, what if we just have one drawing and trying to find the intersection points like in the uploaded project please?

Thank you all.



9,299 post(s)
#02-Jul-20 13:52

That's fine, you just cite the same drawing twice in the call to GeomOverlayIntersecting:


SELECT GeomIntersectLines([s_geom],[o_geom], 0) AS [geom]

FROM CALL GeomOverlayIntersecting([drawing][drawing], 0)

WHERE [s_mfd_id] < [o_mfd_id];

The WHERE does two things: removes self-intersections ([s_mfd_id] = [o_mfd_id]) and counts each intersection only once (otherwise if [s_mfd_id] = 1 intersects [o_mfd_id] = 2, it would be counted twice, first as 1 intersecting 2, and then as 2 intersecting 1).

RAR30 post(s)
#02-Jul-20 14:05


Thank you Adam.

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