To be there legally ANY cop has to have reasonable suspicion in order to demand Identification and temp. detention.
The significance of this is something that seems lost on a lot of people here, too.
If a cop is asking you for ID, that means you are a step away from being arrested. The cop's job is to apprehend criminals, and there might be legitimate reason to suspect that you are one.
It's entirely possible that, say, you match the general description of a guy who robbed a store down the street or something. It's in your interest to be polite, but you can't assume that, because you are innocent of any crime, you are not suspected of one, for reasons outside of your control, or the cop's control.
You may have to show a court that you are innocent. That's why this isn't a great time to be waiving your rights willy-nilly. The problem with case law is that it's very easy for you to waive your rights, and nobody has to tell you that you are, apart from a Miranda reading when you're arrested. That's your responsibility.
I know and like a lot of cops. I tend to be polite to people. However, I know of various incidents that show me that cops (and prosecutors) are not all good guys. Most incidents never make the news like the Duke Lacrosse Team did.
That's the point, really. I also avoid negative interactions with the police by not being a criminal in the first place. Duh.
But in a given situation, it would be foolish for me to throw away my rights when I might really need them, because I really don't know what's going on at that point.