I have two sets of line segments that should basically overlap, but not exactly, and I want to see where they don't match up well.
I've come up with this idea to flag the locations where there is a bad match. For each line segment in set A, find the point on that line segment that is farthest from any point on any line segment in set B, and find the distance from that point to the closest line segment in set B. That distance is the badness score for that line segment. Then I can rank the line segments in A based on that score, or have a threshold, or whatever. And I can run the same algorithm the other way to find bad line segments in B.
I've found algorithms for finding the nearest line segment to a point, but not for finding the point on a line segment that is furthest from its nearest line segment.
12/20/12 Here's a picture I'm adding to clarify things because I couldn't put preformatted text in the comments.
____________________ A _____ _____ B C
CoffeMath's answer isn't exactly what I am looking for. If I understand correctly, his algorithm would say there's a point on A that is 15 units away from B, and there's a point on A that is 15 units away from C. Take the min of those, so the score is 15. But the endpoint of A that is 15 units away from B is really close to a point on C, and vice versa. What I'm looking for is that there is a point in the middle of A that is 5 units away from B and 5 units away from C. It has the maximum distance from any point on B or C.
Imagine I have two roadmaps in vector graphics format (bags of line segments) and I want to find places on one map that have no overlapping places on the other map, but I can't compare the line segments one to one because they are chopped up into line segments differently.