If the legislative body of the local agency in which the public square is located finds that the highest and best use to which the land may be put is the erection thereon of the proposed public building, it may provide by ordinance that the public square may be used as a site for the proposed public building or, if located in a city and it is the intention of the city to grant or lease the public square to the county, that it may be granted or leased to the county for the erection thereon by the county of the proposed public building.