Closing a set of contour lines and filling with contour gradient