If they really want to throw the book at you for relieving yourself, they can charge you will some sort of sexual crime and have you put on a sex offender's list. For taking a piss.
I vaguely remember reading somewhere, and correct me if this is totally wrong, that it's safer to pull down your pants completely and squat like you're dumping so that the action can't be purposely misconstrued as "exposing yourself" vs "relieving yourself" in a court of law. Again, please don't take this as legal advice, it's a vague memory and even if I did read and remember it correctly, it might have been bullshit in the first place.