Having lived in SF, LA and NYC, I find it very hard to believe that the homeless or the addicts roaming the streets in big cities are being thrown into jail for much of anything short of overt violent behavior. You can see people drop a deuce in the middle of Mission St any day of the week and nobody bats an eye. As people say, "it's just a normal part of life in a big city".
A few years ago I visited downtown SF for a convention at Moscone center. I remember walking along St Patrick’s thinking this is a beautiful place but , my God, the entire area stinks of urine.
Public urination is not a sex offence, it's a misdemeanor.
You don't get arrested for public urination. You get a citation, if you are drunk they might haul you to the jail for public intoxication, but you are out when you sober up.
As long as you don't pee near a school and what not you should be fine.