The most direct way to discourage public urination would be to build more public bathrooms. San Francisco is taking a much splashier approach to the problem: pee on the wrong wall, and watch as your stream explodes into hundreds of droplets that spray on your legs.

To curb public urination, the city is testing out Ultra-Ever Dry, a Florida-sold superhydrophobic coating that violently repels liquids. Nine walls have received the treatment in the city’s odoriferous Golden...