As a proof of concept, I want to use FME to find lines not connected to, touching or near any other lines. The nearness would be user defined e.g. keep lines within 10 metres of another line. I can't find an existing answer so I'm posting my solutions. I was inspired by @redgeographics answer to:
https://knowledge.safe.com/questions/42455/lines-connected.html
The first solutions has 2 options for pre-processing. Either buffer the input lines by the amount required to take care of undershoots. This will obviously create polygons. Or use the LineExtender to do a similar job. The difference with the LineExtender is the direction of the extensions at each end (see documentation).
Then send the pre-processing result to both the Requestor AND Supplier ports of the SpatialRelator. Choose the Intersects and Touches tests (regardless of whether you're using buffered or extended lines). Select ObjectID (or other primary key) as the attribute that must differ. Results with _related_candidates values of 0 (zero) are the lines not connected. A Tester could be used to filter the data to keep, or to filter the unwanted lines to do a DELETE fme_db_operation on the source data.
The second solution is to use the NeighborFinder in CandidatesOnly mode. Set a Maximum Distance to included or excluded non-intersecting/non-touching lines for your desired tolerance. The Matched port will contain the features to keep. The UnmatchedCandidate port had more than just the unwanted lines. I don't know why but I'm not that familiar with the NeighborFinder so there may be a setting I need to tweak. This solution is more elegant in the sense it doesn't involve doing any modifications to the input data.
I've attached my test data in a zipped ShapeFile.