I would like to add one more point to mr. nipple's excellent and accurate writeup. There is one more desperate last ditch place (best for a semi populated street) for a male (or a particularly exhibitionistic woman) to pee in New York. It requires extreme need, drunkenness or punk rock chops to pull off, but for me is a true badge of your New Yorkerness.

And it go a little something like this:
Walk up to a phone booth, pick up the receiver and have out your one Chester A. Arthur (that is the wedding tackle). Then whilst pretending to scream at your broker or your mom, pee. No one will call you on it except a cop because it is more or less too crazy of an act for anyone to acknowledge. There are no more full (superman changing booth) phone booths in New York and the newest ones are tiny and built for people who didn't get enough protein as a child, but the middle generation phones will let you have a decent amount of cover.

Watch for splashback. Watch for po po.

Remember that a ticket for public urination is worth 5 punk rock points and happy tinkling.