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.