(a) (1) A Maryland railroad company may:
(i) cross or divert a highway whenever necessary for the construction of a railroad;
(ii) at its own cost and expense, carry a highway over its track by an overgrade crossing, or under its track by an undergrade crossing if the Maryland railroad company considers that the highway crossing is dangerous; and
(iii) exercise the powers of condemnation, under Title 5, Subtitle 4 of this article and Title 12 of the Real Property Article, to acquire additional property and rights necessary to construct an overgrade or undergrade crossing.
(2) Whenever a Maryland railroad company crosses or diverts a highway, it shall, without necessary delay, return the highway to its former usefulness.
(b) (1) Overgrade and undergrade crossings shall be at least 20 feet wide, and the grades approaching the crossings may not be greater than a rise of 6 feet in one hundred.
(2) The height of an undergrade crossing from the surface of the roadway shall be at least 14 feet.
(3) When constructing the approaches to an overgrade or undergrade crossing, the Maryland railroad company may change the grade of the road or highway to be carried on the new crossing.
(4) If the grade is changed under paragraph (3) of this subsection:
(i) the grade change of the road shall be at the expense of the Maryland railroad company; and
(ii) the Maryland railroad company has the same rights and liabilities that county officials have in changing the grades of public highways.
(c) (1) Except as provided in paragraph (2) of this subsection, whenever a Maryland railroad company constructs an overgrade or undergrade crossing, all grade crossings within 600 yards of the new crossing may be closed by the Maryland railroad company and another crossing may not be opened within 600 yards of the new crossing.
(2) The prohibition against the maintenance and opening of a grade crossing within 600 yards of a newly constructed overgrade or undergrade crossing does not apply:
(i) in a municipal corporation, without the consent of the mayor and council; and
(ii) in an unincorporated area of a county with a population of 2,000 or more people, without the consent of the local governing body.