Section 5. No portion of a state institution shall be taken for a public way, canal, railroad or railway without leave of the general court specially obtained. No portion of a highway, public building or cemetery shall be taken for railroad purposes outside the limits of the route fixed for such railroad without the consent of the town in which the land sought to be taken is situated. No portion of the land taken for or held as a park by a town under chapter forty-five shall be taken or used for a public way, canal, railroad or railway, or for altering or widening the same, without the approval of the board having control of the public parks of such town. No portion of a common or park dedicated to the use of the public, or appropriated to such use without interruption for a period of twenty years, shall be taken or used for a public way, canal, railroad or railway, or for altering or widening the same, except with the consent of the city or town in which such common or park is situated after public notice, given in the manner provided in cases of the laying out and alteration of highways, stating the extent and limits of the portion thereof proposed to be taken. Such consent shall be expressed by a vote of the inhabitants, if ten or more voters file a request in writing to that effect with the selectmen or aldermen within thirty days after the publication of the notice; in the absence of such request, consent shall be presumed. In a city such vote shall be taken by ballot on a day appointed for the purpose by the aldermen, which may be the day of any election. Notice that such vote is to be taken with a statement of the question to be voted upon shall be given by the aldermen in the manner provided by law for giving notice of city elections, fourteen days at least before the day appointed therefor, and all provisions of law relative to elections consistent herewith shall be applicable to such vote, and a certificate of the result shall be recorded by the city clerk.