Read files into ArcGIS Pro from the Spatial Hub

2024-04-19


Introduction

Data from the Improvement Service Spatial Hub can be mapped using ArcGIS Pro. Below are examples showing how this can be achieved using WFS pathways and shapefiles.

Web Feature Services (WFS) are a means of accessing geographic data via a file pathway, drawing directly from the Spatial Hub. The advantage of utilizing WFS files lies in their ability to fetch data in real-time from the Spatial Hub each time a map is refreshed. This approach is more dynamic compared to using static file types that are downloaded and stored on a local device (such as those in a downloads folder). Static files risk becoming outdated unless the source data is frequently checked and manually updated with the latest versions.

This guide assumes that the reader has already registered for a Spatial Hub Account. If this is not the case, please see our FAQ ‘How can I access the Spatial Hub?’ and register for a free account here.

On https://data.spatialhub.scot/ log in and navigate to your chosen dataset, it is essential that you are logged into your account at this stage, otherwise you will not be able to download the data.

This guide uses the ‘Air Quality Management Areas – Scotland’ dataset, available here, as an example:

Co-ordinate Reference Systems

All Spatial Hub datasets are provided in the OSGB 1936 / British National Grid (EPSG:27700) CRS, so please ensure that your ArcGIS Pro project is using the same CRS, otherwise datasets may display inaccurately.

Reading Shapefiles

Shapefiles are available for each dataset on the Spatial Hub.

Clicking the ‘Download’ button opens a drop-down menu offering a choice of Web Services, GeoJSON, Shapefile, or CSV.

Selecting ‘Shapefile’ will open a dialogue box with a dropdown menu offering you a choice of layers to download – most datasets only comprise one layer but some (i.e., Historic Environment Records) will have more.

Select your layer, click ‘Submit’ and then click ‘Accept and Download’ in the subsequent Terms and Conditions dialogue box. The layer will download as a zip file to your default download location (usually the ‘Downloads’ folder), from there you can copy it across to the source folder for your ArcGIS Pro project and then extract the files from the zip folder.

This screenshot shows the downloaded ZIP file, and the five extracted files that you will need to successfully load the shapefile into ArcGIS Pro.

In your ArcGIS Pro project, navigate to your source folder in the ‘Project’ tab of the Catalog pane, a .shp file should be visible in there (e.g., ‘pub_aqma.shp’ in the image below):

Click and drag this file into the ‘Contents’ pane, or right-click on it and select ‘Add to Current Map’ and the data will appear in your Map window. From here you can interrogate and format the shapefile however you wish.

WFS pathways

WFS Pathways are available for each dataset on the Spatial Hub. This section mainly deals with reading them into ArcGIS Pro, before offering some tips on filtering a WFS before download.

Reading WFS Pathways

On https://data.spatialhub.scot/ log in and navigate to your chosen dataset. Again, it is essential that you are logged into your account at this stage, otherwise you will not be able to connect to the web services.

Clicking the ‘Download’ button opens a drop-down menu offering a choice of Web Services, GeoJSON, Shapefile, or CSV.

Selecting ‘Web Services’ will open a dialogue box containing URLs for the dataset’s WFS and WMTS. The URL will include the authkey you will have been assigned when your account was set up.

In your ArcGIS Pro project, navigate to Insert > Connections > Server > New WFS Server:

Clicking on ‘New WFS Server’ will open a dialogue box.

Copy the URL for the WFS from the Spatial Hub dialogue box and paste it into the ‘Server URL:’ field. It is not necessary to alter the other options or fields, although it is possible to filter the WFS at this stage to avoid downloading superfluous data. Guidance on this is provided below.

Click ‘OK’. The WFS Server ‘WFS on geo.spatialhub.scot’ will appear in the ‘Project’ tab of the Catalog pane, with the dataset layer available via the drop-down:

Right-click on the layer name and select ‘add to current map’, or simply drag the layer into the Map window to add it to your plot.

Filtering a WFS

Although many of the datasets available via the Spatial Hub contain relatively few records and are mostly static, some (i.e., Planning Applications and Historic Environment Records) comprise very large and frequently updated datasets. Unless you really need access to an entire national dataset at once, we recommend that the larger datasets are filtered to enable you to download only those records that you want, and to minimize the demand on your system’s memory and processing power.

ESRI has produced a guide to the filtering process here:

(https://esribelux.com/2021/04/23/filter-data-wfs-in-arcgis-pro/).

The Spatial Hub also provides information on each dataset’s attributes, to allow you to decide how to filter them. On each dataset’s ‘front page’, click the ‘Info’ button (in the lower right corner of the screengrab below):

This will take you to a page with a preview map, a list of attributes, and additional information.

By following the ESRI guidance and using the attribute information available via the Spatial Hub, you will be able to filter your WFS and extract selected records according to your chosen attribute(s).