Different types of soil determine how deep the foundation ... of black cotton soil is dangerous to the walls of a building’s foundation as it swells up and exerts pressure on the walls.