Section 98. If the railroad is constructed to pass over the way, a sufficient space shall be left under the railroad conveniently to accommodate the travel on the way. If the railroad is constructed to pass under the way, the railroad corporation shall build such bridges, with their abutments and suitable approaches thereto, as will accommodate the travel upon the way; but no bridge for any purpose shall be constructed over a railroad at a height less than twenty-two feet six inches above the track of such railroad, except with the written consent of the department.