Creating vector data with QGIS
In the previous module, we georeferenced an image where several locations were highlighted.
For this module, we will use the QGISGEOREF.zip data set, that we already used to georeference two images.
We also need the two images georeferenced (the geotiff images). We need to use:
If you don't have your own geotiff files, you can use this copy.
Setup the project
Use the QGIS project from the georeferencing exercise. You can improve the layer organization by creating two groups, one for the raster images and another for the data from Wuhan area.
There are many hotels in the printed map that we want to manage in our GIS project. The goal of this exercise is to create a new shapefile with all the hotels in the paper map.
For each hotel, we want to store:
- a unique id number
- hotel name
- number of starts (1 to 5)
- wheelchair friendly (yes or no)
- opening date
Creating a new point shapefile
To create the new layer, go to Layer → New → New Shapefile Layer...
Fill the dialog with the following values:
The next dialog asks for a shapefile name. Choose hotel.shp, and save it in the same folder of the project (Downloads/QGISGEOREF).
A new layer appears, with no contents.
To start digitizing features, you need to toggle the editing mode, select the Add feature button, and then click over one hotel sign on the map.
After clicking on the point location, you need to fill in the hotel attributes.
- Use a new number to each hotel id;
- Use the name of the hotel on the map
- Invent the number of stars (from 1 to 5)
- Invent if the hotel is wheelchair friendly (1) or not (0)
- Invent the opening data
Digitize 2 or 3 hotels.
Improving attribute form
Before editing all hotels, let's improve the data form. To do so, we need to go to the layer properties, and then select the fields panel.
Now continue to digitize the rest of the hotels, using the enhanced form.
Let's define a style for the hotel features. Since there are hotels with and without access to wheelchair persons, we will create a style that adds a wheelchair symbol to the hotel symbol, depending on the wheelchair value.
The desired style is something like:
To create such style, we can use a rule based style, with two rules.
We need to define these two rules.