Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
QGIS By Example
QGIS By Example

QGIS By Example: Leverage the power of QGIS in real-world applications to become a powerful user in cartography and GIS analysis

Arrow left icon
Profile Icon Alexander Bruy Profile Icon Daria Svidzinska
Arrow right icon
$48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (4 Ratings)
Paperback Jun 2015 316 pages 1st Edition
eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Alexander Bruy Profile Icon Daria Svidzinska
Arrow right icon
$48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (4 Ratings)
Paperback Jun 2015 316 pages 1st Edition
eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

QGIS By Example

Chapter 1. Handling Your Data

In this introductory chapter, we will prepare all the necessary tools and data for the visual exploration of spatial phenomena, mapping, and analysis. After getting to know some basics about QGIS as a desktop GIS, you will learn how to install and configure it. Then, we will go through the most common spatial data sources and, in the end, aggregate them into a single spatial database that will be used for styling, mapping, and analysis in the following chapters.

In this chapter, we will go through the following topics:

  • QGIS installation
  • Graphical user interface (GUI), its elements, and its customization
  • Loading various types of spatial data from common sources
  • Projection's basics
  • Assembling data into a single spatial database

Installing QGIS

QGIS is a free and open source desktop GIS on which development began in 2002. Since 2007, the project has been developing under the umbrella of the Open Source Geospatial Foundation (OSGeo). A relatively young project, QGIS is gaining more and more popularity among individual users, private companies, and organizations all over the world due to the following reasons:

  • Distribution under the GNU General Public License (GPL), which guarantees users the freedom to use, study, share, and modify the software
  • Cross-platform support, which means that QGIS can run on Linux, Unix, Mac OS, Windows, and Android operating systems
  • Multiple vector and raster data format support, as well as database formats and functionalities
  • Permanent improvement of the core functionality, which encompasses data creation, editing, manipulation, analysis, storage, and visual representation
  • Permanent growth of the external functionality available from the so-called plugins supported by the international community of developers

    Note

    You can find more information about QGIS from its official website at http://qgis.org/ and its documentation chapter available at http://documentation.qgis.org/.

According to the release schedule of the QGIS project, a new version of QGIS is available every 4 months. Starting from QGIS 2.8, every third release has been a long-term release (LTR). It is maintained for a year, and then the next LTR occurs. Throughout this book, an LTR of QGIS 2.8 called "Wein" is used.

Installers for the current QGIS version are available for different operating systems from the download page of the official website at http://download.qgis.org. The 32-bit and 64-bit installation files for MS Windows are distributed as follows:

  • QGIS Standalone Installers: QGIS installation using these has no differences from the conventional software installation procedure under Windows
  • OSGeo4W Network Installer: Compared to standalone installers, this provides the following advantages:
    • Aside from QGIS, it allows us to install a large number of other packages to work with spatial data (command-line utilities, libraries, and desktop and server applications)
    • It ensures installation of the most up-to-date software versions being directly linked to constantly updating repositories
    • Once defined, the OSGeo4W working environment is convenient to use for automatic and timely updates, package addition, or package deletion

Let's go through the installation procedure of QGIS and its components with the OSGeo4W installer in the example of the latest 32-bit version. Since the installation (especially primary) requires downloading a large number of files, it is desirable to have a high-speed Internet connection. The installation procedure is as follows:

  1. Download the latest version of the OSGeo4W 32-bit Network Installer, and double-click on osgeo4w-setup-x86.exe to run the installation.
  2. In the installer window, select Advanced Install, as shown in the following screenshot. From now on, just read carefully and follow the instructions.
    Installing QGIS
  3. Choose Install from the Internet with the option to keep the downloaded files for future reuse.
  4. Choose the directory for the OSGeo4W software suite installation. C:\OSGeo4W is a usual and convenient choice. If you want to use another directory, give it a proper name with a short path, excluding spaces and special symbols.
  5. Then, choose a directory to save the downloaded packages. You can create a new directory, C:\OSGeo4W\Downloads, by typing in its name manually. Keep in mind that the volume of files to be downloaded is about 200 MB and you will need enough space to keep them all.
  6. Configure your Internet connection parameters, if any, and click on the Next button to proceed. After hitting the Next button, the list of all packages is downloaded and you enter the mode of package selection, as shown in the following screenshot. The available packages are grouped into the following categories: Commandline_Utilities, Desktop, Libs, and Web.
    Installing QGIS
  7. To install a package, click on the + sign to expand the category, and choose an application by clicking on the rounded arrow beside it (the word Skip will be replaced by the latest available version number).
  8. To install the latest QGIS version, choose qgis: QGIS Desktop, and grass: GRASS GIS stable release. GRASS is a standalone GIS application that is closely integrated into QGIS and provides advanced geoprocessing functions.
  9. After you've clicked on the Next button, the installer automatically detects the necessary dependencies and proceeds to download the packages and installation, as shown in the following screenshot:
    Installing QGIS

    Tip

    You can also install qgis-dev: QGIS nightly build of the master. Being under constant development, this version is considered unstable and is updated nightly. It is not recommended for workaday use, but is useful if you want to have a try at some new features and give feedback to developers.

