In Switzerland, which is quite densely populated, they even have a pilot project with putting solar panels between rail road tracks:
https://www.swissinfo.ch/eng/emissions-reduction/solar-energ...
https://www.swissinfo.ch/eng/emissions-reduction/solar-energ...