Section 2. Whenever, in the opinion of the county commissioners of any county, a hospital for the care of contagious diseases appears to be necessary or advisable, the said county commissioners may either locate such a hospital on the grounds of the county poor-farm or may purchase a suitable location in some other locality; provided such locality is not within, or close to, the built-up portion of any city, borough, or village, and not within one hundred (100) feet of any public highway.