After the installation completes, you will find the OSGeo4W group in the Start menu, with the following components:

  • MSYS: This is a set of GNU tools that ensure the creation of applications traditionally dependent on UNIX tools
  • OSGe4W Shell: This is a command-line interface for OSGeo4W utilities
  • QGIS Browser 2.8.1: This is a QGIS explorer used for navigation and data preview
  • QGIS Desktop 2.8.1: This is a QGIS desktop application
  • Setup: This is a OSGeo4W Installer launcher
  • GRASS GIS 7.0.0: This is GRASS GIS and its components

If you want to update QGIS or expand the current installation with some new components, simply click on the Setup shortcut from the OSGeo4W menu folder and run the Advanced installation procedure. The installer will check for available updates and necessary dependencies, download them, and install them.

GUI elements and customization

When you first start QGIS, you will see the interface, as shown on the following screenshot. By definition, the QGIS interface uses the system language. For the purpose of this tutorial, you can change it in English by going to Settings | Options | Locale and restarting QGIS to apply your changes.

GUI elements and customization

The QGIS interface consists of five main sections:

  1. Menu bar: This provides access to all QGIS functions in the conventional form—drop-down menus.
  2. Panels: These are windows that can be either docked or floating. By default, you can see two panels activated on the left side of the workspace.
    • The Layers panel is designated to display a tree view list of all loaded layers.
    • The Browser panel provides quick navigation and access to the various local, server, or online data sources. You can close or shrink a panel using special buttons in its top-right corner. You can also drag and drop it to a place handily.

      Tip

      Throughout this book, we will use the Browser panel from time to time, so try to assign it a proper position instead of closing it. For example, by dragging and dropping it onto the Layers panel, you can create two independent tabs: one for layers and the other for data source navigation. In this case, you will not have to sacrifice window the space necessary for expanding and viewing items.

    GUI elements and customization

    Panels can be turned on or off by going to View | Panels. Similarly, you can right-click anywhere on the upper bar of the workspace, and a window with toggles will pop up. This window is divided by a horizontal line and the panels toggles are located in its upper part.

  3. Toolbars: Menu functions are grouped into logical toolsets and placed as buttons in bars to provide handy access to all the necessary tools. By default, the following toolbars are turned on and displayed:
    GUI elements and customization

    File toolbar

    GUI elements and customization

    Map Navigation toolbar

    GUI elements and customization

    Attributes toolbar

    GUI elements and customization

    Digitizing toolbar

    GUI elements and customization

    Label toolbar

    GUI elements and customization

    Help and Plugins toolbars

    GUI elements and customization

    Manage Layers toolbar

    If you want to see a short tool reference, just hover your mouse pointer over the button and a yellow information window will pop up. Some buttons or toolbars are grayed out (for example, the Digitizing toolbar and Label toolbar), which means that they can be used only after some actions have been performed. For example, the Digitizing toolbar's buttons become available only after editing mode is activated for some layers. Toolbars are dockable and can easily be moved around the workspace. To move a toolbar, place the mouse arrow over its border marked by perforation dots. The arrow will turn into a cross, symbolizing that the toolbar can now be dragged and dropped to any other place while holding down the left button of the mouse. You can turn the toolbars on or off by navigating to View | Toolbars, or from the window called by a right click on any toolbar.

  4. Map area: This is the largest section of the interface window, and is designed for data map display and visual exploration.
  5. Status bar: This briefly displays the following information about your current map overview: a progress bar of the rendering (visible only if rendering takes some time to show its progress), the mouse pointer's position coordinates, the scale, and the current coordinate reference system. It also contains toggles for switching from point position coordinates to extent, and temporarily turning off map rendering. There are also buttons used to open the coordinate reference system dialog GUI elements and customization and show the Log Message panel GUI elements and customization.

Advanced GUI customization is possible by navigating to Settings | Customization. From this dialog, you can get complete control over all menus, panels, bars, and widgets. To start the process of customization, turn on the Enable customization toggle. As long as you are not familiar with QGIS interface, it will be easier to enter GUI elements and customization Switch to catching widgets in main application mode. In this mode, you can click on any GUI item you want to hide—a button on a toolbar or a toolbar itself. The chosen items are highlighted and the relevant customization tree item is expanded, as shown in the following screenshot. If you have chosen an item by mistake, simply click on it once again to unselect. Otherwise, you can expand the relevant item, check/uncheck some toggles, and click on OK. The changes are applied after QGIS restarts.

GUI elements and customization

Tip

