Choosing roads using polygons

  1. Select your network layer.
  2. In the menu toolbar at the top, select Vector > Research Tools > Select by Location....
    1. In most cases, the Intersect mode works best, but the result might have to be edited manually.
    2. Select the polygon layer in By comparing to the features from.
    3. Select Run.
  3. Right-click the layer, select Export > Save Selected Features As...
  4. Filter the road types to be included in your network geometry.
    1. Right-click your network layer, and select Filter....
    2. Paste the following into the text field at the bottom:
      "fclass" IN ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','unclassified','residential','living_street','service','cycleway')
    3. Select OK.
  5. 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.
  6. Select Format > ESRI Shapefile.
  7. Select File name > ..., and select a location to save the file.
  8. Type a file name.
  9. Select Save as type > ESRI Shapefile (*.shp, *.SHP) > Save.
    A copy is saved and appears in the Layers panel.
  10. Right-click the original layer, select Remove Layer > OK.
    The OpenStreetMap, and the new network layer are displayed.
  11. 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 width to a suitable size (0.4 is recommended). Select Apply > OK.