Using QGIS (2) – Layer Symbology

September 17th, 2007

Our first post on using QGIS introduced the software along with how to download shapefiles, one of the most common GIS formats. Now we will explore how to use QGIS to make a better looking map.

Data Download

This time we are going to download a roads shapefile from the State of Michigan’s Center for Geographic Information. They offer downloads by county so go ahead and select a county and then chose to download the “MI Geographic Transportation” zip file. This zip file contains 3 shapefiles (named stroads, allroads, and railroad) but we will just use the “allroads” shapefile. For our example, we used the roads shapefile from the Washtenaw County transportation file.

Roads Symbology

Open QGIS and add the allroads shapefile.

QGIS Roads Plain

To make a map that looks good, we first need to add some color and style (“symbology”) to the roads. Remember our last post discussed how each GIS feature has associated information (“attributes”) that is stored in the shapefile. The Michigan roads has an attribute named LEGALSYST that will allows us to categorize the roads.

The downloaded data also comes with a metadata PDF that describes the possible attribute values for LEGALSYST. Looking there, we find that:

1 = State Trunkline
2 = County Primary
3 = County Local
4 = City Major
5 = City Minor
7 = Unknown

Back in QGIS, right-click on the layer name, select Properties and then select the Symbology menu tab. In the Legend Type drop-down box, select Unique Value and chose LEGALSYST in the classification field. The vertical box on the right side is then automatically filled with all the possible the attribute values. It should look like this:

QGIS Symbology

Now we can select each value and set a color and width. For example, since 1 represents highways, we selected a red color with 3 as the outline width. Both the County Primary(2) and City Major(4) categories were set to a tan color and a width of 2 while all the other categories were set to gray and a 1 width. Pressing Ok will then apply the symbology:

QGIS Roads Colored

Zooming in shows the symbology in better detail:

QGIS Roads Colored

The map itself can be saved as a project in QGIS by selecting File…Save Project to ensure the custom symbology of our streets layer is saved.

Feel free to explore the symbology options in more detail because we can use these maps created in QGIS for a variety of purposes.

Continue to part 3