have we run out of convenient places to put panels? that's news to me, last i checked we still had a hilarious amount of free roof space and stuff like parking lots where we can just slap up the panels.
Putting a solar roofs over any open-air carpark you happen to own is just a hilariously easier option. Hell, you could erect these OVER the train tracks.
According to a completely un-sourced picture I found online, one carpark (in the USA) is typically around 5.5 x 2.6m, so if you had even 50 carparks on your site you could have ~715 square metres of panels. More, if you figure a way to cover the aisles between the rows of carparks too.
At the top end of all applicable figures (panel efficiency, solar irradiance, inverter efficiency), that could net you ~160kW at solar midday.
Now on the other side, standard-gauge railway is around 1.4m wide, and maybe you could cram a 1m width of panels between the rails.
That sounds like a lot - 1000 square metres per kilometre, and there are thousands of kilometres of railway lines out there - but it's harder to install, harder to service, gets dirty faster, is liable to get damaged, and now you have to figure out how to extract power from somehing a kilometre long, instead of an area that could be a square only around 35m (~115') on a side (for the above 50 carparks).
I know which one of those I'd want to run the cables for.
As has been pointed out many times when this dumb-ass idea comes up, only once you've exhausted every other possibility (carparks, rooftops, putting panels ABOVE roads/rivers/canals/cycleways/railways) and have literally no other viable installation locations, then we can talk.
solar canopys are actually quite expensive. Needs a very sturdy structure to hold panels high up and deal with wind loads. Solar panels are getting so cheap, that it becomes very reasonable to lay them on the ground instead of optimal angles, higher up.