Any railroad company may change the location of a part of its route for any section not exceeding one mile in length by filing and recording a survey of the new location and of the section abandoned with the secretary of state where in the judgment of the directors, such change is necessary to avoid any physical obstacle interfering with the safe and convenient construction, maintenance or operation of the railroad.
Such alterations shall not be made in any city after the road has been actually constructed within its limits.
N.J.S. § 48:12-38