Fergus has never (thank god) done this. But Hamish does "anger pee" on things.
If we are in the pool he works himself into a total state running around the edge barking at the splashes so we keep him IN the house if we are playing in the pool with a lot of kids or splashing....well, he doesn't like to be in if we are out and if he gets angry he pees right in front of the door we use to come in from the pool or on my kitchen island (about 3 feet away). He only does this if we exclude him from something or he is mad.
He is the only dog I have ever had would willingly, hike a leg intentionally. (and I want to note that Hamish can "hold it" like 11 hours! he has plenty of times if we sleep late or something)
so, ask yourself if YOU or someone close to you is doing something he doesn't like. He is sending you signals.