Complex sentence: Buildings had to be raised on piles, so that they would not sink in summer, and the main processing plant had to be built on a better ground found 20 km away from the mine.
Split into simpler sentences: Buildings had to be raised on piles, so that they would not sink. The main processing plant had to be built on better ground, found 20 km away from the mine.