Adding vector data in context

“Vector data consists of points, lines and polygons representing geographic features in the real world. QGIS can read and write different types of vector formats.”

QGIS uses the library called GDAL to read and write various formats. In order to do analysis and make maps in a GIS, we need to have data. There are many techniques for creating GIS data. The most common methods are digitizing, importing GPS data, and converting spreadsheet data with latitude and longitude. Once the data has been generated it can then be used in a GIS software and in this module, we will explore the various methods available for loading vector data.

You try:

Goal: To explore how to load vector data

  • Navigate to the exercise folder.
  • Look at the layers in the folder noting the file extensions. If you do not see the extensions you need to change the folder preferences on your machine.
  • Navigate to the Add Vector Layer on the Manage Layers Toolbar or from the Layers Menu > Data Source Manager
  • Navigate to the exercise folder and select the layer rivers. There are multiple layers that make up a shapefile, choose the correct one and note the extension.
    NB You can also filter vector layers depending on their type.
  • Did the layer load properly in the QGIS

Method B

  • Select the Browser panel from the View >Panels menu.
  • Dock the *Browser panel * if you have not yet done so.
  • Use the browser panel to navigate to the exercise folder.
  • Right click on the layer index1in10k and click add a layer to map canvas.
  • Expand on the cities. Why is the icon different from the other layers.
  • Load the cities layer from the geopackage by either dragging it onto the map canvas or by choosing right click > add layer to canvas.

More about adding vector data

Vector layers are differentiated by their type which are points, lines, and polygons. Points contain only a single coordinate pair. Points are typically used to model singular, discrete features such as buildings, wells, power poles and sample locations. Points have only the property of location. Lines are composed of multiple, explicitly connected points. Lines are used to representing linear features such as roads, streams, faults, boundaries, and so forth. Lines have the property of length. Polygons are created by multiple lines that loop back to create a “closed” feature. For polygons, the first coordinate pair (point) on the first line segment is the same as the last coordinate pair on the last line segment. Polygons are used to represent features such as city boundaries, geologic formations, lakes, soil associations, vegetation communities, and so forth. Polygons have the properties of area and perimeter.

There are various ways to load the data into QGIS but the most efficient is the browser as it automatically filters for the correct type to load into QGIS.

Check your knowledge:

  1. Which of the following file extension would you choose to add a shapefile into QGIS:
    1. dbf
    2. shx
    3. shp
    4. prj
  2. Does QGIS has the capability to open a file generated from google earth. The file type is kml:
    1. No
    2. Yes

Further reading:

Click here to download the sample data for the lesson.