Method for Joining Intersected Contour Lines Intelligently