Except as provided in section 558.15, if it is alleged in the complaint and established by evidence that the property, or any part of it, is so situated that partition cannot be had without great prejudice to the owners, the court may order a sale of the property or of such part, and for that purpose may appoint one or more referees; or when, without such allegation and proof, referees are appointed to make partition, who report that the property, or any distinct part of it, is so situated that partition cannot be had without great prejudice to the owners, and the court is satisfied that such report is correct, it may order the referees to sell the property or such part.