Suppose you go to a pub, drink a couple of beers. Suppose you drunk a beer too much, you don't want to take the car, so you take the bus. If you happen to hang out too late, and the bus stop circulating, you walk home. If you happen to live far away from the bar, on the way home you might feel the pressing need to relieve yourself somewhere, and then you might decide to stop at a corner in the city: the effect of your beer consumption is going to badly affect the citizens who have to bear the horrible smell of your, ehm, former beers. Imagine the corner is just next to a shop where people buy fresh food: the owner of the shop is certainly going to suffer from your decision.
So what can the owner do? In this irish town, a guy had the brilliant idea to put an electric device: in front of his shop, people are warned with a sign like "electric current in operation, urinate at your own peril". Some people were so drunk that got their electric shock (ouch!). Maybe the device is the most brutal/efficient solution, but the city mayor is thinking about an alternative. One that I like is "name-and-shame": take pictures of public urinators and upload them on a website. These could be done by people, or by installing cameras outside places where people tend to urinate... a modern pillory.