Ugh, almost all modern cities have solved this. SF can solve this too. You force the homeless out of the city and attempt to rehabilitate where you can.
Also, this is definitely not a federal problem. At most it’s a Cali problem. This is how the US works, local jurisdictions deal with the local problem.