By David Crowther
Question:
Can you use the OS Places API Search within QGIS?
Answer:
Yes this is possible, follow the steps below to find out how I did this with an experimental QGIS plugin.
Step 1 – Sign up to the OS MAPS APIs
First you will need to ensure you have signed up to the OS Data Hub – https://osdatahub.os.uk/
Once you have signed up and created a Project you can choose to add the OS Places API to your project.
Once it has been added to your project you will have an endpoint address which also contains your API Key – you will need the API key later.
Step 2 – Download and install a QGIS Plugin
Currently (at time of writing) there wasn’t an available plugin to access the OS Places API, but with a little googling I found this GitHub download page with the python code for an experimental plugin.
https://github.com/paulwithy/QGIS-OS-Address-Search
From the Code option choose Download ZIP.
And then extract the zip into a folder in your QGIS plugin’s location – likely here - C:\Users\yournamer\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
https://gis.stackexchange.com/questions/274311/what-is-the-default-plugin-folder-location-in-qgis-3
Step 3 – Use the QGIS Plugin
The next time that you open QGIS, the Plugin will be auto added. This plugin is a blue magnifying glass button.
When you open the tool you will need to enter the API Key and save it for re-use.
Once the API Key is registered you can the start to run searches for address records using the OS Places API… for example run a postcode search.
Choose to Zoom to result and the map will update to find the address record, placing a marker in the map.
If your search returns multiple records they will be listed in the Result drop down.
There is also an option to Display all Addresses in the current map widow, and this will create a QGIS layer of those addresses where you can also view the attribute information.
Comments (0 comments)