When it is necessary for the construction of a railroad to intersect or cross any watercourse not navigable or any public highway, the company may construct such railroad across or upon the same if the Commissioner of Transportation judges it necessary and authorizes it by his order. Such company shall restore such watercourse or highway to its former state or in a manner not to impair its usefulness. If any highway is so located that such railroad cannot be judiciously constructed across or upon the same without interfering therewith, such company may, with the consent of the commissioner, cause such highway to be changed or altered, so that such railroad may be constructed on the best site. Such company shall put such highway in as good situation and repair as it was previous to such alteration, under the direction of the commissioner, whose determination thereon shall be final.