Whenever the State, county, city, village, incorporated town, township or road district authorities lay out a new road, street or highway, or alter, widen or relocate existing roads, streets or highways, and for such purposes require lands used for school sites, or land owned for school purposes, the trustees of schools or school officials having legal title to such lands have the power, with the consent of the school board of the district, to sell and convey to the State, county, city, village, incorporated town, township or road district the land required for such purposes, or may dedicate to public use for street and highway purposes as much of said school land as may be necessary to open, extend, alter, widen or relocate any street or highway which may be required by the municipal authorities to be opened, extended, altered, widened or relocated, if they are of the opinion that the benefit to accrue for the opening, extending, altering, widening or relocating of such street or highway will compensate for the strip so dedicated.
105 ILCS 5/5-29