The venue of any civil action may be changed by order of the court in the following cases:
- (1) upon written consent of the parties;
- (2) when it is made to appear on motion that any party has been made a defendant for the purpose of preventing a change of venue under section 542.10;
- (3) when an impartial trial cannot be had in the county wherein the action is pending; or
- (4) when the convenience of witnesses and the ends of justice would be promoted by the change.