There are two possible ways of loading and displaying the shapefile data in ESRI ArcGIS. The shapefile data can be loaded straight into ArcGIS. However, if more than one 25km² tile is being loaded, the rendering performance can become an issue. The recommended way of loading the data is to use a file geodatabase to house the data. This is the method which will be described in this guide.
Open ArcCatalog. Choose a folder where the file geodatabase is to be created.
Right-click on the folder and in the context menu select ‘New’ and then ‘File Geodatabase’. Give the new file geodatabase a suitable name for ease of reference by highlighting the geodatabase and typing a new name.
Once created, right-click on the file geodatabase, and select ‘Import’ and then ‘Feature Class (multiple)’.
In the next window, browse to the location containing the data you want to import. Because the individual shapefiles begin with the 5 km prefix, it is possible to import more than one OS MasterMap Greenspace Layer tile into the geodatabase as per user requirements.
Click on the button to the right of the blank window under ‘input features’ and navigate to the folder that contains the OS MasterMap Greenspace Layer shapefile data.
Select all the shapefiles that are required and click ‘Add’.
The shapefiles selected will now appear as a list in the import feature class window. The output file geodatabase should default to the one which has been previously selected. Click ‘OK’. The window will close and now ArcCatalog will import the feature classes into the file geodatabase. A dialog box will appear when the process is complete.
If the file geodatabase is now highlighted, a list of the imported feature classes should be visible. In this example, two shapefiles have been imported.
A useful point to note is that loading the shapefiles into a file geodatabase will automatically add spatial indexes to the data in the import process. There is therefore no need to manually add one once the data has been loaded, which would be the case if shapefiles had been loaded into ArcGIS without using the file geodatabase option. As has been previously mentioned, the addition of a spatial index greatly improves rendering performance.
Start ArcMap. Click on the ‘Import Data’ button in the top toolbar.
In the window that appears, navigate to the location of the file geodatabase just created. Select the feature classes that are required and click ‘Add’.
The data will load into ArcMap. Although ArcMap does put the shapefiles into a more logical sequence, the user can move the layers as they wish. The data will, of course, load in as un-styled data. ArcMap will assign a random style to the data.
If loading a larger area of interest, it is recommended that the user merge the shapefiles together before loading into the file geodatabase. This procedure is described later in this guide. Doing this will also mean that the supplied layer files for styling will only need to be applied once to the data and all the styles will work properly.
If, however, the user simply wants to load multiple areas using the file geodatabase option, there is no mandatory requirement to merge shapefiles together.
To add another 25 km² tile of data in ArcMap, that was previously loaded into the file geodatabase created earlier, simply click ‘Add Data’ and repeat the procedure described above for loading the individual layers for the subsequent tile(s). The user may wish to group the layers for each 100 km tile loaded, for example, all the tiles in 100 km grid square ‘TR’, in the table of contents window to avoid confusion.
To do this, select all the layers within the 100 km tile added, right-click, and then select ‘Group’. The additional layers can be styled as before, using a predefined layer file, or manually as required.
The example above shows that all the layers for TR have been loaded into ArcMap from within the file geodatabase. Another advantage of the file geodatabase option in ArcGIS is that, if you want to add another tile of data later, you can simply import the shapefiles into the same file geodatabase using ArcCatalog and then display them in ArcMap.
As has already been stated, OS MasterMap Greenspace Layer is supplied as ‘hairy tiles’ with features which cross a tile edge being supplied in both tiles in which the feature appears. These duplicate features will occur if more than one 25km2 tile is loaded into a file geodatabase. In many instances, the user will not need to remove duplicate features along the tile edges as the features will display perfectly clearly with one duplicate feature overlying the other.
There may, however, be instances where the user wishes to carry out some form of analysis using feature counts contained within the data. In this case, the data will need to have the duplicate features removed.
To remove duplicate features in ArcMap, it is necessary to firstly merge the tiles together before removing the duplicate features. This procedure can take some time, so the user should consider if this is really needed.
Firstly, the tiles need to be merged to create new feature classes within the file geodatabase containing the original data (or to a completely new file geodatabase or shapefile if required).
Using either ArcMap or ArcCatalog, from the main menu, select ‘Geoprocessing’ followed by ‘Merge’. In the next window, select the layers to be merged. In this example, two feature classes: TR15NE and TR15NW, are being merged. All the attribution is being copied into the new feature class, though the user can specify what attributes need to be copied. The user can also specify the output required. This can be a new feature class within a file geodatabase or a shapefile. In this example a new feature class containing the merged data will be created.
Click ‘OK’ when all the feature classes (or shapefiles) to be merged have been selected. It can be seen using this method, several OS MasterMap Greenspace Layer tiles could be merged, although only two are shown in this example. ArcGIS will then merge the files and load the newly created feature class (or a shapefile if that was being used), into the map window. Depending upon the sizes and number of tiles being merged, this could take some time. A dialog box will appear when the process is finished.
In the example shown below, a new feature class within the original file geodatabase used to hold the data, has been created. This new feature class is called ‘TR Merged’ and covers the entire area of the two separate feature classes previously loaded into the geodatabase. This new feature class has been styled using the ESRI stylesheets for OS MasterMap Greenspace Layer available on GitHub.
The ‘Dissolve’ function in ArcGIS will remove the duplicated features along the tile boundaries. This procedure can be carried out in either ArcCatalog or ArcMap. Firstly select ‘Geoprocessing’ and then ‘Dissolve’ from the main menu.
The user will then need to specify which merged file from which duplicate features are to be removed. In this example, we are looking at the TR Merged feature class.
We are going to save the de-duplicated data as a feature class within the original file geodatabase called ‘TR_Dissolved’. All the dissolve fields in the box need to be ticked except the ObjectID field as otherwise the attribution will not be carried over to the new dissolved file. Once complete, the new dissolved feature class will be loaded into ArcMap. This new dissolved feature class will contain no duplicate features. This procedure could also be performed using shapefiles simply loaded into ArcMap without using a file geodatabase.
The new feature class can now be styled as previously described. A count using the attribute table on both the original merged file and the dissolved file will confirm that the dissolved shapefile contains fewer features. The count below shows the merged feature class with duplicates contains 34 031 features.
The count below shows that the dissolved feature class contains 33 869 features.
Predefined stylesheets for OS MasterMap Greenspace Layer are available to download from the Ordnance Survey GitHub page below:
Click the 'Code' drop-down button and then click 'Download ZIP'.
To style your OS MasterMap Greenspace Layer data, first download the zip file from the above GitHub repository, then extract and save the extracted files to your preferred location. When styling ESRI shapefiles in ArcMap, you will need to navigate to ESRI Shapefile Stylesheets > ESRI stylesheets (LYR). There are currently no predefined stylesheets for styling GML in ArcMap.
Inside the respective subfolders for each stylesheet type is a ‘Quick Start Guide’ that can be followed to style your OS MasterMap Greenspace Layer data.
The GML data can be imported into ArcGIS using the Quick Import function in ArcToolbox. The data will be imported un-styled. Users should also note that due to the large file sizes of some of the 25km2 grid tiles, especially within larger cities, this import may take time to process.
The user will need to specify the type of data being imported (in this case, GML data) and browse to the files where the GML data is stored.
The quick import will create a new file geodatabase into which to import the data. Once the database location and name has been selected, click ‘OK’ in the dialog box as shown below to start the quick import.
Once the quick import function has been completed, the data can be added using the usual ‘Add Data’ button in ArcMap and selecting all the layers from the newly created file geodatabase.
The data will be loaded un-styled as shown in the example below.
The resulting imported data will then appear in the ArcMap window and can then be styled according to user requirements. The user should manually select the column header of the appropriate table within the data on which to base the styling. This is because in the GML imported data, the column header information is not shortened, unlike the shapefile data (see technical specification). Shapefile data is limited to eight characters within the column header. GML imported data is not limited in this way. In the example below, we are matching the column ‘priFunc’ in the ESRI lyr file with the primaryFunction column header in the imported GML data.
The screenshot above shows the GML imported data styled using a predefined ESRI .lyr file.