point on a line segment furthest from its nearest line segment 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.
 A: What I was looking for is called Hausdorff Distance.  It is described well in this paper:
http://mapcontext.com/autocarto/proceedings/auto-carto-12/pdf/computation-of-the-hausdorff-distance-between-plane.pdf
A: For each pair of intetrvals $(I,J)$ with $I \in A$ and $J \in B$, compute the four squared distances between each endpoint of $I$ and each endpoint of $J$, and let the maximum of these four squared distances be called $m(I,J)$. Now for each fixed $I$ find the minimum of the numbers $m(I,J)$ and call that $f(I)$. Then $f(I)$ is the square of the score for interval $I$. The interval $I$ with the largest value of $f(I)$ is in some sense the "worst" of the intervals $I \in A$, and a similar thing can be done for each fixed $J \in B$, to find the "worst" of the intervas $J \in B$.
The suggestion to use squared distances is made since some programming situations have trouble with accuracy on comparing squareroots of decimal numbers.
The fact that max distance between a particular $I$ and $J$ occurs at an endpoint is fairly easy to see by making a few pictures.
By the way I just noticed that copper.hat in a comment made the same remark about the max distance occuring at an endpoint. 