As your familiarity with QGIS grows and you start using it for different tasks, it might be convenient to create a few users' GUI profiles, aimed at different use cases (for example, digitizing, working with databases or raster data, and so on). To do so, you need to adjust all the necessary settings in the Customization dialog window, and save GUI elements and customization them in a .ini file. After that, you will be able to quickly modify the interface just by loading settings GUI elements and customization from a predefined customization file.

Some minor interface changes, such as general style, default icon size, font and more, are available from the Application group, which can be found by going to Settings | Options | General.

Extending functionality through plugins

From the very beginning, QGIS has had a modular architecture that makes it easy to add new features or functions. Most functions in QGIS are implemented in so-called plugins, which are divided into the following types:

  • Core plugins: These are included in QGIS by default and are maintained by the development team. In order to be used, they should only be activated by a user.
  • External plugins: These are located in an external repository and are maintained by the authors. In order to be used, they should first be installed by a user. With time passing, some of the most useful and popular plugins are incorporated into the QGIS core functionality.

Managing plugins

Plugin management implies their activation, installation, update, and removal, which are performed by navigating to Plugins | Manage and Install Plugins. There are several tabs in the dialog window. Clicking on an individual plugin in any of these tabs shows you detailed information: whether the plugin is experimental or not, the functionality, rating, author, version, and also some links to its homepage, code repository, and tracker:

  • All: Under this tab, you can see the full list of available plugins, both installed and not installed.
  • Installed: This tab shows the plugins that are already installed in QGIS. If you want to activate/deactivate a plugin, just check/uncheck the toggle beside it.
  • Not installed: This tab contains a list of all available plugins that are not installed in your QGIS.

    The following tabs are not permanent and are shown only if there are plugins that satisfy some conditions:

    • Upgradeable: This tab is visible only when more recent versions of the installed plugins are available in the repositories.
    • Invalid: This tab is shown when there are installed plugins that are broken or incompatible with your QGIS version. If you click on an individual plugin from this tab, you will be shown the information about the possible cause of invalidity; so that you would be able to provide a consistent feedback to the developers.
    • New: This tab shows the not-installed plugins seen for the first time.
    Managing plugins
  • Settings: This tab allows you to define how often updates will be checked and whether to use experimental or deprecated plugins. While it is not recommended to use experimental plugins for production purposes, you can still activate the option to explore the entire range of available tools. By default, only QGIS Official Plugin Repository is connected, but you can connect additional repositories if you know them by clicking on the Add... button. For example, the previous screenshot shows how to add an external Boundless plugin repository.

To install a plugin, go back to the Not installed tab, select the plugin you want to install, and click on Install plugin. After that, the installation starts, and upon its completion, the message about successful installation is displayed. The installed plugin is activated by default and either appears in the Plugins menu, or is added to another relevant menu (for example, Vector or Raster). Also, some plugins appear as separate toolbars and panels that can be placed and turned on or off manually.

Finding and choosing a plugin that fits your needs might be difficult because their number is over 400 and is constantly growing. To explore the world of QGIS plugins, you can start from http://plugins.qgis.org/, which contains information about popular and featured plugins. If you are looking for a specific function but don't know the exact plugin name, we advise you to search by using tag words in the Manage and Install Plugins dialog window, as shown on the following screenshot:

Managing plugins

Tip

By default, plugins are sorted alphabetically by name. If you want to rate them (by downloads, votes, or status), apply the additional sorting options available by right-clicking contextual menu of the list of plugins.

Loading data into QGIS

The data in the GIS can be submitted as separate files, databases, or external online sources. Moreover, there are different data models used in the GIS to represent the geometry of spatial objects. The vector data model is mostly used to express discrete features, such as points (for example, separately growing trees and points of interest), lines (roads or railways), and polygons (buildings or administrative borders). Raster data is convenient for expressing continuous phenomena that are better represented by coverage than by points, lines, or polygons. The most common raster data sources are remote sensing imagery, digital elevation models, and scanned and georeferenced topographic maps.

QGIS uses the GDAL/OGR spatial data library to read and write multiple vector and raster file formats. In the following sections, we will briefly discuss the most common file formats that you can get your data in. Additionally, we will take a look at the recently widely used data sources, such as CSV files, files collected by GPS-receivers, and OpenStreetMap.

Loading shapefiles

Most of our data is in the ESRI shapefile format, which is one of the most common vector data file formats. There are a few alternative ways of loading a shapefile into QGIS. You can open the dialog window by going to Layer | Add Layer | Add Vector Layer, or by clicking on the relevant button Loading shapefiles on the Manage Layers toolbar, or by using the Ctrl + Shift + V keyboard shortcut.

