The Prophet forbade praying in the middle of the road, or defecating there, or urinating.

Sunan Ibn Majah Book 1, Hadith 64