To follow this article, you'll need QGIS 3 installed, and an account with geoscape.app to access the data.
Geoscape building heights come with an attribute for the roof colour in hexadecimal. This is based on the average colour of the predominant roof material. By changing the styling of building features from Geoscape, we can display this colour while working in QGIS.
These changes don't alter the shapefile in any way, and will persist until the layer is removed or QGIS is closed.
1. Access the data
First log in to geoscape.app.
The panel on the left hand side of the screen shows recent orders. If you have already placed an order including the heights attribute, you can use that data. Or if you haven't yet placed an order, you can follow along using the sample data.
Click the download button next to Buildings sample (or download your own order which includes heights).
You can drag and drop the downloaded zip file directly into QGIS.
2. Add the file to QGIS
Once you open the zip file in QGIS, it will detect multiple shapefiles inside. We only need the buildings for now, so click Deselect All, then click on the row with 'building_1.shp' as the Layer name, and click OK.
QGIS will load the buildings layer and display it on the map. A colour is automatically chosen at random to style a polygon layer, in my case green:
3. Change the styling
To change the styling, open the styling panel by left-clicking Open the Layer Styling panel (or click F7)
Once the Layer Styling panel appears, click Simple Fill
Beside Fill color, click on Data-defined override
In the drop-down that appears, mouse over Field type: string, and then click roof_clr
As soon as you do, the colour of the buildings will change to their roof colour attributes.
4. Style features with no roof colour attribute
Some of the buildings are still showing in green, this indicates that the roof colour field is empty for these buildings. You can change the colour for these buildings by clicking the coloured space next to Fill color
This opens the Select Fill Color menu. From here you can enter a colour as a hex value, RGB, HSV or by clicking directly on an area in the colour palette.
I've set mine to teal, so I can easily distinguish if a building is showing the true roof colour.
Next click Apply.