Water Resources Q

I keep hearing about processes for turning raw sewage into drinkable tap water, most recently in Santa Clara, CA. I could see why this would be a boon to, say, the International Space Station or someplace in the middle of a desert, but why can’t Santa Clara–on San Francisco Bay–use a similar process to get drinking water from the sea? Is salt trickier to get rid of than raw sewage? Why would the process work on one and not the other?

It’s my understanding that desalinization is very expensive and requires a lot of energy, which is what you need to do if you wanted to drink ocean water.

sea water is very concentrated with the worst possible type of contaminant, ionic atoms. It should be more expensive to clean that up than anything else.
The process is reverse-osmosis, which uses electrical power to drive the ions out.

Sewerage is only slightly contaminated with life forms and at worst molecules to start with … these can be settled out and micro-filtered , which doesn’t consume power to operate (as long as the water flows through the filter… )

From here it looks like it costs about fifty cents to dollar per 265 gallons on top of cleaning it. So if you can just clean it, that’s going to save quite a bit of money.