0% found this document useful (0 votes)
104 views15 pages

Lesson 3 - Spatial Data Acquisition Techniques

The document describes several techniques for spatially acquiring and digitizing vector data in QGIS: 1) It discusses how to create a new vector dataset by defining its attributes and geometry type in the layer creation dialog. Points are selected for representing areas. 2) It provides instructions for digitizing buildings from a sample raster image onto the new vector layer using the digitizing tools. 3) It has the user digitize additional buildings and create a new line layer to digitize paths and tracks onto. 4) In conclusion, the document explains that digitizing is an important GIS skill for creating vector data from existing spatial features.

Uploaded by

EMINAT PRINCE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views15 pages

Lesson 3 - Spatial Data Acquisition Techniques

The document describes several techniques for spatially acquiring and digitizing vector data in QGIS: 1) It discusses how to create a new vector dataset by defining its attributes and geometry type in the layer creation dialog. Points are selected for representing areas. 2) It provides instructions for digitizing buildings from a sample raster image onto the new vector layer using the digitizing tools. 3) It has the user digitize additional buildings and create a new line layer to digitize paths and tracks onto. 4) In conclusion, the document explains that digitizing is an important GIS skill for creating vector data from existing spatial features.

Uploaded by

EMINAT PRINCE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

3 SPATIAL DATA ACQUISITION TECHNIQUES

3.1 Digitizing
3.1.1 Creating Vector Data

3.1.1.1 Creating a New Vector Dataset


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.

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.

The goal for this lesson: To create a new vector dataset.

3.1.1.2 The Layer Creation Dialog


D
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.

• Navigate to and click on the menu entry Layer ‣Create Layer‣ New Shapefile 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 point dataset.

• Click on the Point radio button:

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


cify 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
The CRS of this project is WGS84, replace it with:

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:

• Check that your dialog now looks like this:


• Click OK.. A save dialog will appear.
• Navigate to the Sample_data
_data directory.

• Save your new layer as House.shp


House .

The new layer should appear in your Layers list.

3.1.1.3 Data Sources


For our example, you’ll be using the digitizing approach. Sample raster datasets are provided, so
you’ll need to import them as necessary.

• Click on the Add Raster Layer button:


• Navigate to sample_data
• Select the file Image.tif .
• Click Open.. An image will load into your map.
• Find the new image in the Layers list.
You’ll be digitizing some buildings in the image:

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 House 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:

From left to right on the toolbar, they are:

• Save Edits:: saves changes made to the layer.


• Add Feature:: start digitizing a new feature.
• Move Feature(s):: move an entire feature around.
• Node Tool:: move only one part of a feature.
• Delete Selected:: delete the selected feature.
• Cut Features:: cut the selected feature.
• Copy Features:: copy the selected feature.
• Paste Features:: paste a cut or copied feature
fea back into the map.

You want to add a new feature.

• 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.

• Start digitizing by clicking a single point on a building.


• Place more points by clicking more buildings
• Fill in the values as below:

• Click OK and you’ve created a new feature!

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:

• Select the feature with the Select Single Feature tool:

You can use:

• the Move Feature(s) tool to move the entire feature,


• the Node Tool to move only one point where you may have miss-clicked,
• Delete Selected to get rid of the feature entirely so you can try again, and
• the Edit ‣ Undo menu item or the ctrl + z keyboard shortcut to undo mistakes.

3.1.1.4 Try Yourself

• Digitize the more buildings to add to the list of Houses. Use the same image to assist you:

Remember that each new feature needs to have a unique id value!

Note
When you’re done adding features to a layer, remember to save your edits and then exit edit mode.

3.1.1.5 Try Yourself

• 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.

Save your edits and toggle Edit mode.

Check your results

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

4.1 Lesson: Attribute Data


Up to now, none of the changes we have made to the map have been influenced by the objects that
are being shown. In other words, all the land use areas look alike, and all the roads look alike. When
looking at the map, the viewers don’t know anything about the roads they are seeing; see only that
there is a road of a certain shape in a certain area.

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.

4.1.1. Follow Along: Attribute data

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?

Check your results

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.

4.1.3. What’s next?

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.

4.2 Lesson: The Label Tool


Labels can be added to a map to show any information about an object. Any vector layer can have
labels associated with it. These labels rely on the attribute data of a layer for their content.

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.

The goal for this lesson: To apply useful and good-looking


good labels to a layer.
4.2.1. Follow Along: Using Labels

Before being able to access the Label tool, you will need to ensure that it has been activated.

• Go to the menu item View ‣ Toolbars.


• Ensure that the Label item has a check mark next to it. If it doesn’t, click on the Labelitem, and
it will be activated.
• Click on the Major Towns layer in the Layers list, so that it is highlighted.

• Click on the following toolbar button:

This gives you the Layer labeling settings dialog.

• Check the box next to Label this layer with....

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.

• Select CITY_NAME from the list:

• Click OK.
The map should now have labels like this:

4.2.2. Follow Along: Changing Label Options

Depending on the styles you chose for your


you map in earlier lessons, you might find that the labels are
not appropriately formatted and either overlap or are too far away from their point markers.

• Open the Label tool again by clicking on its button as before.


• Make sure Text is selected in the left-hand
left hand options list, then update the text formatting options
to match those shown here:

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:

4.3.1. Follow Along: Classification

Now your TOTAL POPULATION field is populated with values

• Open the Layer properties dialog’s Style tab.


• Change the classification style to Graduated.
• Change the Column to TOTAL POPULATION:
• Under Color ramp,, choose a colour of your choice:
choice
Leave everything else as-is.

• 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.

5.1.1 Add X,Y coordinate


oordinate data
• Launch QGIS and click on the Browse button and navigate to the file Exercise_Data/Chapter8
open /Gulu.shp

• 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.

• This is, however, a temporary file. We will save it as a shapefile.


• Right-click on the Health_Facilities layer and select Save As.
• Browse to the ExerciseData\Analysis
ExerciseData Data sets folder and save it there
as Gulu_Health_Facilities.shp
Health_Facilities.shp.

You might also like