The court in which an action is pending for the recovery of real property or for damages for an injury thereto, or a judge thereof, on motion, upon notice by either party, for good cause shown, may grant an order allowing to such party the right to enter upon the property and make survey and measurement thereof and of any tunnels, shafts, or drifts thereon for the purpose of the action, even though entry for such purpose has to be made through other lands belonging to parties to the action.
N.D.C.C. § 32-17-14