These are really just row upon row of 6 inch nails placed on the ledges and pipes above laneways and concourses. Often seen downtown.

They give a pigeon a poke in the ass if they attempt to rest there. The spikes are intended to prevent the pigeons from shitting all over the pedestrians and motorists.

Do we really have a right to be there, to the exclusion of these poor creatures?
yes, we have the brain and tech to get those spikes up there.

There is also a more "humane" form of getting rid of these and other birds is something called Sticky toes. It's a liquid you spread on the area to be kept free of these animals. It does no harm to them whatever, they just don't like the feel of stickytoes, so they choose to land elsewhere.

see: Conditioning