In the Add vector layer dialog window, configure the following items:

  • Source type, which can be File, Directory, Database, or Protocol. By default, the File source type specified is suitable for loading spatial data represented by separate files, like in our case.
  • Consider the Encoding drop-down list options if the data you work with contains special symbols or the charset of its textual attributes differs from the conventional Latin symbology. In this case, you should choose an appropriate encoding type from the drop-down list. Our data does not contain any special symbols, so we accept the default System encoding.
  • The Browse button is meant for navigating to the work directory. There, you can choose one or several files (with the Ctrl key) to add after hitting the Open button.

    Tip

    For the first time, you are likely to be overwhelmed by the amount and diversity of the available files. This is because in the GIS, a dataset is usually represented by several files with different extensions. For example, an ESRI shapefile consists of at least 4 files (.shp, .shx, .dbf, and .prj) that share the same name, and among them, .shp is what you should select to load the data into QGIS. You see all the files because the file type filter in the bottom-right corner of the window is set to All files by default. To hide all unnecessary files, choose the ESRI shapefiles file type. In future, don't forget to adjust the filter according to the desired file type.

Alternatively, you can use the Browser panel to navigate to the working directory. Select the files you want to load (either one or several, by holding down the Ctrl key), and then just drag and drop them onto the map area. If you want to simplify the navigation, add the folder you are currently working with to Favourites from its right-click menu shortcut.

Loading shapefiles

The loaded files are assigned random colors. Don't worry about that as of now; we will cover layer symbology in Chapter 2, Visualizing and Styling the Data.

Loading rasters

The procedure of adding raster files is similar to what was described earlier, so we will briefly go through it for the example of the common raster file format GeoTIFF:

  1. You can load a raster file by going to Layer | Add Layer | Add Raster Layer, by clicking on the relevant button Loading rasters on the Manage Layers toolbar, or by using the Ctrl + Shift + R keyboard shortcut.
  2. In the Open a GDAL Supported Raster Data Source window, go to the work directory.
  3. To see available the GeoTIFF files, remember to adjust a file type filter, select one or more files (by holding down the Ctrl key), and click on Open. Alternatively, you can drag and drop rasters from the Browser panel.

Loading data from the Personal GeoDatabase

ESRI Personal GeoDatabase is an original ArcGIS data format where all of the database's content is held in a single .mdb Microsoft Access file. It is widely used to store data in a single data file instead of multiple files of different formats.

Adding an ESRI file geodatabase to QGIS is similar to adding any other vector format:

  1. Access the dialogue window by going to Layer | Add Layer | Add Vector Layer, or by clicking on the relevant button Loading data from the Personal GeoDatabase on the Manage Layers toolbar, or with the Ctrl + Shift + V keyboard shortcut.
  2. Go to the work directory, set the file type filter to ESRI Personal GeoDatabase, and select the database file you want to import data from.
  3. In the Select vector layers to add... window, you will see the available layers and their characteristics. Click on the layers to be added and hit OK.
    Loading data from the Personal GeoDatabase

    Note

    Raster layers contained in the database will be interpreted and loaded into QGIS as bounding-box polygons. If the data is stored in tables that do not contain any spatial features, the geometry type will be displayed as Unknown. The tables will be loaded and available for exporting to other formats (for example, .dbf) or joining with spatial data layers.

Importing CSV files

A Comma-separated values (CSV) file is another popular data file format. In fact, it is just a spreadsheet with field values delimited by commas. There are various delimiters possible instead of commas (for example, tabs, spaces, colons and so on). Very often, these tables contain spatial data in the form of positional attributes represented by point longitude or latitude (XY) coordinates, or well-known text (WKT) geometry that describes points, lines, or polygons.

In our dataset, we have a CSV file called noise.csv. It contains the details of noise complaints registered mostly by the New York City Police Department. To add this file as a spatial layer, follow these steps:

  1. Open the Create a Layer from a Delimited Text File dialog window by going to Layer | Add Layer | Add Delimited Text Layer, or just click on the relevant button Importing CSV files in the Manage Layers toolbar.
  2. After browsing and pointing to your file, QGIS tries to parse it using the specified delimiter. By default, the comma delimiter is used, but you can specify any other delimiter using Custom delimiters (comma, tab, space, and so on) or Regular expression delimiter.
    Importing CSV files
  3. The dialog also provides access to a number of other useful settings; for example, turning on First record has field names creates headers for fields. After defining the geometry as Point coordinates, X field and Y field containing Longitude and Latitude values will be loaded from the dataset automatically.
  4. After you have clicked on OK, QGIS reads the data and might show a delimited text file error message similar to Errors in file full_path_to_the_file/filename.csv 100 records discarded due to missing geometry definitions. This means that some points do not contain geographic coordinates, and so they cannot be located properly. After closing the message window, you will be prompted to specify the Coordinate Reference System (CRS) for the layer.
    Importing CSV files

    As we can see from the Latitude and Longitude column values, point coordinates were originally registered by the receiving devices of the Global Position System (GPS) in decimal degrees. It is also known that GPS uses the WGS 84 CRS. This is why in the Coordinate Reference System Selector window, we enter the EPSG: 4326 code filter and specify WGS 84 under Geographic Coordinate Systems as the initial CRS. After clicking on OK, you will see that the data is rendered in the map canvas as points.

    Note

    QGIS uses CRS definitions based on the European Petroleum Search Group's (EPSG) Geodetic Parameter Dataset, which contains detailed structured descriptions of coordinate reference systems and transformations of global, regional, national, and local applications. The database of EPSG identifiers can be used to specify a CRS in QGIS. You can read more about the EPSG Geodetic Parameter Dataset at http://www.epsg-registry.org/.

