Whenever a highway crosses a railroad track at grade and such grade crossing is out of repair, if it is the judgment of the commissioner of transportation, the board of supervisors of a county, the board of aldermen of a city, the board of trustees of a village or the town superintendent of highways of a town that the same should be repaired, the commissioner of transportation, the board of supervisors of a county, the board of aldermen of a city, the board of trustees of a village or the town superintendent of a town may repair and maintain the same and charge the expense thereof to the railroad company over whose railroad such crossing is repaired and maintained, if after fifteen days' notice in writing such railroad company neglects or refuses to repair the same.
N.Y. High. Law § 51