Yes, purification of water is doable, but the amount of energy it takes makes the process uneconomical on a large scale. It usually takes the form filtering then distillation. Distillation isn't difficult, it's a simple process of boiling contaminated water, catching the water vapour then allowing said vapour to cool. The cooled vapour is now pure water with no contamination. It works, but trying to do it on the kind of scale you're referring to is very difficult. The equipment necessary would be expensive and one would need a fuel source to boil the water, which is costly and would have a large environmental impact.