The data that you use has to come from somewhere. For most common applications, the data exists already; but the more particular and specialized the project, the less likely it is that the data will already be available. In such cases, you’ll need to create your own new data.
The goal for this lesson: To create a new vector dataset.
Before you can add new vector data, you need a vector dataset to add it to. In our case, you’ll begin by creating new data entirely, rather than editing an existing dataset. Therefore, you’ll need to define your own new dataset first.
You’ll need to open the New Vector Layer dialog that will allow you to define a new layer.
You’ll be presented with the following dialog:
It’s important to decide which kind of dataset you want at this stage. Each different vector layer type is “built differently” in the background, so once you’ve created the layer, you can’t change its type.
For the next exercise, we’re going to be creating new features which describe areas. For such features, you’ll need to create a polygon dataset.
This has no impact on the rest of the dialog, but it will cause the correct type of geometry to be used when the vector dataset is created.
The next field allows you to specify the Coordinate Reference System, or CRS. A CRS specifies how to describe a point on Earth in terms of coordinates, and because there are many different ways to do this, there are many different CRSs. The CRS of this project is WGS84, so it’s already correct by default:
Next there is a collection of fields grouped under New attribute. By default, a new layer has only one attribute, the id field (which you should see in the Attributes list) below. However, in order for the data you create to be useful, you actually need to say something about the features you’ll be creating in this new layer. For our current purposes, it will be enough to add one field called name.
The new layer should appear in your Layers list.
When you create new data, it obviously has to be about objects that really exist on the ground. Therefore, you’ll need to get your information from somewhere.
There are many different ways to obtain data about objects. For example, you could use a GPS to capture points in the real world, then import the data into QGIS afterwards. Or you could survey points using a theodolite, and enter the coordinates manually to create new features. Or you could use the digitizing process to trace objects from remote sensing data, such as satellite imagery or aerial photography.
For our example, you’ll be using the digitizing approach. Sample raster datasets are provided, so you’ll need to import them as necessary.
Muista
If your buildings layer symbology is covering part or all of the raster layer, you can temporarily disable the layer by deselecting it in the Layers panel. You may also wish to hide the roads symbology if you find it distracting.
You’ll be digitizing these three fields:
In order to begin digitizing, you’ll need to enter edit mode. GIS software commonly requires this to prevent you from accidentally editing or deleting important data. Edit mode is switched on or off individually for each layer.
To enter edit mode for the school_property layer:
If you can’t find this button, check that the Digitizing toolbar is enabled. There should be a check mark next to the View ‣ Toolbars ‣ Digitizing menu entry.
As soon as you are in edit mode, you’ll see the digitizing tools are now active:
Four other relevant buttons are still inactive, but will become active when we start interacting with our new data:
From left to right on the toolbar, they are:
You want to add a new feature.
You’ll notice that your mouse cursor has become a crosshair. This allows you to more accurately place the points you’ll be digitizing. Remember that even as you’re using the digitizing tool, you can zoom in and out on your map by rolling the mouse wheel, and you can pan around by holding down the mouse wheel and dragging around in the map.
The first feature you’ll be digitizing is the athletics field:
Remember, if you’ve made a mistake while digitizing a feature, you can always edit it after you’re done creating it. If you’ve made a mistake, continue digitizing until you’re done creating the feature as above. Then:
You can use:
Remember that each new feature needs to have a unique id value!
Muista
When you’re done adding features to a layer, remember to save your edits and then exit edit mode.
Muista
You can style the fill, outline and label placement and formatting of the school_property using techniques learnt in earlier lessons. In our example, we will use a dashed outline of light purple color with no fill.
Our path runs along the southern edge of the suburb of Railton, starting and ending at marked roads:
Our track is a little further to the south:
One at a time, digitize the path and the track on the routes layer. Try to follow the routes as accurately as possible, using points (left-click) at any corners or turns.
When creating each route, give them the type attribute value of path or track.
You’ll probably find that only the points are marked; use the Layer Properties dialog to add styling to your routes. Feel free to give different styles to the path and track.
Save your edits and toggle Edit mode.
Now you know how to create features! This course doesn’t cover adding point features, because that’s not really necessary once you’ve worked with more complicated features (lines and polygons). It works exactly the same, except that you only click once where you want the point to be, give it attributes as usual, and then the feature is created.
Knowing how to digitize is important because it’s a very common activity in GIS programs.
Features in a GIS layer aren’t just pictures, but objects in space. For example, adjacent polygons know where they are in relation to one another. This is called topology. In the next lesson you’ll see an example of why this can be useful.