Whenever the board of supervisors of any township and the governing body of any incorporated city shall receive a petition praying for the location of a road or for the altering or discontinuing of any road on the line between such township and such city, such road may be laid out, altered, or discontinued by the action of both boards. The provisions of this chapter applicable to the laying out, altering, or discontinuing of a road on the line between two townships are applicable to a road on the line between any township and an incorporated city.