(a) When Ordered--Improper District.

The court shall order a change of venue upon motion and showing that the action has not been prosecuted in the proper district.

(b) When Ordered--On Motion.

The court may order a change of venue to another district in the same county, if any, or otherwise to an adjacent district in another county if the defendant consents: (1) Upon written agreement of the prosecuting authority and the defendant; or (2) Upon motion of the defendant, supported by affidavit, that the defendant believes he or she cannot receive a fair trial in the district where the action is pending; or (3) Upon motion of either party that the convenience of witnesses or the ends of justice would be served by such change; or (4) Upon motion of either party or the court, to a district where a custodial facility is located, if the defendant is incarcerated therein and transporting the defendant is not practical. (5) Upon the courts own motion, if all of the judges of a district are disqualified from hearing the case. The court may also order a change of venue to the district in which the county seat is located, if the defendant consents.

(c) Procedure on Transfer.

When the court orders a change of venue it shall direct that all the papers and proceedings be certified to the court of the proper district. The defendant and subpoenaed witnesses shall have a continuing obligation to appear and attend as required.