This actually arises from a question I recently saw in a forum. The person asked whether it was a good idea to carry ID with you when you explore. Her primary objection was not wanting to show it to Security Guards if caught trespassing.
In Canada, if you choose not to show your ID to Security Guards, you are under no obligation to. In fact, most won't even bother asking you. They have no way to verify its authenticity anyway.
With the police, however, things become slightly more complicated. Under Canadian law, you are not obligated to show ID to the police either. The burden of proof of your identification rests with the Crown, with the police as Crown agents.
The downside, however, is that the police will detain you while they attempt to identify you.
So, when asking the question of whether or not to bring ID, my suggestion is, bring it. You do not have to surrender it to Security Guards, but it's a good idea to surrender it to police. If you have nothing to hide, there's no point further escalating the situation. If you do have something to hide, they're going to find out anyway, and all you're doing is prolonging the inevitable.
Just make sure you put your ID somewhere you won't lose it while exploring.