Lesson 3 - Spatial Data Acquisition Techniques
Lesson 3 - Spatial Data Acquisition Techniques
3.1 Digitizing
3.1.1 Creating Vector Data
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
infor 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.
You’ll need to open the New Vector Layer dialog that will allow you to define a new layer.
• Navigate to and click on the menu entry Layer ‣Create Layer‣ New Shapefile Layer.
For the next exercise, we’re going to be creating new features which describe areas. For such
features, you’ll need to create a point 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.
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 .
• Replicate the setup below, then click the Add to attributes list button:
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.
• Click on the layer in the Layer list to select it. (Make very sure that the correct layer is selected,
otherwise you’ll edit the wrong layer!)
• Click on the Toggle Editing button:
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:
• Click on the Add Feature button now to begin digitizing our school fields.
You’ll notice that your mouse cursor has become a crosshair. This allows you to more accurately
place the points you’ll be digitizing.
itizing. 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.
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:
• Digitize the more buildings to add to the list of Houses. Use the same image to assist you:
Note
When you’re done adding features to a layer, remember to save your edits and then exit edit mode.
• Create a new line feature called routes.shp with attributes id and type . (Use the approach
above to guide you.)
• We’re going to digitize two routes which are not already marked on the roads layer; one is a
path, the other is a track.
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.
3.1.1.6 In Conclusion
Now you know how to create features! Knowing how to digitize is important because it’s a very
common activity in GIS programs.
4 Classifying Vector Data
But the whole strength of GIS is that all the objects that are visible on the map also have attributes.
Maps in a GIS aren’t just pictures. They represent not only objects in locations, but
b also information
about those objects.
The goal of this lesson: To explore the attribute data of an object and understand what the various
data can be useful for.
Open the attribute table for the Major Towns layer (refer back to the section “Working with Vector
Data” if necessary). Which field would be the most useful to represent in label form, and why?
4.1.2. In Conclusion
You now know how to use the attribute table to see what is actually in the data you’re using. Any
dataset will only be useful to you if it has the attributes that you care about. If you know which
attributes you need,, you can quickly decide if you’re able to use a given dataset, or if you need to
look for another one that has the required attribute data.
Different attributes are useful for different purposes. Some of them can be represented directly
directl as
text for the map user to see. You’ll learn how to do this in the next lesson.
In this module, you will create a basic map which will be used later as a basis for further
demonstrations of QGIS functionality.
Note
The Layer Properties dialog does have a Labels tab, which now offers the same functionality, but for
this example we’ll use the Label tool, accessed via a toolbar button.
Before being able to access the Label tool, you will need to ensure that it has been activated.
You’ll need to choose which field in the attributes will be used for the labels. In the previous lesson,
you decided that the CITY_NAME field was the most suitable one for this purpose.
• Click OK.
The map should now have labels like this:
That’s the font problem solved! Now let’s look at the problem of the labels overlapping the points,
but before we do that, let’s take a look at the Buffer option.
• Open the Label tool dialog.
• Select Buffer from the left-hand
hand options list.
• Select the checkbox next to Draw text buffer,, then choose options to match those shown here:
• Click Apply.
You’ll see that this adds a coloured buffer or border to the place labels, making them easier to pick
out on the map:
You’ll see that some of the road names appear more than once and that’s not always necessary. To
prevent this from happening:
• Click Ok:
4.3.2. In Conclusion
Symbology allows us to represent the attributes of a layer in an easy-to-read way. It allows us as well
as the map reader to understand the significance of features, using any relevant attributes that we
choose. Depending on the problems you face, you’ll apply different classification techniques to solve
them.
5 Working with X, Y Coordinate Data
5.1 Background
Geographic locations are sometimes collected and stored in tables as X,Y coordinates. This section
demonstrates how to import X, Y coordinate data on health facilities into QGIS and prepare a map of
service coverage.
You have been asked to show the locations of health facilities in Gulu District. You only have a list of
health facilities with their X,Y coordinates in Excel.
• Next, add the .csv file you created in step 2 above. On the QGIS main menu, click on Layer > Add
Layer > Add Delimited Text Layer.
Layer
• In the dialog box that opens, browse to your folder and select the CSV file (Gulu
( Health
Facilities.csv) and click Open.
Open
• This data has X, Y coordinates, so we will use the geometry definition options.
• In the Geometry definition,, select X_LONG for the X field and Y_LAT for the Y field;
field click OK.
• The health facilities are added to the map.