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 100 x 100 km 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 where the data sits which is to be imported. Because the individual shape files begin with the 100 km prefix letters, it is possible to import more than one OS Open Greenspace 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(s) where the OS Open Greenspace shapefile data resides.
Select all the shapefiles that are required in the window 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 features 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 features classes should be visible. In this example, two shapefiles covering the 100 km areas TR and TG have been imported. This has created four new feature classes in the file geodatabase - two for access points and two for greenspace sites.
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 according to the desired preferences. The data will, of course, load in as un-styled data. ArcMap will assign a random style to the data.
The user can manually style each of the layer files by right-clicking on each of the loaded layers, selecting ‘properties’ and then ‘symbology’. ArcMap contains an extensive range of tools to allow the user to apply various styles to each layer of the data and then save the work as an ArcGIS layer file. This procedure is not covered in this guide.
A set of ESRI layer files for OS Open Greenspace will be available for download from the GitHub website at product launch. Follow the instructions in the Quick Start Guide which accompanies these files to apply the styling to the data. These style files will work with either a direct shapefile load in ArcMap or using the file geodatabase methodology described here.
The user should see something like the screenshot above when the process is complete.
If using a different set of layer files, the procedure for adding a style in ArcMap is as follows – this method can be used for many other data types. To add a style to a layer, simply right-click on a layer, select properties and then ‘symbology’.
In the layer properties window, select ‘import’ (the button below the tabs at the top). A list of available styles, drawn from the imported layer file will appear. Simply select the required style and click ‘OK’. The symbol in the box will now change to the predefined style.
Click ‘OK’ again and the style will then be applied in ArcMap. Repeat this procedure for all the layers until the OS Open Greenspace data is styled to requirements. Labels for certain features can also be applied as needed.
If the user wants to load a larger area of interest, it is recommended that they merge the shapefiles together before loading them 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.
As has already been stated, OS Open Greenspace 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 100 x 100 km 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, the user needs to 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.
The tiles need to be merged together to create new features 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, the Greenspace Sites layers for TF and TG, are being merged together. All the attribution is being copied into the new features 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. Using this method, a number of OS Open Greenspace tiles can be merged together, 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 on 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 ‘Open_Greenspace_Sites_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 style file for OS Open Greenspace data which will be available from GitHub. It’s important to follow the instructions in the Quick Start guide, provided with these files, to get the right result.
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 Open_Greenspace_Sites_Merged feature class.
We are going to save the de-duplicated data as a feature class within the original file geodatabase called ‘OpenGreenspace_Sites_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 containing 4,473 features.
The count below shows that the dissolved feature class contains 4,468 features.
The GML data can be imported into ArcGIS using the Quick Import function in Arc Toolbox. The data will be imported un-styled. Users should also note that due to the large file sizes of some of the 100 x 100km 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. It is important to note that all the .GML files which are required for import should be in the same folder as each other and not in separate folders as they are downloaded, e.g. one file in a folder called ‘TG’ and one in a different folder called ‘TF’. If this is the case, the quick import process would have to be repeated for each folder. Placing all the .GML files in one folder will allow multiple imports at once as shown in the example below.
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 to suit requirements. In the case of other .GML datasets, the user may have to 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, as with the shapefile data. Shapefile data is limited to eight characters within the column header. GML imported data is not limited in this fashion. In the case of OS Open Greenspace data, this manual selection of column header is not required.
In the example below, we are matching the column ‘function’ in the ESRI .lyr file with the function column header in the imported GML data.
In this example, the supplied ESRI .lyr file has successfully styled the information from the imported .GML data according to information in the function column within the data. When ‘OK’ is clicked, the data appears as shown below: