In an action in any district court of this state wherein the title or right of possession to any mining claim is in dispute, the court, upon the application of any of the parties to such suit, may enter an order for such survey of the underground as well as the surface of such part of the property in dispute as may be necessary to a just determination of the question involved. Such order must designate some competent surveyor who is not related to any of the parties to such suit and who is not interested in the result of the same. Upon the application of the party adverse to such application, the court may appoint some competent surveyor selected by such adverse applicant, who shall attend upon such survey and observe the method of making the same. Such second survey must be made at the cost of the party requesting it. Such order may specify the names of witnesses named by either party, not exceeding three on each side, to examine such property, and such witnesses may enter into such property and examine the same. The court may cause the removal of any rock, debris, or other obstacle in any of the drifts or shafts of such property when such removal is shown to be necessary to a just determination of the question involved. No order may be made for a survey and inspection except upon notice of the application for such order of at least six days, and not then except by an agreement of the parties or upon the affidavit of two or more persons that such survey and inspection are necessary to the just determination of the suit. Such affidavit must state the facts in the case and wherein the necessity for the survey exists. Such order may not be made unless it appears that the party asking for the same had been refused the privilege of survey and inspection by the adverse party.
N.D.C.C. § 38-02-15