Homeless people are people. Society has an obligation to everybody, not just me. Unless your plan is "just imprison homeless people forever" then people are going to need be around homeless people while homelessness exists.
Imprisoning homeless people is not an acceptable solution, because imprisonment costs taxpayer money.
A better solution is to let the market work. If you can't afford the rent for a city, you shouldn't be allowed to be in that city at all, even in a prison cell. People who can't afford to live in an inhabited area should be permitted to camp in the wilderness.