How to download and use OS stylesheets
Last updated
Last updated
Website
Ordnance SurveyData
OS Data HubIn this tutorial we are going to explain how to download Ordnance Survey (OS) data from the OS Data Hub and then access and apply our stylesheets which are ready made styles for our data products.
In order to access OS Data and APIs you will need to sign up to the OS Data Hub. There are 3 account types:
OS OpenData Plan – this is freely available to anyone or any business and gives you access to OS OpenData and OpenData APIs.
Public Sector Plan – if you work for a public sector organisation, you can access OS Premium data and APIs in addition to OS OpenData through the PSGA,
Premium Plan – gives you access to OS Premium Data and Services.
If you’re just starting out with OS Data, we recommend signing up a free OS OpenData Plan to get you started. To create an account on the OS Data Hub navigate to osdatahub.os.uk/plans
Create a free Data Hub account by selecting the purple Sign-Up button in the top right corner.
Choose the OS OpenData Plan on the left hand side.
Enter your email address and select Get verification code. A code will be sent to your inbox to input into the box below.
Once verified, click Next to input your details and create a password.
You are now signed up to the OS Data Hub and can access all the OS Open data and APIs.
To download OS data from the OS DataHub, go to the ‘Download’ tab and then on the left, select ‘OS OpenData downloads’. If you have a Premium Plan or Public Sector Plan you’ll also be able to see the premium data available to you.
You’ll be shown a selection of OS Products which are available for you to download. For this tutorial we are going to download OS Open Zoomstack which provides a great contextual basemap for projects but can also be used analytically. We have 6 house styles for this product – Light, Night, Outdoor, Road, Deuteranopia (GVD style) and Tritanopia (CVD style).
Click on the product and then in the ‘Data Format’ dropdown, select the data format you wish to download the data in. For this tutorial, please select GeoPackage as the Data format and then click the link next to ‘Download’ to start the download.
The downloaded file will likely by saved by default in your ‘Downloads’ Folder on your PC as a .zip file. Copy this file to your project folder on your computer and then right click and extract the data.
Our stylesheets are stored and managed on GitHub – if you’re not a developer, at first glance this may not look a very simple to use platform but getting the stylesheets is easy!
Go to: Ordnance Survey · GitHub
Scroll down until you see ‘Repositories’ and a search box. Type ‘stylesheets’ into the search box and you’ll find the stylesheet repositories for the different data products.
Note: The only set of stylesheets not accessed in this way is the OS NGD stylesheets – they can be found by searching ‘osngd-resources’.
To find the OS Open Zoomstack stylesheets you can scroll down and click ‘View all repositories’ or you can simply search for ‘zoomstack’. Click on the blue link to open the OS-Open-Zoomstack-Stylesheets repository.
The best thing to do at this point is to download the whole repository with all the stylesheets and supporting documents in it. To do this, go to the green ‘Code’ button in the top right and then ‘Download ZIP’.
The downloaded file will likely by saved by default in your ‘Downloads’ folder on your PC as a .zip file. Copy this file to your project folder on your computer and then right click and extract the data.
Once downloaded you can navigate through the folders on GitHub to look at what styles are available along with the ReadMe files which explain a bit more about the styles, any svg symbols you’ll need to download and the specific layer order you’ll need to replicate.
Before you open QGIS, check if there are any svg symbols accompanying the stylesheets. For OS Open Zoomsack, there are. Copy the ‘os-open-zoomstack-symbols’ folder from the stylesheet directory you just downloaded from GitHub and paste it in your QGIS programme file directory (in \apps\qgis-ltr\svg).
If there are any fonts that need installing (there aren’t for Zoomstack), copy the font file (.otf) into your systems font directory (on windows machines this is C:\Windows\Fonts).
Now, open QGIS. If you don’t have QGIS – this can be downloaded and installed on your PC (or macOS, or Linux) for free.
The first step is to load your OS Open Zoomstack data into QGIS. To do this you can either drag and drop your Zoomstack GeoPackage (.gpkg) data into the layers panel in QGIS or you can go to Layer > Add Layer > Add Vector Layer
Click the … next to Source > Vector Dataset(s) to browse for your data.
Navigate to the location where your Open Zoomstack GeoPackage is stored and then click ‘Add’
You’ll be asked which layers you want to add. If you just want certain layers, you can just select them now, but for this example we’re going to ‘Select All’ and then ‘Add Layers’.
The layers should now appear in your Layers panel. You can drag them into the correct order based on the layer order image in the GitHub repository folder (OS-Open-Zoomstack-Stylesheets/GeoPackage/QGIS Stylesheets (QML)).
To apply the stylesheets. Right click on a layer and go to Properties. Under the Symbology tab, go to Style > Load Style.
In the Database Styles Manager, select ‘From File’ under Load style and then select the ‘…’ next to File to browse for your style file.
Navigate to the GitHub repo you downloaded with the styles in it. Navigate to the correct data format folder – in this case the GeoPackage folder.
Next navigate to the stylesheets for the software you’re using (QGIS Stylesheets) and then your preferred style e.g. Outdoor style. Finally select the .qml file for the specific layer you need.
Click Open and then ‘Load Style’.
Your symbology window should now load with the layer symbology we have pre-designed for you.
Click ‘OK’
The style has now been applied to this layer. You’ll now need to repeat this for each layer in turn. For some of our stylesheets e.g. OpenMap Local, you may need to duplicate some of the data layers e.g. roundabout as there are multiple styles relating to this feature class (roundabout casing and roundabout fill).
Note: The styles we’ve created for you will already have viewing scales set meaning that not all layers will be turned on or visible at all viewing scales. If you want to change this or turn on/off other layers to fit your needs, you can.
Before you open ArcGIS Pro, check the GitHub repo folder to see if there are any fonts that need installing (there aren’t for Zoomstack). If there are, copy the font file (.otf) from the downloaded GitHub repo folder into your systems font directory (on windows machines this is C:\Windows\Fonts).
Open ArcGIS Pro and open a new blank Map view.
Before importing your stylesheets, in the labelling ribbon at the top, under the ‘More’ dropdown, turn on ‘Use Maplex Label Engine’.
If there is a .dic (dictionary file) for your product (check the GitHub repo folders for this), you will need to load it now. Click the Labelling drop down again, select ‘Abbreviation Dictionaries’. Click on ‘Options’ and choose ‘Open From File...’. Navigate to where the .dic is saved and select it. Click Ok.
Note: Open Zoomstack does not have a dictionary file.
Now you’re ready to add your stylesheets. Click on the ‘Add Data’ button in the ribbon at the top.
Navigate to the stylesheets repo you downloaded from GitHub. Make sure you use the stylesheets for the file type you downloaded (e.g. GeoPackage, shapefile, gml). In this case we want the Geopackage stylesheets. Next navigate to the ESRI stylesheets (LYRX) for ArcGIS Pro.
Note: ArcGIS Pro uses a LYRX file for styling. If this is not available for the product you are using, you can use the LYR file which should work but there may be a few bit you need to tweak. We are working on making LYRX files available for more products.
Navigate to the style you want e.g. OS Open Zoomstack – Night.lyrx (or .lyr)
Click OK.
The stylesheet will load but will likely appear in the Contents pane with red exclamation marks signalling that it needs to be shown where your data is stored.
Click on one of these exclamation marks. A file explorer window should open allowing you to navigate to where you saved your product data (e.g. Open Zoomstack GeoPackage). Select the layer you need and click ‘Add’.
If the file explorer window doesn’t open. Right click on the layer and go to Properties > Source > Set Data Source.
The exclamation mark should now disappear. You may need to repeat this process for each layer if it does not fix the other data links automatically.
Some of the layers in the Contents pane may correspond the same data layer as another layer e.g. woodland (national) and woodland (local) both relate to the main.woodland feature class.
The layers should already appear in the correct order however if you’re unsure, there are images showing the recommended layer order in the GitHub repository folder you downloaded.
Note: The stylesheets will already have viewing levels set meaning that not all layers will be turned on or visible at all viewing scales. If you want to change this or turn on/off other layers to fit your needs, you can.
Before you open ArcMap, check the GitHub repo folder to see if there are any fonts that need installing (there aren’t for Zoomstack). If there are, copy the font file (.otf) from the downloaded GitHub repository folder into your systems font directory (on windows machines this is C:\Windows\Fonts).
Open ArcMap and open a new blank Map view.
In the labelling toolbar in the top ribbon, turn on ‘Use Maplex Label Engine’. If you can’t see the labelling toolbar, right click on the top ribbon and turn the labelling toolbar on.
If there is a .dic (dictionary file) for your data product (check the GitHub repository folders for this), you will need to load this now. Click the Labelling drop down again, select ‘Abbreviation Dictionaries’. Click on ‘Options’ and choose ‘Open From File...’. Navigate to where the .dic is saved and select it. Click Ok.
Note: Open Zoomstack does not have a dictionary file
Now you’re ready to add your stylesheets. Click on the ‘Add Data’ button in the ribbon at the top.
Navigate to the stylesheets repository you downloaded from GitHub. You may need to ‘Connect To Folder’ to set up a new folder connection.
Make sure you use the stylesheets for the file type you downloaded e.g. GeoPackage, shapefile, gml. For this tutorial we want the GeoPackage stylesheets. The navigate to the ESRI stylesheets (LYR) for ArcMap.
Navigate to the style you want e.g. OS Open Zoomstack – Night.lyr
Click Add.
The stylesheet will load but will likely appear in your Contents pane with red exclamation marks signalling that it needs to be shown where the data is.
Click on one of these exclamation marks. A file explorer window should open allowing you to navigate to where you saved your product data (e.g. Open Zoomstack GeoPackage). Select the layer you need and click ‘Add’.
If the file explorer window doesn’t open. Right click on the layer and go to Properties > Source > Set Data Source.
The exclamation mark should now disappear. You may need to repeat this process for each layer if it doesn’t fix the other data links automatically.
Some of the layers in the Contents pane may correspond the same data layer as another layer e.g. woodland (national) and woodland (local) both relate to the main.woodland feature class.
The layers should already appear in the correct order however if you’re unsure, there are images showing the recommended layer order in the GitHub repository folder you downloaded.
Note: The stylesheets will already have viewing levels set meaning that not all layers will be turned on or visible at all viewing scales. If you want to change this or turn on/off other layers to fit your needs, you can.