The standard ought to be they have or imminently are going to harm others. Like actually harm a real victim, criminally by violence or taking property. If they want to live in a gutter worshipping lizard king, well, not everyone has the same idea of the pursuit of happiness.
As a society building a public space, do we not get a say in how it's used? If you cannot find a place to live without blocking a sidewalk, one will be provided for you. That place will not let you take hard drugs indefinitely.