You can use a Snapper to correct issues like Picture 2. (Depending on the tolerance and snapping type it may do weird things in picture 3.)
You can also use the Intersector or TopologyBuilder to ensure the lines are properly noded.
To identify them, dangle lines can be identified by the ToplogyBuilder (Nodes with only one edge), for lines that cross, maybe a SpatialRelator with the lines being sent to both ports and attributes that must differ set to a unique ID for the line. Predicates to Test would be both Touches and Intersects.
If the lines both touch and intersect, then they "intersect" at the ends, which is good, if they only intersect, but do not touch, then they are a case like picture 3.
You can use a Snapper to correct issues like Picture 2. (Depending on the tolerance and snapping type it may do weird things in picture 3.)
You can also use the Intersector or TopologyBuilder to ensure the lines are properly noded.
To identify them, dangle lines can be identified by the ToplogyBuilder (Nodes with only one edge), for lines that cross, maybe a SpatialRelator with the lines being sent to both ports and attributes that must differ set to a unique ID for the line. Predicates to Test would be both Touches and Intersects.
If the lines both touch and intersect, then they "intersect" at the ends, which is good, if they only intersect, but do not touch, then they are a case like picture 3.
Thank you very much, this is helpful.