That’s why my suggestion is to offer them the choice to willingly use a shelter or go to jail. Homelessness and drug abuse can not be allowed to exist to keep public spaces safe.
You can't jail someone for not sheltering themselves. That would most probably violate their civil rights and would not survive a test in the courts.