Loading GPS data

As GPS receivers became portable and relatively cheap, GPS tracking became a ubiquitous and widely used technique of collecting data during a field survey, or simply tracking your own routes while running or cycling. Depending on the receiver's capabilities, in addition to spatial coordinates, a lot of information can be registered and written—for example, time, elevation, and so on. Registered information is stored in points that represent location changes (way, track, or route points), a planned route (if it exists), and a track of movement. There are numerous formats for storing GPS data. As primary data format, QGIS uses the standard interchange GPX (GPS eXchange) format.

We will load the nyc_marathon.gpx file from our dataset. You can load a .gpx file as a vector layer by going to Layer | Add Layer | Add Vector Layer, by clicking on the relevant button Loading GPS data in the Manage Layers toolbar, or by using the Ctrl + Shift + V keyboard shortcut. Go to the data directory and apply the GPS eXchange format (GPX) file type filter. Select the file (or files) you want to add and click on Open. Alternatively, you can drag and drop files from the Browser panel.

Loading GPS data

As GPS data consists of points, routes, and tracks, the window pops up where you choose exactly which feature you want to open. You can select one or more features by clicking on a row and holding down the Ctrl key. If you are not sure exactly which feature you need, use Select All. Every feature type will be presented in a separate layer. By turning layers on and off, you can check whether they contain data or not; for example, the file we work with contains only tracks and track points. You can remove unnecessary empty layers by right-clicking on the layer contextual shortcut Remove.

Note

Advanced options for working with GPS data are available through the GPS Tools core plugin. After activation, the plugin functions can be accessed by navigating to Vector | GPS | GPS Tools, or from the Loading GPS data button on the Vector toolbar panel.

Getting OpenStreetMap data

OpenStreetMap (OSM) is a crowdsourcing project aimed at the development of an open map of the world. Worldwide, the OSM community uses high-resolution remote sensing imagery, GPS surveying, and local knowledge to make the map as accurate and detailed as possible. As the OSM data is licensed under Open Data Commons' Open Database License (ODbL), it has recently become a widely used source of spatial data. Understanding the importance of unrestricted access to spatial data, QGIS supports OSM, providing integrated access and support for its data.

The QGIS core functionality is available from the OpenStreetMap menu under Vector. Here, you can find all the required tools to download the data and export it into conventional spatial data formats, but if you are new to the QGIS and OSM data concepts, you may find the process tedious. This is why we recommend that you use external QuickOSM plugin capabilities to download the OSM data.

After installation as described in the Extending functionality through plugins section, the plugin's main functionality can be accessed by going to Web | QuickOSM | QuickOSM. The Quick query tab of the main window contains everything you need to perform a query and get the data into QGIS. First, define a key=value pair from the drop-down lists, or just type it in manually.

Note

It can be quite difficult to select the appropriate tags for the first time if you are not familiar with the OSM tagging system. Each tag is a key=value pair that describes some point, linear, or polygonal feature. The key describes a broad class (for example, amenities), while the value gives the details (bank, cinema, café, bicycle parking, and so on). Use the Help with key/value button to know more about tagging from the OSM wiki page at http://wiki.openstreetmap.org/wiki/Mapfeatures.

Then, set up the area of interest extent by location name, map canvas, or layer. If the layer drop-down list is inactive, click on the Getting OpenStreetMap data button beside it to refresh it. In the Advanced section, you can turn on/off different geometry types. By default, all geometry types are turned on, so all the relevant points, lines, and polygons will be downloaded. Browse to the directory you want to save the data in. In the following screenshot, you can see the example of the QuickOSM query used to download bicycle parking point data.

Getting OpenStreetMap data

Tip

If you are familiar with the Overpass API query language, you can click on Show query or the Query tab to modify the initial query.

After clicking on the Run query button, the shapefile with the data will be loaded into the map canvas.

Dealing with projections

Projections define how real-world objects on the curved surface of the earth will be flattened and projected on a map-like planar surface. Different data sources are usually created and distributed in different projections, depending on acquisition techniques and the scope of application. To be able to manipulate and analyze them properly in QGIS, it is important to understand how it interprets and manages information about projections.

QGIS supports about 2,700 CRS. They constitute a database, each item of which is described by an ESPG identifier, and a description line in the format of the PROJ.4 projection library. To store and read information about projection, QGIS uses its own format stored in .qpj files. There are two important points to keep in mind while working with projections: a data source projection and project projection—which are not always the same.

Data source projection

