ODMC2012 QGIS Ex1 Schools and Public Transport In this exercise, users will learn how to a) map the location of secondary schools in and around the Southampton area; b) overlay the school location map with bus-stops and c) determine the average bus-stops to school distance based on the nearest five (or more or less) stops. The results can be used to support the school commuting plan. DATA In order to save time, the following data files have already been preloaded to the computer (most likely under c:\odmc2012\data\) SOTSchsCore.txt The list of all the secondary schools and colleges in Southampton and the surrounding area enclosed by a square with the lower left corner at (430 000, 101 000) and upper right (455 000, 126 000). The location of the school is expressed in the Easting and Northing columns of each row of school record. The data is extracted from the EduBase Public portal at http://www.edubase.gov.uk/. Each public users are entitled to have 2 free downloads of their own chosen school area in any 12 months period. SOTStops.txt All the bus-stops in the same study area. The data are extracted from the National Public Transport Access Nodes (NaPTAN) dataset available at http://data.gov.uk/dataset/naptan. To obtain bus-stop data in another area, download the resource in the Zipped CSV Format. Grid references of all the bus-stops are recorded in the Stops.csv file. coast_ln_polyline.shp The coastline of Southampton, part of south Hampshire and Dorset. The data is trimmed from the coastline of the Great Britain which is available from the OS s Meridian 2 open dataset. TASKS 1. Open QuantumGIS (or QGIS) 1.8 from Start > Programs > Quantum GIS Lisboa > Quantum GIS Desktop (1.8.0). The instructions stated below should also work in other versions of the software although some command sequences may be slightly different. 2. Use Layer > Add Vector Layer to add the coastline data to map window. To do that, in the Add vector layer dialog box, click Browse, navigate to the data folder, click to select coast_ln_polyline.shp and then Open. -1-
3. Use View > Zoom Full to centre and display the study area to the maximum scale. 4. Save your work using File > Save Project to c:\odmc2012\ using a sensible name. You should repeat this step frequently to avoid losing any of your work. 5. In case you have not enable all the QGIS plugins, click Plugins > Manage Plugins > Select All to select all the plugins. Click OK to exit the dialog box. 6. Input the bus-stop location file via Use Layer > Add Delimited Text Layer In the Create a Layer from a Delimited Text File dialog box, click the button to pick SOTStops.txt. Ensure that the Selected delimiter is set to be Comma, make sure the Space delimiter is unchecked, and the X and Y fields are Easting and Northing respectively (as shown in the figure below). -2-
7. Repeat the last step to input the school location. The filename this time is SOTSchsCore.txt whilst the X and Y fields remain Easting and Northing respectively. 8. The resulting map should display the schools on top of the bus-stop distribution. Double click on the layer name (on the TOC panel on the left) will allow you to alter the style of the symbol through the Layer Properties dialog box. The order of the layers can be modified by dragging one of the layers above or below the others. The layer on the top stays at the foreground of the map window while the bottom one is pushed to the very background. 9. Right-click on the SOTStops layer and select Zoom to Layer Extent to display the full extent and then File > Save Project to save your work. 10. Apart from showing the distribution of the bus-stops in relation to the school location, very limited quantitative analysis can be carried out to assess the needs and current provision of public transport that is an important consideration for support schools to devise their green commuting plan. The map in fact seems to suggest that all secondary schools are well served by the -3-
public transport. But is this really the case? 11. A possible way to identify any inadequacy in the existing bus network is to calculate the average busstops to school distance. The further the distance, the less convenient for pupils and staff to use public transport to travel to schools. In order to do that, click Vector > Analysis Tools > Distance matrix. In the Distance matrix dialog box, complete each field using the values as shown in the figure on the right. The only exception is the path and the filename of the Output distance matrix which should be c:\odmc2012\ and a filename chosen by you. It is very important that you check the Use only the nearest (k) target points: box and input 5. This is necessary so that the calculation for each school will be confined to the five nearest bus-stops rather than all the stops in the entire network. When the process is finished, click OK to close the dialog box and the Close to exit the Distance matrix function. 12. Use Microsoft Excel or an equivalent program to view the distance matrix. The results should contain the school name, the mean, standard deviation, maximum and minimum distances between every school to its five nearest bus-stops. Do NOT reorder the records at this stage, instead use Microsoft -4-
Excel to open SOTSchsCore.txt. Copy the Easting and Northing columns to the new distance matrix file. 13. To visualise the average bus-stop to school distance, upload the distance matrix file to QGIS via Layer > Add Delimited Text Layer Turn off the other two existing school and bus-stop layers by unchecking the box next to the layer names in the TOC pane. 14. Instead of using a fixed point symbol to represent the school location, the size of the location symbol can be varied in proportion to the average distance between school and bus-stops. To do that, double click on the symbol of the newly added layer and in the Layer Properties dialog box under the Style tab, If you see a screen similar to below, click on the button which says Old symbology. -5-
Set the Transparency to 40%, symbol Size to 75 map units and the Area scale of the Drawing by field section (scroll down the dialog box) to be MEAN (mean distance). Your selection should be similar to those shown in the following figure. Click OK to apply the changes. -6-
15. The map should now display all the schools represented by the symbols proportional to the average distance to the nearest five stops. To make the area more identifiable, you may wish to add the road network data e.g. motorway (motorway_polyline), A roads (a_road_polyline) and B roads (b_road_polyline) to the map. The shapefiles (.shp) are also preloaded in the data folder. Your final map may look like: From the results it is quite clear that schools in or near the city centre are better served by the public transport while those in the rural communities will have to walk further distance to access the bus services. Apart from this, what other conclusion can you draw? -7-