Whatever you do, a solar panel on a roof will *always* be more efficient than one on the floor.
First of all, obviously, there will not be people walking on them (except maybe for repairs)
They cannot be angled into the sun.
Keeping them out of range will also reduce damage.
Regarding roof space: I only found a study regarding this for Germany, in German.
https://www.ise.fraunhofer.de/content/dam/ise/de/documents/publications/studies/studie-100-erneuerbare-energien-fuer-strom-und-waerme-in-deutschland.pdfAccording to this study, that is already 8 years old, there are about 2.845 square kilometers of area in Germany that are useful for solar panels. *Not* including free space that could be used for something else. Of this usable space, 1.200 square kilometers are roofs.
Using solar energy as part of an energy mix would require about that area...
Mind you, those numbers are eight years old, solar panels have gotten more efficient, and roof area has increased.
As long as you are not in an area with heavy snow, it is not all that expensive to build a roof over, say, a parking lot. It does not even have to cover the whole lot. Just an area the size of the pathways of the lot would be more efficient.