When you load your data into QGIS, it tries to automatically define information about the projection from the accompanying projection description file and set it to a newly added layer. You can check the layer's projection information in the Layer Properties dialog. To open it, double-click on the layer name in Layers panel, or use the right-click contextual shortcut Properties. Information about the projection is shown in the Coordinate reference system section of the General tab, like this:

Data source projection

There are numerous projection description file formats, and they mostly depend on the data format and origin. One of the most common among them is a .prj file. This file format sometimes provides information about the projection in a reduced form, and QGIS cannot define it properly. If information about the projection is absent or incomplete, you will see that the projection description is missing or looks like this: USER:100000 - * Generated CRS (+proj=etc.). It means that QGIS didn't find an appropriate projection within its own database and added it as a custom CRS. If you are sure that the projection is standard but QGIS fails to interpret it properly because of a reduced description, specify it manually. There are different ways to assess the Coordinate Reference System Selector dialog as follows:

  • Double-click on the layer name in Layers panel to open the Layer Properties dialog. Under the General tab, click on the Select CRS button Data source projection to select the necessary CRS from the Coordinate reference system selector dialog window.
  • By going to Layer | Set CRS of Layer(s).
  • Using the Ctrl + Shift + C keyboard shortcut.
  • By right-clicking on the layer shortcut Set Layer CRS.

In the Coordinate reference system selector dialog, choose the necessary CRS from the list and click on OK. Note that you can use a filter by key words or the EPSG code to hide unnecessary projections. With time, often used projections will be added to the list of the recently used CRS.

Note

If QGIS doesn't define a projection for your data automatically and you are not sure about projection name and EPSG code, use the Prj2EPSG website at http://prj2epsg.org/. In this service, you just need to upload your .prj file, and well-known text projection information from it will be converted into standard EPSG code.

Note that specifying the projection manually from the Properties dialog is a temporary solution; it does not persist after closing a file and/or exiting QGIS. This means that whenever you are loading this file into QGIS, you will have to specify the projection again. If you are going to work with the file in other projects, it is better to use the Define Current Projection tool by going to Vector | Data Management Tools | Define Current Projection. In this dialog, you can choose a predefined spatial reference system from the Coordinate reference system Selector dialog or Import spatial reference system from existing layer with a known CRS. In both the cases, the existing .prj file will be overwritten by QGIS with all the necessary parameters, and you will not have to adjust the projection manually next time.

Data source projection

All of this is true when you import files from external sources. If you create a shapefile in QGIS, both .prj and .qpj files are created, so you don't need to define the projection manually. The files projection will be interpreted correctly in the other GIS applications that read it from .prj files.

You can also maintain QGIS behavior when loading or creating a new layer that has no CRS information by going to Settings | Options | CRS, where three alternatives of CRS for new layers are available:

  1. Prompt for CRS: In this case, you will always be asked to manually specify the CRS for the layer.
  2. Use project CRS: The data will be automatically assigned a CRS set for a project. This is a convenient choice if you are using files in the same projection, but if their projection differs from what is specified, you will not be able to see them.
  3. Use default CRS displayed below: Conventionally, EPSG:4326 - WGS 84 is used, but you can specify your own choice.

Working with projections can be tricky, unless you recognize the difference between the specify and define projection options. It's all about assigning information about the projection properly, but when you specify it, the result is temporary within a current working session. Once you define a projection, it becomes permanent unless redefined again. In both cases, if you choose the wrong projection, you will not be able to see your data on the map (at least in the area where you expect it to be). Usually it is good practice to specify the projection at first, comparing your data to the correctly projected dataset. If everything is okay, define it to make projection assignment permanent.

Project projection

When you load QGIS, its map canvas projection is, by default, set to EPSG:4326 – WGS 84. This behavior is defined by the global default projection, which can be changed by going to Settings | Options | CRS | Always start new projects with this CRS.

However, when you start adding data, projection identifier automatically changes to the projection of the first loaded layer. So, by default, project projection is defined by the first loaded layer. Data source projection and project projection are not always the same. If they are different, QGIS can apply the so-called on-the-fly transformation. This means that it reads the data projection, and if it differs, automatically aligns it with the project projection, applying the necessary transformations. There are a few ways to specify the projection for the project and enable on-the-fly transformation:

  • By going to Project | Project Properties | CRS.
  • Click on the Current CRSProject projection button on the Status bar, and activating Enable 'on the fly' CRS transformation in the Project properties | CRS window.
  • Go to Settings | Options | CRS | Default CRS for new projects. Activate either Automatically enable 'on the fly' reprojection if layers have different CRS or Enable 'on the fly' reprojection by default.

