Preparing network Shapefiles and QGIS for editing

1
Layers panel
2
Browser panel
3
Vector Toolbar
4
Attributes Toolbar
5
Menu Toolbar
  1. Launch QGIS.
  2. Drag and drop a network file from your computer to the Layers panel of QGIS.
    Network files are generally named gis_osm_roads_free_1.shp or similar.
    The network shape file appears in the display window.
  3. To add a background map, in the Browser panel, select XYZ Tiles > OpenStreetMap.
    The background map appears in the display window, and is listed in the Layers panel. Re-order the layers by dragging and dropping them in the Layers panel to ensure your network layer is on top.
  4. To make editing easier, turn the background layer to grayscale. In the Layers panel, right-click on OpenStreetMap > Properties > Symbology > Grayscale > By average > Apply.
  5. Filter the road types to be included in your network geometry.
    1. Right-click the network layer and select Filter....
    2. Depending on which road should be included, paste the following into the text field at the bottom:
      • Roads only, no streets:
        "fclass" IN ('motorway','motorway_link', 'motorway_junction','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','unclassified')
      • Roads and streets:
        "fclass" IN ('motorway','motorway_link', 'motorway_junction','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','unclassified','residential','living_street','service')
      • Roads, streets and cycleways:
        "fclass" IN ('motorway','motorway_link', 'motorway_junction','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','unclassified','residential','living_street','service','cycleway')
    3. Select OK.
    If you have polygons, use them to do the filtering. For more information, see Choosing roads using polygons.
  6. Before starting any editing, it is advised to create a copy of the network layer and keep the original intact. If any road is deleted by mistake, it can be copied back in from the original. In the Layers panel, right-click on the network file name, select Export > Save Feature As.
    The Save Vector Layer as... window appears.
  7. Select Format > ESRI Shapefile.
  8. Select File name > ..., and select a location to save the file.
  9. Type a file name.
  10. Select Save as type > ESRI Shapefile (*.shp, *.SHP) > Save.
    A copy is saved and appears in the Layers panel.
  11. Right-click the original layer, select Remove Layer > OK.
    The OpenStreetMap, and the new network layer are displayed.
  12. To change the color of the new layer, right-click on your network layer and select Properties. Select Symbology and a color from the drop-down options. Change the width to a suitable size (0.4 is recommended). Select Apply > OK.