In the last way, the difference is very subtle and is mainly obvious when adding the first layer to the project. In the case of automatically enabled reprojection, the default map canvas CRS will be superseded by the first layer projection, and the following layers will be automatically adjusted to it too. In the case of reprojection by default, all layers will be reprojected into the project initial CRS (this is usually default global projection, unless you've changed it).

After on-the-fly transformation is enabled, you will see an OTF abbreviation near the current CRS on the status bar, and the icon will become solid.

If you want to quickly change the project CRS according to a specific layer in the Layers panel, right-click on a layer and choose the Set Project CRS from Layer shortcut.

Loading layers to a spatial database

Now that we have loaded all of the available data into QGIS, let's aggregate it into a single database. QGIS supports working with various database management systems and their spatial extensions (PostgreSQL/PostGIS, Oracle Spatial/GeoRaster, MSSQL Spatial, SQL Anywhere, and SQLite/SpatiaLite). Among them, PostGIS and SpatiaLite are the ones you have probably already heard about. Being common, these spatial databases are usually used for different purposes. PostGIS is an example of an enterprise solution used mostly on a server to provide spatial data maintenance and access for multiple users. SpatiaLite is a lightweight file database for personal use. Usage of SpatiaLite database has a number of advantages as follows:

  • All of the data is stored in a single, portable file, and you don't get overwhelmed by different file types (for example, .shp, .dbf, .shx, .prj, .qpj, and so on)
  • Shapefile limitations for size (up to 2 GB) and field name length (10 characters) can be omitted
  • Built-in spatial indices allow you to perform searches for large areas faster
  • This is a real relational database in a single format that allows you to use various spatial functions and SQL-based workflows

Perform the following steps to assemble your data into a single SpatiaLite database:

  1. First of all, you need to create an empty spatial database to load your data into. You can do this from the Browser panel. Right-click on the SpatiaLite entry and choose the Create database shortcut. Specify the folder and a .sqlite database file name. You will get the The database has been created message. Now you can expand the entry and see your newly created empty database.
  2. We will use the DB Manager core plugin that provides a single interface to work with different databases to load the data. The plugin functionality is accessible by going to Database | DB Manger. On the left side of the window, you can see a tree list of available database connections grouped by type. Once created, your database will automatically be available under the SpatiaLite item, and you can connect to it by double-clicking. When the connection is established, you will see general information about the database or its selected items in the Info tab on the right side of the window. To import files into the database, click on the Import layer/file button Loading layers to a spatial database, or access it from the Table menu.
    Loading layers to a spatial database
  3. In the opened Import vector layer window, you should define the layer you want to import. It could be one of the already loaded layers available in the Input drop-down list, or the layer you choose from the filesystem by clicking on the browse button .... Then, define the Output table name (in our case, it is ny_boroughs, the same as the input).
    Loading layers to a spatial database

    The following options allow you to exercise more control over your data:

    • Primary key: If this is not specified, the field will be named pk by default
    • Geometry column: If this is not specified, the field will be named geom by default
    • Source SRID and Target SRID: These are CRS EPSG codes read from the data, but you can specify them manually if the data isn't accompanied by projection files, or if you want to reproject it before loading it to the database
    • Encoding: If not specified, the dataset charset is set to UTF-8 by default
    • Drop existing table: If you import a table with the same name as a previously existing table, it will be replaced by the new table
    • Create single-part geometries instead of multipart: Multipart features will be disaggregated into single-part geometries before loading to the database
    • Create spatial index: A spatial index that allows faster spatial search and query performance will be created

After hitting OK and waiting a little (depending on the file size, the process may take some time), you will get the Import was successful message. To explore the imported table click on the Refresh button Loading layers to a spatial database, and you will see a geometry table in the list of database items. From the Info tab, you can view information about table, geometry type, fields, and triggers. The Table tab displays data in a tabular form, and the Preview tab displays spatial geometry, if any. By right-clicking on any element, you can delete, rename, or add it to the map canvas. All other opened layers can be loaded in a similar way.

Loading layers to a spatial database

Note

Aside from the core functionality, there is an external plugin called QSpatiaLite that is specially designed to support work with SpatiaLite databases. After installation, it will be available when you navigate to Database | SpatiaLite | QSpatiaLite.

Summary

For now, we have covered a few introductory topics and completed several tasks. First of all, you learned how to install QGIS, configure its interface, and extend functionalities with plugins. Then we discussed common data sources you can use to get data into QGIS. You are now capable of exploring and managing data in different projections. Last but not least, you imported all your data into a portable, lightweight SpatiaLite database file.

In the next chapter, we will move forward and reveal QGIS's potential for data visualization.

Left arrow icon Right arrow icon

Description

If you are a beginner or an intermediate GIS user, this book is for you. It is ideal for practitioners, data analysts, and application developers who have very little or no familiarity with geospatial data and software.

Who is this book for?

If you are a beginner or an intermediate GIS user, this book is for you. It is ideal for practitioners, data analysts, and application developers who have very little or no familiarity with geospatial data and software.
Estimated delivery fee Deliver to South Africa

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 29, 2015
Length: 316 pages
Edition : 1st
Language : English
ISBN-13 : 9781782174677
Vendor :
QGIS Development Team
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to South Africa

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

Product Details

Publication date : Jun 29, 2015
Length: 316 pages
Edition : 1st
Language : English
ISBN-13 : 9781782174677
Vendor :
QGIS Development Team
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 142.97
Mastering QGIS
$54.99
Learning QGIS, Third Edition
$38.99
QGIS By Example
$48.99
Total $ 142.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. Handling Your Data Chevron down icon Chevron up icon
2. Visualizing and Styling the Data Chevron down icon Chevron up icon
3. Presenting Data on a Print Map Chevron down icon Chevron up icon
4. Publishing the Map Online Chevron down icon Chevron up icon
5. Answering Questions with Density Analysis Chevron down icon Chevron up icon
6. Answering Questions with Visibility Analysis Chevron down icon Chevron up icon
7. Answering Questions with Suitability Analysis Chevron down icon Chevron up icon
8. Automating Analysis with Processing Models Chevron down icon Chevron up icon
9. Automating Analysis with Processing Scripts Chevron down icon Chevron up icon
10. Developing a Python Plugin – Select by Radius Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(4 Ratings)
5 star 75%
4 star 0%
3 star 25%
2 star 0%
1 star 0%
James Oct 12, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
QGIS is known as a great open source Desktop GIS application but for years good instructional books for it were hard to come by. QGIS by Example is a great new addition to anyone's library, no matter if they know little about QGIS or are an expert. Early chapters help newbies download, install, configure and start working with GIS layers, while later chapters are a great reference for users with experience who want to get more out of QGIS.The step by step chapters are a great refresher for those who want a better understanding on how to perform GIS analysis and are littered with great screenshots, shortcuts and tips on advanced topics. Esri ArcGIS Desktop users will appreciate the detailed raster and vector analysis sections where they'll quickly pick up on how they can perform GIS processes that don't require expensive extension licenses.There is an excellent section on scripting QGIS with Python which will help automate processes. The book even goes into how to create your own Python plugins for QGIS which is much easier than you think. But it isn't all about scripting and analysis, the book will also help you make great looking cartographic decisions and printable maps. It will even walk you through publishing your maps on the web easily without the need of expensive hosting options.I've been recommending that GIS professionals take a long look at QGIS and many have. With QGIS by Example, they'll be able to have a desk reference book to help them learn, use and excel at QGIS. QGIS by Example is the QGIS book to buy if you're a QGIS user or want to become one.I was provided a review copy of this book by Packt Publishing.
Amazon Verified review Amazon
Jonathan Gross Aug 22, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
QGIS by Example is extremely well written compared to other technical, QGIS, and GIS books. The authors use a conversational tone while maintaining an economy of words. The bottom line: It is probably the single best book about QGIS currently out!The book also features easy-to-read screenshots and maps to help illustrate key points. Often in similar texts, screenshots are cramped or hard to read. However, this is not the case here.The book is specifically geared towards common tasks that all GIS professionals and open source will appreciate--whether beginner or intermediate. Highlights include:Downloading and installing QGIS via OSGEO4WDownloading OpenStreetMap data with the Quick OSM PluginLayer blending effects with examplesPrint Composer, including combining several maps within the same composer, overview/extent maps, atlas/map book generationQGIS Cloud Plugin - online web map publishing via this free cloud serviceBinning/Quadrats/Grids with hexagons - summing points within an equal areaLine of Sight / Visibility Analysis with 3D visualizationSuitability analysisProcessing models (automating tasks)Building a pluginIn addition, the book features cartographic tips along the way to help you make great looking maps! Lastly, the book was reviewed by two open source QGIS stalwarts / gurus so you know the text is as good as possible!Disclosures: I received a free copy of the e-book from the publisher and served as a reviewer for a past book about QGIS by the same publisher.-Author of the Open Source GIS Blog
Amazon Verified review Amazon
K. König E. Fisel Aug 25, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Sehr gut gewählte Beispiele; insbesondere bei den Powerfunktionen von QGIS. Hier zu zählen für meinen Bedarf die Erstellung von Kartenserien (=Atlas), Sichtbarkeitsanalysen (=Viewsheds) und die Verwendung der regelbasierten Symbolisierung.
Amazon Verified review Amazon
artemisia Apr 06, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I purchased this book because it specifically says that it is for beginners. However, even though I consider myself as having enough computer skills to approach learning this software on my own, I found it not really suitable for beginners. I even found some places in the book where the explanation does not match the software's content, or that of the exercise file you download to use with the book. The publishers have been responsive to my queries about these, but this is not the way to do things if the book is recommended for beginners.I can see why this book is a good one for those with a background in GIS, but if you want to teach yourself and have things better explained, I would advise you to look elsewhere. This book is a bit too frustrating for the novice.I have since ordered a different self-tutorial book on QGIS - will put up a review when I get it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela