QGIS User Guide - OSGeo Server

QGIS User Guide - OSGeo Server

12. Using QGIS Core Plugins

Icon Plugin

Table 7: 23 QGIS Core Plugins

Description

Add Delimited Text Layer Loads and displays delimited text files containing x,y coordinates

Coordinate Capture

Copyright Label

Capture mouse coordinate in different CRS

Draws a copyright label with information

Diagram Overlay

DXF2Shape Converter eVis fTools

GPS Tools

Place charts (pie or bar) or proportional symbols over vector layers

Converts from DXF to SHP file format

Event Visualization Tool

A suite of analysis, geometry, geoprocessing, and research tools

Tools for loading and importing GPS data

GRASS

Georeferencer GDAL

Interpolation plugin

Labeling

Activates the mighty GRASS Toolbox

Adding projection info to Rasterfiles using GDAL

Interpolation on base of vertices of a vector layer

Smart labeling for vector layers

12 USING QGIS CORE PLUGINS

12.1. Coordinate Capture Plugin

The coordinate capture plugin is easy to use and provides the ability to display coordinates on the map canvas for two selected Coordinate Reference Systems (CRS).

Figure 63: Coordinate Cature Plugin

1. Start QGIS, select

Project Properties from the Settings (KDE, Windows) or File (Gnome,

OSX) menu and click on the Projection tab. As an alternative you you can also click on the projector icon in the lower right-hand corner of the statusbar.

2. Click on the x Enable on the fly projection checkbox and select a projected coordinate system of your choice (see also Section

8 ).

3. Load the coordinate capture plugin in the Plugin Manager (see Section

11.1.1

) and ensure that

the dialog is visible by going to View > Panels and ensuring that x Coordinate Capture is enabled. The cordinate capture dialog appears as shown in Figure

63 .

4. Click on the

Click to the select the CRS to use for coordinate display icon and select a different CRS from the one you selected above.

5. To start capturing coordinates, click on Start capture . You can now click anywhere on the map canvas and the plugin will show the coordinates for both of your selected CRS.

6. To enable mouse coordinate tracking click the mouse tracking icon.

7. You can also copy selected coordinates to the clipboard.

QGIS 1.4.0 User Guide 148

12.2

Decorations Plugins

12.2. Decorations Plugins

The Decorations Plugins includes the Copyright Label Plugin, the North Arrow Plugin and the Scale

Bar Plugin. They are used to “decorate” the map by adding cartographic elements.

12.2.1. Copyright Label Plugin

The title of this plugin is a bit misleading - you can add any random text to the map.

Figure 64: Copyright Label Plugin

1. Make sure the plugin is loaded

2. Click on Plugins > Decorations >

Copyright Label or use the button from the Toolbar.

Copyright Label

3. Enter the text you want to place on the map. You can use HTML as shown in the example

4. Choose the placement of the label from the Placement Bottom Right

H drop-down box

5. Make sure the x Enable Copyright Label checkbox is checked

6. Click OK

QGIS 1.4.0 User Guide 149

12 USING QGIS CORE PLUGINS

In the example above (default) places a copyright symbol followed by the date in the lower right hand corner of the map canvas.

12.2.2. North Arrow Plugin

The North Arrow plugin places a simple north arrow on the map canvas. At present there is only one style available. You can adjust the angle of the arrow or let QGIS set the direction automatically. If you choose to let QGIS determine the direction, it makes its best guess as to how the arrow should be oriented. For placement of the arrow you have four options, corresponding to the four corners of the map canvas.

Figure 65: North Arrow Plugin

12.2.3. Scale Bar Plugin

The Scale Bar plugin adds a simple scale bar to the map canvas. You control the style and placement, as well as the labeling of the bar.

QGIS only supports displaying the scale in the same units as your map frame. So if the units of your layers are in meters, you can’t create a scale bar in feet. Likewise if you are using decimal degrees, you can’t create a scale bar to display distance in meters.

To add a scale bar:

1. Click on Plugins > Decorations >

Scale Bar or use the the Toolbar.

Scale Bar button from

2. Choose the placement from the Placement Bottom Left

H drop-down list

3. Choose the style from the Scale bar style Tick Down

H list

QGIS 1.4.0 User Guide 150

12.2

Decorations Plugins

4. Select the color for the bar Color of bar

5. Set the size of the bar and its label Size of bar 30 degrees

N

H or use the default black color

6. Make sure the x Enable scale bar checkbox is checked

7. Optionally choose to automatically snap to a round number when the canvas is resized x Automatically snap to round number on resize

8. Click OK

Figure 66: Scale Bar Plugin

Tip 45 P

LUGINS

S

ETTINGS

S

AVED TO

P

ROJECT

When you save a .qgs project, any changes you have made to NorthArrow, ScaleBar and Copyright plugins will be saved in the project and restored nexttime you load the project.

QGIS 1.4.0 User Guide 151

12 USING QGIS CORE PLUGINS

12.3. Delimited Text Plugin

The Delimited Text plugin allows you to load a delimited text file as a layer in QGIS.

Requirements

To view a delimited text file as layer, the text file must contain:

1. A delimited header row of field names. This must be the first line in the text file.

2. The header row must contain an X and Y field. These fields can have any name.

3. The x and y coordinates must be specified as a number. The coordinate system is not important.

As an example of a valid text file we import the elevation point data file elevp.csv

coming with the

QGIS sample dataset (See Section

3.2

):

X;Y;ELEV

-300120;7689960;13

-654360;7562040;52

1640;7512840;3

[...]

Some items of note about the text file are:

1. The example text file uses

; as delimiter. Any character can be used to delimit the fields.

2. The first row is the header row. It contains the fields X, Y and ELEV.

3. No quotes (

"

) are used to delimit text fields.

4. The x coordinates are contained in the X field.

5. The y coordinates are contained in the Y field.

Using the Plugin

To use the plugin you must first enable it as described in Section

11.1

.

Click the new toolbar icon shown in Figure

67 .

Add Delimited Text Layer to open the Delimited Text dialog as

First select the file (e.g., qgis_sample_data/csv/elevp.csv

) to import by clicking on the Browse button. Once the file is selected, the plugin attempts to parse the file using the last used delimiter, in this case a semi-colon ( ; ). To properly parse the file, it is important to select the correct delimiter. To

QGIS 1.4.0 User Guide 152

Figure 67: Delimited Text Dialog

12.3

Delimited Text Plugin change the delimiter to tab use \ t (this is a regular expression for the tab character). After changing the delimiter, click Parse .

Once you have parsed the file, choose the X and Y fields from the drop down lists and enter a Layer name (e.g., elevp ) as shown in Figure

67 . To add the layer to the map, click Add Layer . The

delimited text file now behaves as any other map layer in QGIS.

QGIS 1.4.0 User Guide 153

12 USING QGIS CORE PLUGINS

12.4. Dxf2Shp Converter Plugin

The dxf2shape converter plugin can be used to convert vector data from DXF to Shapefile format. It requires the following parameters to be specified before running:

Input DXF file: Enter path to the DXF file to be converted

Output Shp file: Enter desired name of the Shapefile to be created

Output file type: Specify the geometry type of the output Shapefile. Currently supported types are polyline, polygone, and point.

Export text labels: When this checkbox is enabled, an additional Shapefile point layer will be created, and the associated dbf table will contain information about the "TEXT" fields found in the dxf file, and the text strings themselves.

Figure 68: Dxf2Shape Converter Plugin

Using the Plugin

1. Start QGIS, load the Dxf2Shape plugin in the Plugin Manager (see Section

11.1.1

) and click

on the

Dxf2Shape Converter icon which appears in the QGIS toolbar menu. The

Dxf2Shape plugin dialog appears as shown in Figure

68 .

2. Enter input DXF file, a name for the output Shapefile and the Shapefile type.

3. Enable the x Export text labels checkbox if you want to create an extra point layer with labels.

4. Click Ok .

QGIS 1.4.0 User Guide 154

12.5

eVis Plugin

12.5. eVis Plugin

The Biodiversity Informatics Facility at the American Museum of Natural History’s (AMNH) Center for

Biodiversity and Conservation (CBC)

9 has developed the Event Visualization Tool (eVis), another software tool to add to the suite of conservation monitoring and decision support tools for guiding protected area and landscape planning. This plugin enables users to easily link geocoded (i.e., referenced with latitude and longitude or X and Y coordinates) photographs, and other supporting documents, to vector data in QGIS.

eVis is now automatically installed and enabled in new versions of QGIS, and as with all plugins, it can be disabled and enabled using the Plugin Manager (See Section

11.1

).

The eVis plugin is made up of three modules: the Database Connection tool, Event ID tool, and the

Event Browser. These work together to allow viewing of geocoded photographs and other documents that are linked to features stored in vector files, databases, or spreadsheets.

12.5.1. Event Browser

The Event Browser module provides the functionality to display geocoded photographs that are linked to vector features displayed in the QGIS map window. Point data, for example, can be from a vector file that can be input using QGIS or it can be from the result of a database query. The vector feature must have attribute information associated with it to describe the location and name of the file containing the photograph and, optionally, the compass direction the camera was pointed when the image was acquired. Your vector layer must be loaded into QGIS before running the Event Browser.

Launch the Event Browser module

To launch the Event browser module either click on the

Event Browser icon or click on

Plugins > eVis > eVis Event Browser . This will open the Generic Event Browser window.

The Generic Event Browser window has three tabs displayed at the top of the window. The Display tab is used to view the photograph and its associated attribute data. The Options tab provides a number of settings that can be adjusted to control the behavior of the eVis plugin. Lastly, the

Configure External Applications tab is used to maintain a table of file extensions and their associated application to allow eVis to display documents other than images.

9

This section is derived from Horning, N., K. Koy, P. Ersts. 2009. eVis (v1.1.0) User’s Guide. American Museum of

Natural History, Center for Biodiversity and Conservation. Available from http://biodiversityinformatics.amnh.org/ , and released under the GNU FDL.

QGIS 1.4.0 User Guide 155

12 USING QGIS CORE PLUGINS

Understanding the Display window

To see the Display window click on the Display tab in the Generic Event Browser window. The

Display window is used to view geocoded photographs and their associated attribute data.

Figure 69: The eVis display window

Display window: A window where the photograph will appear.

Increase zoom button: Zoom in to see more detail. If the entire image cannot be displayed in the display window, scroll bars will appear on the left and bottom sides of the window to allow you to pan around the image.

Reduce zoom button: Zoom out to see more area.

Zoom to full extent button: Displays the full extent of the photograph.

Attribute information window: All of the attribute information for the point associated with the

QGIS 1.4.0 User Guide 156

12.5

eVis Plugin photograph being viewed is displayed here. If the file type being referenced in the displayed record is not an image but is of a file type defined in the Configure External Applications tab then when you double-click on the value of the field containing the path to the file the application to open the file will be launched to view or hear the contents of the file. If the file extension is recognized the attribute data will be displayed in green.

Navigation buttons: Use the Previous and Next buttons to load the previous or next feature when more than one feature is selected.

Feature indicator: This heading indicates which feature is being displayed and how many features are available for display.

Understanding the Options window

Figure 70: The eVis Options window

QGIS 1.4.0 User Guide 157

12 USING QGIS CORE PLUGINS

File location: A dropdown list to specify the attribute field that contains the directory path or

URL for the photographs or other documents being displayed. If the location is a relative path then the checkbox to the right of the dropdown menu must be clicked. The base path for a relative path can be entered in the Base Path text box below. Information about the different options for specifying the file location are noted in the section 4.5 below.

Compass bearing display field: A dropdown list to specify the attribute field that contains the compass bearing associated with the photograph being displayed. If compass bearing information is available it is necessary to click the radio button to the left of the dropdown menu title.

Compass offset setting: Compass offsets can be used to compensate for declination (adjust bearings collected using magnetic bearings to true north bearings). Click the Manual radiobutton to enter the offset in the text box or click the From Attribute radio-button to select the attribute field containing the offsets. For both of these options east declinations should be entered using positive values and west declinations should use negative values.

Directory base path: The base path onto which the relative path defined in Figure

70

(A) will be appended.

Replace path: If this check-box is checked, only the file name from the A will be appended to the Base Path.

Apply rule to all documents: If checked, the same path rules that are defined for photographs will be used for non-image documents such as movies, text documents, and sound files. If not checked the path rules will only apply to photographs and other documents will ignore the Base

Path parameter.

Save settings: If the check-box is checked the values for the associated parameters will be saved for the next session when the window is closed or when the Save button below is pressed.

Reset values: Resets the values on this line to the default setting.

Restore faults: This will reset all of the fields to their default settings. It has the same effect as clicking all of the Reset buttons.

Save: This will save the settings without closing the Options pane.

Understanding the Configure External Applications window

File reference table: A table containing file types that can be opened using eVis. Each file type needs a file extension and the path to an application that can open that type of file. This provides the capability of opening a broad range of files such as movies, sound recordings, and text documents instead of only images.

Add new file type: Add a new file type with a unique extension and the path for the application

QGIS 1.4.0 User Guide 158

Figure 71: The eVis External Applications window

12.5

eVis Plugin that can open the file.

Delete current row: Delete the file type highlighted in the table and defined by a file extension and a path to an associated application.

Specifying the location and name of a photograph

The location and name of the photograph can be stored using an absolute or relative path or a URL if the photograph is available on a web server. Examples of the different approaches are listed in Table

??.

Table 8: Example format using absolute path, relative path, and a URL

X Y FILE

780596 1784017 C:\Workshop\eVis_Data\groundphotos\DSC_0168.JPG

780596 1784017 /groundphotos/DSC_0169.JPG

780819 1784015 http://biodiversityinformatics.amnh.org/evis_test_data/DSC_0170.JPG

780596 1784017 pdf:http://www.testsite.com/attachments.php?attachment_id-12

BEARING

275

80

10

76

Specifying the location and name of a other supporting documents

Supporting documents such as text documents, videos, and sound clips can also be displayed or played by eVis. To do this it is necessary to add an entry in the file reference table that can be accessed from the Configure External Applications window in the Generic Event Browser that matches the file extension to an application that can be used to open the file. It is also necessary to have the path or URL to the file in the attribute table for the vector layer. One additional rule that can be used for URLs that don’t contain a file extension for the document you want to open is to specify the file extension before the URL. The format is - file extension:URL. The URL is preceded by the file extension and a colon, and is particularly useful for accessing documents from Wikis and other web

QGIS 1.4.0 User Guide 159

12 USING QGIS CORE PLUGINS sites that use a database to manage the web pages (see Table ??).

Using the Generic Event Browser

When the Event Browser window opens a photograph will appear in the display window if the document referenced in the vector file attribute table is an image and if the file location information in the Options window is properly set. If a photograph is expected and it does not appear it will be necessary to adjust the parameters in the Options window.

If a supporting document (or an image that does not have a file extension recognized by eVis) is referenced in the attribute table the field containing the file path will be highlighted in green in the attribute information window if that file extension is defined in the file reference table located in the Configure

External Applications window. To open the document double-click on the green-highlighted line in the attribute information window. If a supporting document is referenced in the attribute information window and the file path is not highlighted in green then it will be necessary to add an entry for the file’s filename extension in the Configure External Applications window. If the file path is highlighted in green but does not open when double-clicked it will be necessary to adjust the parameters in the

Options window so the file can be located by eVis.

If no compass bearing is provided in the Options window a red asterisk will be displayed on top of the vector feature that is associated with the photograph being displayed. If a compass bearing is provided then an arrow will appear pointing in the direction indicated by the value in the compass bearing display field in the Generic Event Browser window. The arrow will be centered over the point that is associated with the photograph or other document.

To close the Generic Event Browser window click on the Close button from the Display window.

12.5.2. Event ID Tool

The Event ID module allows you to display a photograph by clicking on a feature displayed in the

QGIS map window. The vector feature must have attribute information associated with it to describe the location and name of the file containing the photograph and optionally the compass direction the camera was pointed when the image was acquired. This layer must be loaded into QGIS before running the Event ID tool.

Launch the Event ID module

To launch the Event ID module either click on the

Event ID icon or click on Plugins > eVis

> Event ID Tool . This will cause the cursor to change to an arrow with an“i” on top of it signifying that the ID tool is active.

To view the photographs linked to vector features in the active vector layer displayed in the QGIS

QGIS 1.4.0 User Guide 160

12.5

eVis Plugin map window, move the Event ID cursor over the feature and then click the mouse. After clicking on the feature, the Generic Event Browser window is opened and the photographs on or near the clicked locality are available for display in the browser. If more than one photograph is available, you can cycle through the different features using the Previous and Next buttons. The other controls are described in the Event Browser section of this guide.

12.5.3. Database connection

The Database Connection module provides tools to connect to and query a database or other

ODDBC resource, such as a spreadsheet.

eVis can directly connect to four types of databases: Microsoft Access, PostgreSQL, MySQL,

SQLITE, and can also read from ODBC connections. When reading from an ODBC database (such as an Excel spreadsheet) it is necessary to configure your ODBC driver for the operating system you are using.

Launch the Database Connection module

To launch the Database Connection module either click on the appropriate icon or click on Plugins > eVis > Database Connection . This will launch the Database Connection window.

The window has three tabs: Predefined Queries , Database Connection , and SQL Query . The

Output Console window at the bottom of the window displays the status of actions initiated by the different sections of this module.

Connect to a database

Click on the Database Connection tab to open the database connection interface. Next, click on the Database Type dropdown menu to select the type of database that you want to connect to. If a password or username is required, that information can be entered in the Username and Password textboxes.

Enter the database host in the Database Host textbox. This option is not available if you selected

“MSAccess” as the database type. If the database resides on your desktop you should enter “localhost.”

Enter the name of the database in the Database Name textbox. If you selected “ODBC” as the database type, you need to enter the data source name.

When all of the parameters are filled in, click on the Connect button. If the connection is successful, a message will be written in the Output Console window stating that the connection was established.

If a connection was not established you will need to check that the correct parameters were entered above.

QGIS 1.4.0 User Guide 161

12 USING QGIS CORE PLUGINS

Figure 72: The eVis Database connection window

Database Type: A dropdown list to specify the type of database that will be used.

Database Host: The name of the database host.

Port The port number if a “MYSQL” database type is selected.

Database Name The name of the database.

Connect A button to connect to the database using the parameters defined above.

Output Console The console window where messages related to processing are displayed.

Username: Username for use when a database is password protected.

QGIS 1.4.0 User Guide 162

12.5

eVis Plugin

Password: Password for use when a database is password protected.

Predefined Queries: Tab to open the “Predefined Queries” window.

Database Connection: Tab to open the “Database Connection” window.

SQL Query: Tab to open the “SQL Query” window.

Help: Displays the on line help.

OK: Close the main “Database Connection” window.

Running SQL queries

SQL queries are used to extract information from a database or ODBC resource. In eVis the output from these queries is a vector layer added to the QGIS map window. Click on the SQL Query tab to display the SQL query interface. SQL commands can be entered in this text window. A helpful tutorial on SQL commands is available at http://www.w3schools.com/sql/

. For example, to extract all of the data from a worksheet in an Excel file, “select * from [sheet1$]” where“sheet1” is the name of the worksheet.

Click on the Run Query button to execute the command. If the query is successful a Database File

Selection window will be displayed. If the query is not successful an error message will appear in the

Output Console widow.

In the Database File Selection window, enter the name of the layer that will be created from the results of the query in the Name of New Layer textbox.

SQL Query Text Window: A screen to type SQL queries.

Run Query: Button to execute the query entered in the SQL Query Window.

Console Window: The console window where messages related to processing are displayed.

Help: Displays the on line help.

OK: If this check-box is checked, only the file name from the A will be appended to the Base

Path.

Apply rule to all documents: Closes the main “Database Connection” window.

Use the X Coordinate and Y Coordinate dropdown menus to select the field from the database that store the “X” (or longitude) and “Y” (or latitude) coordinates. Clicking on the OK button causes the vector layer created from the SQL query to be displayed in the QGIS map window.

To save this vector file for future use, you can use the QGIS “Save as shapefile” command that is accessed by right clicking on the layer name in the QGIS map legend and then selecting “Save as shapefile.”

QGIS 1.4.0 User Guide 163

12 USING QGIS CORE PLUGINS

Figure 73: The eVis SQL query tab

Running predefined queries

With predefined queries you can select previously written queries stored in XML format in a file. This is particularly helpful if you are not familiar with SQL commands. Click on the Predefined Queries tab to display the predefined query interface.

To load a set of predefined queries click on the

Open File icon. This opens the Open File window which is used to locate the file containing the SQL queries. When the queries are loaded their titles, as defined in the XML file, will appear in the dropdown menu located just below the

Open File icon, the full description of the query is displayed in the text window under the dropdown

QGIS 1.4.0 User Guide 164

12.5

eVis Plugin

Tip 46 C

REATING A VECTOR LAYER FROM A

M

ICROSOFT

E

XCEL

W

ORKSHEET

When creating a vector layer from a Microsoft Excel Worksheet you might see that unwanted zeros (“0”) have been inserted in the attribute table rows beneath valid data.This can be caused by deleting the values for these cells in Excel using the “backspace” key. To correct this problem you need to open the Excel file (you’ll need to close QGIS if there if you are connected to the file to allow you to edit the file) and then use Edit >

Delete to remove the blank rows from the file. To avoid this problem you can simply delete several rows in the

Excel Worksheet using Edit > Delete before saving the file.

menu.

Select the query you want to run from the dropdown menu and then click on the SQL Query tab to see that the query has been loaded into the query window. If it is the first time you are running a predefined query or are switching databases, you need to be sure to connect to the database.

Click on the Run Query button in the SQL Query tab to execute the command. If the query is successful a Database File Selection window will be displayed. If the query is not successful an error message will appear in the Output Console window.

Figure 74: The eVis Perdefined queries tab

QGIS 1.4.0 User Guide 165

12 USING QGIS CORE PLUGINS

Open Query File: Launches the “Open File” file browser to search for the XML file holding the predefined queries.

Predefined Queries: A dropdown list with all of the queries defined by the predefined queries

XML file.

Query description: A short description of the query. This description is from the predefined queries XML file.

Console Window: The console window where messages related to processing are displayed.

Help: Displays the on line help.

OK: Closes the main “Database Connection” window.

XML format for eVis predefined queries

Table 9: The XML tags read by eVis

Tag

query shortdescription description

Description

Defines the beginning and end of a query statement.

A short description of the query that appears in the eVis dropdown menu.

A more detailed description of the query displayed in the Predefined

Query text window.

databasetype The database type as defined in the Database Type dropdown menu in the Database Connection tab.

The port as defined in the Port textbox in the Database Connection tab.

databaseport databasename The database name as defined in the Database Name textbox in the

Database Connection tab.

databaseusername The database username as defined in the Username textbox in the

Database Connection tab.

databasepassword The database password as defined in the Password textbox in the

Database Connection tab.

sqlstatement autoconnect

The SQL command.

A flag (“true” or “false”) to specify if the above tags should be used to automatically connect to database without running the database connection routine in the Database Connection tab.

A complete sample XML file with three queries is displayed below:

<?xml version="1.0"?>

<doc>

<query>

QGIS 1.4.0 User Guide 166

12.5

eVis Plugin

<shortdescription>Import all photograph points</shortdescription>

<description>This command will import all of the data in the SQLite database to QGIS

</description>

<databasetype>SQLITE</databasetype>

<databasehost />

<databaseport />

<databasename>C:\textbackslash Workshop/textbackslash eVis\_Data\textbackslash PhotoPoints.db</databasename>

<databaseusername />

<databasepassword />

<sqlstatement>SELECT Attributes.*, Points.x, Points.y FROM Attributes LEFT JOIN

Points ON Points.rec_id=Attributes.point_ID</sqlstatement>

<autoconnect>false</autoconnect>

</query>

<query>

<shortdescription>Import photograph points "looking across Valley"</shortdescription>

<description>This command will import only points that have photographs "looking across a valley" to QGIS</description>

<databasetype>SQLITE</databasetype>

<databasehost />

<databaseport />

<databasename>C:\Workshop\eVis_Data\PhotoPoints.db</databasename>

<databaseusername />

<databasepassword />

<sqlstatement>SELECT Attributes.*, Points.x, Points.y FROM Attributes LEFT JOIN

Points ON Points.rec_id=Attributes.point_ID where COMMENTS=’Looking across valley’</sqlstatement>

<autoconnect>false</autoconnect>

</query>

<query>

<shortdescription>Import photograph points that mention "limestone"</shortdescription>

<description>This command will import only points that have photographs that mention

"limestone" to QGIS</description>

<databasetype>SQLITE</databasetype>

<databasehost />

<databaseport />

<databasename>C:\Workshop\eVis_Data\PhotoPoints.db</databasename>

<databaseusername />

<databasepassword />

<sqlstatement>SELECT Attributes.*, Points.x, Points.y FROM Attributes LEFT JOIN

Points ON Points.rec_id=Attributes.point_ID where COMMENTS like ’%limestone%’

</sqlstatement>

QGIS 1.4.0 User Guide 167

12 USING QGIS CORE PLUGINS

<autoconnect>false</autoconnect>

</query>

</doc>

QGIS 1.4.0 User Guide 168

12.6

fTools Plugin

12.6. fTools Plugin

The goal of the fTools python plugin is to provide a one-stop resource for many common vector-based

GIS tasks, without the need for additional software, libraries, or complex workarounds. It provides a growing suite of spatial data management and analysis functions that are both fast and functional.

fTools is now automatically installed and enabled in new versions of QGIS, and as with all plugins, it can be disabled and enabled using the Plugin Manager (See Section

11.1

). When enabled, the

fTools plugin adds a Vector menu to QGIS, providing functions ranging from Analysis and Research

Tools to Geometry and Geoprocessing Tools, as well as several useful Data Management Tools.

fTools functions

Tables

10

through

14

list the functions available via the fTools plugin, along with a brief description of each function.

For further information on an individual fTools function, please click the fTools Information menu item in the Vector menu.

Icon Tool

Distance Matrix

Table 10: fTools Analysis tools

Analysis tools available via the fTools plugin

Purpose

Measure distances between two point layers, and output results as a)

Square distance matrix, b) Linear distance matrix, or c) Summary of distances. Can limit distances to the k nearest features.

Sum line length Calculate the total sum of line lengths for each polygon of a polygon vector layer.

Points in polygon Count the number of points that occur in each polygon of an input polygon vector layer.

List unique values List all unique values in an input vector layer field.

Basic statistic Compute basic statistics (mean, std dev, N, sum, CV) on an input field.

Nearest Neighbor analysis

Compute nearest neighbour statistics to assess the level of clustering in a point vector layer.

Mean nate(s) coordiCompute either the normal or weighted mean center of an entire vector layer, or multiple features based on a unique ID field.

Line intersections Locate intersections between lines, and output results as a point shapefile. Useful for locating road or stream intersections, ignores line intersections with length > 0.

QGIS 1.4.0 User Guide 169

12 USING QGIS CORE PLUGINS

Table 11: fTools Research tools

Research tools available via the fTools plugin

Purpose Icon Tool

Random selection Randomly select n number of features, or n percentage of features

Random selection within subsets

Randomly select features within subsets based on a unique ID field.

Random points

Regular points

Generate pseudo-random points over a given input layer.

Generate a regular grid of points over a specified region and export them as a point shapefile.

Vector grid Generate a line or polygon grid based on user specified grid spacing.

Select by location Select features based on their location relative to another layer to form a new selection, or add or subtract from the current selection.

Polygon from layer extent

Create a single rectangular polygon layer from the extent of an input raster or vector layer.

Icon Tool

Convex hull(s)

Buffer(s)

Intersect

Union

Table 12: fTools Geoprocessing tools

Geoprocessing tools available via the fTools plugin

Purpose

Create minimum convex hull(s) for an input layer, or based on an ID field.

Create buffer(s) around features based on distance, or distance field.

Overlay layers such that output contains areas where both layers intersect.

Overlay layers such that output contains intersecting and non-intersecting areas.

Overlay layers such that output contains those areas of the input and difference layers that do not intersect.

Symetrical difference

Clip Overlay layers such that output contains areas that intersect the clip layer.

Difference Overlay layers such that output contains areas not intersecting the clip layer.

Dissolve Merge features based on input field. All features with indentical input values are combined to form one single feature.

QGIS 1.4.0 User Guide 170

12.6

fTools Plugin

Table 13: fTools Geometry tools

Geometry tools available via the fTools plugin

Purpose Icon Tool

Check geometry Check polygons for intersections, closed-holes, and fix node ordering.

Export/Add geometry columns

Add vector layer geometry info to point (XCOORD, YCOORD), line

(LENGTH), or polygon (AREA, PERIMETER) layer.

Polygon centroids Calculate the true centroids for each polygon in an input polygon layer.

Delaunay triangulation

Calculate and output (as polygons) the delaunay triangulation of an input point vector layer.

Simplify geometry Generalise lines or polygons with a modified Douglas-Peucker algorithm.

Multipart to singleparts

Convert multipart features to multiple singlepart features. Creates simple polygons and lines.

Singleparts multipart to Merge multiple features to a single multipart feature based on a unique

ID field.

Polygons to lines Convert polygons to lines, multipart polygons to multiple singlepart lines.

Extract nodes Extract nodes from line and polygon layers and output them as points.

Table 14: fTools Data management tools

Data management tools available via the fTools plugin

Purpose Icon Tool

Export to projection Project features to new CRS and export as new shapefile.

Define projection

Join attributes

Specify the CRS for shapefiles whose CRS has not been defined.

Join additional attributes to vector layer attribute table and output results to a new shapefile. Additional attributes can be from a vector layer or stand-alone dbf table.

Join attributes by location

Join additional attributes to vector layer based on spatial relationship.

Attributes from one vector layer are appended to the attribute table of another layer and exported as a shapefile

Split vector layer Split input layer into multiple separate layers based on input field.

QGIS 1.4.0 User Guide 171

12 USING QGIS CORE PLUGINS

12.7. Georeferencer Plugin

The Georeferencer Plugin is a tool for generating world files for rasters. It allows you to reference rasters to geographic or projected coordinate systems by creating a world file, or by transforming the raster to a new coordinate system. The basic approach to georeferencing a raster is to locate points on the raster for which you can accurately determine their coordinates. The source of the coordinates can be:

1. The raster itself, sometimes coordinates are literally ‘written’ on the raster. In this case you can enter the coordinates manually.

2. Other georeferenced data, this can be either vector or raster data that contain the same objects/features that you have on the raster that you want to georeference. In this case you can enter the coordinates by clicking on the reference dataset loaded in QGIS map canvas.

The usual procedure for georeferencing an image involves selecting multiple points on the raster, specifying their coordinates, and choosing a relevant transformation type. Based on the input parameters and data, the plugin will compute the world file parameters. The more coordinates you provide, the better the result will be.

The first step is to start QGIS and load the Georeferencer Plugin (see Section

11.1.1

) and click on

the

Georeferencer icon which appears in the QGIS toolbar menu. The Georeferencer Plugin dialog appears as shown in Figure

75 .

For this example, we are using a topo sheet of South Dakota from SDGS. It can later be visualized together with the data from the GRASS spearfish60 location. You can download the topo sheet here: http://grass.osgeo.org/sampledata/spearfish_toposheet.tar.gz

Entering ground control points (GCPs)

1. To start georeferencing an unreferenced raster, we must load it using the

. . .

browse button.

The raster will show up in the main working area of the dialog. Once the raster is loaded, we can start to enter reference points.

2. Using the

Add Point button, add points to the main working area and enter their coordinates (See Figure

76 ). For this procedure you have two options:

a) Click on a point in the raster map and enter the X and Y coordinates manually b) Click on a point in the raster map and choose the button from map canvas to add the X and Y coordinates with the help of a georeferenced map already loaded in QGIS.

3. Continue entering points. You should have at least 4 points, and the more coordinates you can

QGIS 1.4.0 User Guide 172

Figure 75: Georeferencer Plugin Dialog

12.7

Georeferencer Plugin provide, the better the result will be. There are additional tools on the plugin dialog to zoom and pan the working area in order to locate a relevant set of GCP points.

The points that are added to the map will be stored in a separate text file ([filename].points) which is stored together with the raster image. This allows us to reopen the Georeferencer plugin at a later date and add new points or delete existing ones to optimize the result. The points file contains values of the form: mapX, mapY, pixelX, pixelY. You can also Load GCPs and Save GCPs to different directories if you like.

Choosing the transformation

After you have added your GCPs to the raster image, you need to select the transformation type for the georeferencing process. Depending on how many ground control point you have captured, you may want to use different transformation algorithms. Choice of transformation algorithm is also dependent on the type and quality of input data and the amount of geometric distortion that you are willing to introduce to final result.

QGIS 1.4.0 User Guide 173

12 USING QGIS CORE PLUGINS

Figure 76: Add points to the raster image

Currently, several algorithms are available:

1. Linear

2. Helmert

3. Polynomial 1

4. Polynomial 2

5. Polynomial 3

6. Thin plate spline (TPS)

• The Linear algorithm is used to create a world-file, and is different from the other algorithms, as it does not actually transform the raster. This algorithm likely won’t be sufficient if you are dealing with scanned material.

• The Helmert transformation performs simple scaling and rotation transformations.

• The Polynomial algorithms are among the most widely used algorithms for georeferencing, and each one differs by the degree of distortion introduced to match source and destination ground control points. The most widely used polynomial algorithm is the second order polynomial transformation, which allows some curvature. First order polynomial transformation (affine) preserves colliniarity and allows scaling, translation and rotation only.

The Thin plate spline (TPS) algorithm is a more modern georeferencing method, which is able to introduce local deformations in the data. This algorithm is useful when very low quality originals are being georeferenced.

QGIS 1.4.0 User Guide 174

12.7

Georeferencer Plugin

Running the transformation

1. When the GCPs have been collected, and the transformation has been chosen, press either

Create to create a new raster or Create and load layer to automatically add the new raster to the layer list.

2. A warning message will appear that will inform you that a new raster (in GeoTIFF format) will be created.

3. After hitting OK, you will also be asked to choose a resampling method. There are three methods available: a) Nearest neighbour b) Linear c) Cubic

Tip 47 C

HOOSING THE RESAMPLING METHOD

The type of resampling you choose will likely depending on your input data and the ultimate objective of the exercise. If you don’t want to change statistics of the image, you might want to choose Nearest neighbour, whereas a Cubic resampling will likely provide a more smoothed result.

QGIS 1.4.0 User Guide 175

12 USING QGIS CORE PLUGINS

12.8. GPS Plugin

12.8.1. What is GPS?

GPS, the Global Positioning System, is a satellite-based system that allows anyone with a GPS receiver to find their exact position anywhere in the world. It is used as an aid in navigation, for example in airplanes, in boats and by hikers. The GPS receiver uses the signals from the satellites to calculate its latitude, longitude and (sometimes) elevation. Most receivers also have the capability to store locations (known as waypoints), sequences of locations that make up a planned route and a tracklog or track of the receivers movement over time. Waypoints, routes and tracks are the three basic feature types in GPS data. QGIS displays waypoints in point layers while routes and tracks are displayed in linestring layers.

12.8.2. Loading GPS data from a file

There are dozens of different file formats for storing GPS data. The format that QGIS uses is called

GPX (GPS eXchange format), which is a standard interchange format that can contain any number of waypoints, routes and tracks in the same file.

To load a GPX file you first need to load the plugin.

Plugins

>

Plugin Manager...

> x GPS Tools . When this plugin is loaded a button with a small handheld GPS device will show up in the toolbar. An example GPX file is available in the QGIS sample dataset: /qgis_sample_data/gps/national_monuments.gpx

. See Section

3.2

for more information about the sample data.

1. Click on the

GPS Tools icon and open the Load GPX file tab (see figure ??).

2. Browse to the folder qgis_sample_data/gps/ , select the GPX file national_monuments.gpx

and click Open .

Use the browse button

. . .

to select the GPX file, then use the checkboxes to select the feature types you want to load from that GPX file. Each feature type will be loaded in a separate layer when you click OK . The file national_monuments.gpx

only includes waypoints.

12.8.3. GPSBabel

Since QGIS uses GPX files you need a way to convert other GPS file formats to GPX.

This can be done for many formats using the free program GPSBabel, which is available at http://www.gpsbabel.org

. This program can also transfer GPS data between your computer and a

QGIS 1.4.0 User Guide 176

Figure 77: The GPS Tools dialog window

12.8

GPS Plugin

GPS device. QGIS uses GPSBabel to do these things, so it is recommended that you install it. However, if you just want to load GPS data from GPX files you will not need it. Version 1.2.3 of GPSBabel is known to work with QGIS, but you should be able to use later versions without any problems.

12.8.4. Importing GPS data

To import GPS data from a file that is not a GPX file, you use the tool Import other file in the GPS

Tools dialog. Here you select the file that you want to import (and the file type), which feature type you want to import from it, where you want to store the converted GPX file and what the name of the new layer should be. Note that not all GPS data formats will support all three feature types, so for many formats you will only be able to choose between one or two types.

12.8.5. Downloading GPS data from a device

QGIS can use GPSBabel to download data from a GPS device directly as new vector layers. For this we use the Download from GPS tab of the GPS Tools dialog (see Figure

78 ). Here, we select the

type of GPS device, the port that it is connected to (or usb if your GPS supports this), the feature type that you want to download, the GPX file where the data should be stored, and the name of the new layer.

The device type you select in the GPS device menu determines how GPSBabel tries to communicate with your GPS device. If none of the available types work with your GPS device you can create a new type (see section

12.8.7

).

The port may be a file name or some other name that your operating system uses as a reference to the physical port in your computer that the GPS device is connected to. It may also be simply usb,

QGIS 1.4.0 User Guide 177

12 USING QGIS CORE PLUGINS

Figure 78: The download tool for usb enabled GPS units.

Windows it’s COM1 or COM2.

On Linux this is something like /dev/ttyS0 or /dev/ttyS1 and on

When you click OK the data will be downloaded from the device and appear as a layer in QGIS.

12.8.6. Uploading GPS data to a device

You can also upload data directly from a vector layer in QGIS to a GPS device using the

Upload to GPS tab of the GPS Tools dialog. To do this you simply select the layer that you want to upload (which must be a GPX layer), your GPS device type, and the port (or usb) that it is connected to. Just as with the download tool you can specify new device types if your device isn’t in the list.

This tool is very useful in combination with the vector editing capabilities of QGIS. It allows you to load a map, create waypoints and routes, and then upload them and use them on your GPS device.

12.8.7. Defining new device types

There are lots of different types of GPS devices. The QGIS developers can’t test all of them, so if you have one that does not work with any of the device types listed in the Download from GPS and Upload to GPS tools you can define your own device type for it. You do this by using the GPS device editor, which you start by clicking the Edit devices button in the download or the upload tabs.

To define a new device you simply click the New device button, enter a name, a download command and an upload command for your device, and click the Update device button. The name

QGIS 1.4.0 User Guide 178

12.8

GPS Plugin will be listed in the device menus in the upload and download windows, and can be any string. The download command is the command that is used to download data from the device to a GPX file. This will probably be a GPSBabel command, but you can use any other command line program that can create a GPX file. QGIS will replace the keywords %type , %in , and %out when it runs the command.

%type will be replaced by “ -w ” if you are downloading waypoints, “ -r ” if you are downloading routes and “

-t

” if you are downloading tracks. These are command line options that tell GPSBabel which feature type to download.

%in will be replaced by the port name that you choose in the download window and %out will be replaced by the name you choose for the GPX file that the downloaded data should be stored in.

So if you create a device type with the download command “ gpsbabel %type -i garmin -o gpx %in %out ” (this is actually the download command for the predefined device type

GPS device: Garmin serial

H

)and then use it to download waypoints from port “

/dev/ttyS0

” to the file “ output.gpx

”, QGIS will replace the keywords and run the command “ gpsbabel -w -i garmin -o gpx /dev/ttyS0 output.gpx

”.

The upload command is the command that is used to upload data to the device. The same keywords are used, but %in is now replaced by the name of the GPX file for the layer that is being uploaded, and

%out is replaced by the port name.

You can learn more about GPSBabel and it’s available command line options at http://www.gpsbabel.org

Once you have created a new device type it will appear in the device lists for the download and upload tools.

QGIS 1.4.0 User Guide 179

12 USING QGIS CORE PLUGINS

12.9. Interpolation Plugin

The Interplation plugin can be used to generate a TIN or IDW interpolation of a point vector layer. It is very simple to handle and provides an intiuitive graphical user interface for creating interpolated raster layers (See Figure

79 ). The plugin requires the following parameters to be specified before

running:

Input vector layer: Specify the input point vector layer(s) from a list of loaded point layers.

If several layers are specified, then data from all layers is used for interpolation. Note: It is possible to insert lines or polygons as constraints for the triangulation, by specifying either

“structure lines” or “break lines” in the Type dropdown menu.

Interpolation attribute: Select attribute column to be used for interpolation or enable the x Use Z-Coordinate checkbox to use the layers stored Z values.

Interpolation

Method: Select interpolation method.

This can be either

Triangulated Irregular Network (TIN) . . .

H or Inverse Distance Weighted (IDW) . . .

H

.

Number of columns/rows: Specify the number row and colums for the output raster file.

Output file: Specify a name for the output raster file.

Figure 79: Interpolation Plugin

Using the plugin

1. Start QGIS and load an point vector layer (e.g., elevp.csv

).

2. Load the Interpolation plugin in the Plugin Manager (see Section

11.1.1

) and click on the

QGIS 1.4.0 User Guide 180

12.9

Interpolation Plugin

Interpolation icon which appears in the QGIS toolbar menu. The Interpolation plugin dialog appears as shown in Figure

79 .

3. Select an input layer (e.g., elevp . . .

H

) and column (e.g.

ELEV ) for interpolation.

4. Select an interpolation method (e.g. Triangular interpolation . . .

H

), and specify a cellsize of 5000 as well as the raster output filename (e.g., elevation_tin

).

5. Click Ok .

6. For the current example, double click elevation_tin in the layer list to open the Raster Layer

Properties dialog and select Pseudocolor . . .

H as Color Map in the Symbology tab. Or you can define a new color table as described in Section

6.3

.

In Figure

80

you see the TIN interpolation result with a 998 cols x 812 rows (5 km) resolution for the elevp.csv

data visualized using the Pseudocolor color table. The processing only takes a few minutes, and covers the northern part of Alaska.

Figure 80: Interpolation of elevp data using TIN method

QGIS 1.4.0 User Guide 181

12 USING QGIS CORE PLUGINS

12.10. Labeling Plugin

The

Labeling plugin provides smart labeling for vector point, line and polygon layers and only requires a few parameters. This plugin will replace the current QGIS labeling and also supports on-the-fly transformated layers.

1. Start QGIS and load a vector point, line or polygon layer.

2. Load the labeling plugin in the Plugin Manager (see Section

11.1.1

), activate the layer in the

legend and click on the

Labeling icon which appears in the QGIS toolbar menu.

Labeling point layers

First step is to activate the x Label this layer checkbox and select an attribute column to use for labeling. After that you can define the label placement and text style, labeling priority, scale-based visibility, if every part of multipart feature is to be labeled and if features act as obstacles for labels or not (see Figure

81 ).

Figure 81: Smart labeling of vector point layers

Labeling line layers

First step is to activate the x Label this layer checkbox and select an attribute column to use for labeling. After that you can define the label placement, orientation, distance to feature, text style, labeling priority, scale-based visibility, if every part of a multipart line is to be labeled, if lines shall be merged to avoid duplicate labels and if features act as obstacles for labels or not (see Figure

82 ).

QGIS 1.4.0 User Guide 182

Figure 82: Smart labeling of vector line layers

12.10

Labeling Plugin

Labeling polygon layers

First step is to activate the x Label this layer checkbox and select an attribute column to use for labeling. After that you can define the label placement, distance and text style, labeling priority, scalebased visibility, if every part of multipart feature is to be labeled and if features act as obstacles for labels or not (see Figure

83 ).

Figure 83: Smart labeling of vector polygon layers

QGIS 1.4.0 User Guide 183

12 USING QGIS CORE PLUGINS

Change engine settings

Additionally you can click the Engine settings button and select the search method, used to find the best label placement. Available is Chain, Popmusic Tabu, Popmusic Chain, Popmusic Tabu Chain and FALP.

Figure 84: Dialog to change label engine settings

Furthermore the number of candidates can be defined for point, line and polygon features, and you can define whether to show all labels (including colliding labels) and label candidates for debugging.

QGIS 1.4.0 User Guide 184

12.11

MapServer Export Plugin

12.11. MapServer Export Plugin

You can use QGIS to “compose” your map by adding and arranging layers, symbolizing them, customizing the colors and then creating a map file for MapServer.

12.11.1. Creating the Project File

The MapServer Export Plugin operates on a saved QGIS project file and not on the current contents of the map canvas and legend. This has been a source of confusion for a number of users. As described below, before you start using the MapServer Export Plugin, you need to arrange the raster and vector layers you want to use in MapServer and save this status in a QGIS project file.

Figure 85: Arrange raster and vector layers for QGIS project file

In this example, we demonstrate the four steps required to create a simple project file which can be used to create the MapServer map file. We use raster and vector files from the QGIS sample dataset

3.2

.

1. Add the raster layer landcover.tif

clicking on the

Add Raster Layer icon.

QGIS 1.4.0 User Guide 185

12 USING QGIS CORE PLUGINS

2. Add the vector Shapefiles lakes.shp, majrivers.shp

and airports.shp

from the QGIS sample dataset clicking on the

Add Vector Layer icon.

3. Change the colors and symbolize the data as you like (For example see Figure ??)

4. Save a new project named mapserverproject.qgs

using File >

Save Project .

12.11.2. Creating the Map File

The tool msexport to export a QGIS project file to a MapServer map file is installed in your QGIS binary directory and can be used independently of QGIS. To use it from within QGIS, you need to enable the MapServer Export Plugin first using the Plugin Manager (see Section

11.1.1

).

Figure 86: Export to MapServer Dialog

Map file

Enter the name for the map file to be created. You can use the button at the right to browse for the directory where you want the map file created.

Qgis project file

Enter the full path to the QGIS project file (.qgs) you want to export. You can use the button at the right to browse for the QGIS project file.

Map Name

A name for the map. This name is prefixed to all images generated by the mapserver.

Map Width

Width of the output image in pixels.

QGIS 1.4.0 User Guide 186

12.11

MapServer Export Plugin

Map Height

Height of the output image in pixels.

Map Units

Units of measure used for output

Image type

Format for the output image generated by MapServer

Web Template

Full path to the MapServer template file to be used with the map file

Web Header

Full path to the MapServer header file to be used with the map file

Web Footer

Full path to the MapServer footer file to be used with the map file

Only the Map file and QGIS project file inputs are required to create a map file, however by omitting the other parameters, you may end up creating a non-functional map file, depending on your intended use. Although QGIS is good at creating a map file from your project file, it may require some tweaking to get the results you want. For this example, we will create a map file using the project file mapserverproject.qgs

we just created (see Figure

86 ):

1. Start the MapServer dialog (see Figure

86 ) by clicking the

the toolbar menu.

MapServer Export icon in

2. Enter the name (e.g., qgisproject.map

) for your new map file.

3. Browse and find the QGIS project file (e.g., mapserverproject.qgs

) you previously saved.

4. Enter a name (e.g., MyMap ) for the map.

5. Enter the width and height (e.g., 600 for the width and 400 for the height) for your output image.

6. For this example, the layers are in meters, so we change the units to meters.

7. Choose “png” for the image type.

8. Click OK to generate the new map file qgisproject.map

. QGIS displays the success of your efforts.

You can view the map file in any text editor or visualizer. If you take a look, you’ll notice that the export tool adds the metadata needed to enable our map file for WMS.

QGIS 1.4.0 User Guide 187

12 USING QGIS CORE PLUGINS

12.11.3. Testing the Map File

We can now test our work using the shp2img tool to create an image from the map file. The shp2img utility is part of MapServer and FWTools. To create an image from our map:

Open a terminal window

If you didn’t save your map file in your home directory, change to the folder where you saved it.

• Run shp2img -m qgisproject.map -o mapserver_test.png

and display the image

This creates a PNG with all the layers included in the QGIS project file. In addition, the extent of the

PNG will be the same as when we saved the project. As you can see in Figure

87 , all information

except the airport symbols are included.

Figure 87: Test PNG created by shp2img with all MapServer Export layers

If you plan to use the map file to serve WMS requests, you probably don’t have to tweak anything. If you plan to use it with a mapping template or a custom interface, you may have a bit of manual work to do. To see how easy it is to go from QGIS to serving maps on the web, take a look at Christopher

Schmidt’s 5 minute flash video. He used an older version of QGIS (version 0.8), but the demo applies equally well to newer versions.

10

10 http://openlayers.org/presentations/mappingyourdata/

QGIS 1.4.0 User Guide 188

12.12

OGR Converter Plugin

12.12. OGR Converter Plugin

The OGR Layer Converter plugin adds the ability to convert vector data from one OGR-supported vector format to another. The plugin is very simple to run, and only requires a few parameters to be specified before running:

Source Format/Datset/Layer: Enter OGR format and path to the vector file to be converted

Target Format/Datset/Layer: Enter OGR format and path to the vector output file

Figure 88: OGR Layer Converter Plugin

Using the Plugin

1. Start QGIS, load the OGR converter plugin in the Plugin Manager (see Section

11.1.1

) and

click on the

OGR Layer Converter icon which appears in the QGIS toolbar menu. The

OGR Layer Converter plugin dialog appears as shown in Figure

88 .

2. Select the OGR-supported format (e.g., ESRI Shapefile . . .

H input file (e.g., alaska.shp

) in the Source area.

) and the path to the vector

3. Select the OGR-supported format (e.g., GML . . .

H filename (e.g., alaska.gml

) in the Target area.

) and define a path and the vector output

10

Supported formats may vary according to the installed GDAL/OGR package.

QGIS 1.4.0 User Guide 189

12 USING QGIS CORE PLUGINS

4. Click Ok .

QGIS 1.4.0 User Guide 190

12.13

Oracle GeoRaster Plugin

12.13. Oracle GeoRaster Plugin

In Oracle databases, raster data can be stored in SDO_GEORASTER objects available with the

Oracle Spatial extension. In QGIS, the

Oracle GeoRaster Plugin is supported by GDAL, and depends on Oracle’s Database product being installed and working on your machine. While Oracle is proprietary software, they provide their software free for development and testing purposes. Here is one simple example of how to load raster images to GeoRaster:

$ gdal_translate -of georaster input_file.tif geor:scott/[email protected]

This will load the raster into the default GDAL_IMPORT table, as a column named RASTER.

12.13.1. Managing connections

Firstly, the Oracle GeoRaster Plugin must be enabled using the Plugin Manager (see Section

11.1.1

).

The first time you load a GeoRaster in QGIS, you must create a connection to the Oracle database that contains the data. To do this, begin by clicking on the

Select GeoRaster toolbar button, it will open the Select Oracle Spatial GeoRaster dialog window. Click on New to open the dialog window, and specify the connection parameters (See Figure

89 ):

Name: Enter a name for the database connection.

Database instance: Enter the name of the database that you will connect to.

Username: Specify your own username that you will use to access the database.

Password: The password associated with your username that is required to access the database.

Now, back on the main Oracle Spatial GeoRaster dialog window (See Figure

90 ), use the drop-down

list to choose one connection, and use the Connect button to establish a connection. You may also Edit the connection by opening the previous dialog and making changes to the connection information, or use the Delete button to remove the connection from the drop-down list.

12.13.2. Selecting a GeoRaster

Once a connection has been established, the sub-datasets window will show the names of all the tables that contains GeoRaster columns in that database in the format of a GDAL subdataset name.

QGIS 1.4.0 User Guide 191

12 USING QGIS CORE PLUGINS

Figure 89: Create Oracle connection dialog

Click on one of the listed subdatasets and then click on Select to choose the table name. Now another list of subdatasets will show with the names of GeoRaster columns on that table. This is usually a short list, since most users will not have more than one or two GeoRaster columns on the same table.

Click on one of the listed subdatasets and then click on Select to choose one of the the table/column combination. The dialog will now show all the rows that contains GeoRaster objects.

Note that the subdataset list will now show the Raster Data Table and Raster Id’s pairs.

At anytime the Selection entry can be edited in order to go directly to a known GeoRaster or to go back to the beginning and select another table name.

The Selection data entry can also be used to enter a Where clause at the end of the identification string, e.g., “geor:scott/[email protected],gdal_import,raster,geoid=”.

http://www.gdal.org/frmt_georaster.html

for more information.

See

12.13.3. Displaying GeoRaster

Finally, by selecting a GeoRaster from the list of Raster Data Table and Raster Id’s, the raster image will be loaded into QGIS.

The Select Oracle Spatial GeoRaster dialog window can be closed now and next time it opens it will keep the same connection, and will show the same previous list of subdataset making it very easy to open up another image from the same context.

Note: GeoRasters that contains pyramids will display much faster but the pyramids need to be generated outside of QGIS using Oracle PL/SQL or gdaladdo.

The following is example using gdaladdo:

QGIS 1.4.0 User Guide 192

12.13

Oracle GeoRaster Plugin

Figure 90: Select Oracle GeoRaster dialog gdaladdo georaster:scott/[email protected],georaster\_table,georaster,georid=6 -r nearest 2 4 6 8 16 32

This is an example using PL/SQL: cd ..

$ sqlplus scott/tiger

SQL> DECLARE gr sdo_georaster;

BEGIN

SELECT image INTO gr FROM cities WHERE id = 1 FOR UPDATE;

END;

/ sdo_geor.generatePyramid(gr, ’rLevel=5, resampling=NN’);

UPDATE cities SET image = gr WHERE id = 1;

COMMIT;

QGIS 1.4.0 User Guide 193

12 USING QGIS CORE PLUGINS

12.14. OpenStreetMap Plugin

In recent years the OpenStreetMap project has gained popularity because in many countries no free geo data such as digital roadmaps are available. Target of the OSM project is to create a free editable map of the world from GPS data, aerial photography or simply from local knowledge. To support this idea QGIS provides a plugin that enables its users to work with OSM data.

The plugin provides all basic functionalities for OSM data manipulation, such as data loading, importing, saving, downloading, editing and uploading data back to the OpenStreetMap server. While implementing OSM plugin an inspiration was taken from existing OSM data editors. The purpose was to combine their functionalities to get the best possible result.

The following subsection gives a brief introduction to principles of the OSM project. If you are not interested in information on OSM just skip the next section. Parts of the following paragraphs are copied from the OpenStreetMap web site at http://www.openstreetmap.org

.

The OpenStreetMap project

OpenStreetMap is a project to create a free editable map of the world. The maps are created using data from portable GPS devices, aerial photography, other free sources or simply from local knowledge. The project was started because most maps have legal or technical restrictions on their use, holding back people from using them in creative, productive, or unexpected ways. Both rendered images and the vector dataset of OSM are available for download under a Creative Commons Attribution ShareAlike 2.0 licence.

OpenStreetMap was inspired by sites such as Wikipedia - the map display (see Figure

91 ) features

a prominent Edit tab and a full revision history is maintained. Registered users can upload GPS track logs and edit the vector data using the given editing tools.

OSM data primitive is an object class that can be stored via the API in the server. The three supported types of data are: Node, Way and Relation.

A node is a latitude/longitude pair of coordinates. It is used as building a block for other features and as a feature itself (Points Of Interest), if they are tagged as required.

A way is a list of at least two nodes that describe a linear feature such as a street, or similar.

Nodes can be members of multiple ways.

A relation is a group of zero or more primitives with associated roles. It is used to specify relationships between objects, and may also model an abstract object.

Several different logical features in a common map (’Point Of Interest’, ’Street’, ’Tram Line’, ’Bus Stop’ etc.) are defined by these primitives. Map features are well-known in the OSM community and are stored as tags, based of a key and a value. OSM is usually distibuted in XML format. XML payload is used for the communication with the OSM server as well.

QGIS 1.4.0 User Guide 194

Figure 91: OpenStreetMap data in the web

12.14

OpenStreetMap Plugin

QGIS - OSM Connection

The first part of this subsection describes how OSM data primitives are displayed in QGIS vector layers. As written above, OSM data consist of Nodes, Ways and Relations. In QGIS they are displayed in three diffrent layer types: Point layer, Line layer and Polygon layer. It’s not possible to remove any of these layers and work with the other ones.

• A Point layer displays all features of type Node that stands alone. That means that only Nodes that are not included in any Way belongs to the Point layer.

A Line layer displays those OSM features of type Way that are not closed. That means, none of these Ways starts and ends with the same Node.

• A Polygon layer displays all Ways that are not included in Line layer.

OpenStreetMap has one more data primitive except for the three mentioned above. This is called

Relation. There is purposely no vector layer to display Relations. A Relation defines relation between

QGIS 1.4.0 User Guide 195

12 USING QGIS CORE PLUGINS any number of data primitives. After Point, Line or Polygon is identified on a map, the plugin shows a list of all relations, the identified feature is part of.

Challenging was to design the connection between OSM data and the standard QGIS editing tools.

These tools are made to edit a single vector layer at a time, no matter of what feature types it displays.

This means that if OSM data are loaded to QGIS through the plugin, you could (theoretically) edit

Point layer, Line layer or Polygon layer with these standard tools separately.

The problem is, that Line layer consists of two different types of OSM features - Ways and Nodes.

Why? Because in OSM format a Way is composed of Nodes. If you start editing a Line layer and change the shape of some line, your action must affect not only the OSM Way but also the OSM

Nodes that are part of it.

QGIS standard editing tools cannot tell the OSM provider, which members of which line has changed and how. It can tell only what’s the new geometry of which line, and that’s not enough to propagate changes to the OSM database correctly. The Line layer does also not know the identifiers of the line members. The same problem occurs when you try to edit the Polygon layer.

For this reason, the OSM plugin need its own tools for editing OSM data. While they are used, the OSM layers can be changed correctly. The Plugin editing tools consists of tools for Point, Line,

Polygon and Relation creation, deletion and moving.

Note: To create a connection between the OSM plugin and standard editing tools, changes in QuantumGIS core code would be necessary.

12.14.1. Installation

The OpenStreetMap plugin is a core plugin inside QGIS. If you have python support enabled, the

’OpenStreetMap’ plugin can be selected in the Plugin Manager as described in section

11.1.1

).

12.14.2. Basic user interface

The first time the OSM plugin is started (and after the first data are loaded), several new OSM plugin icons appear in the QGIS toolbar menu together with new graphical components as shown in Figure

92 :

OSM Features widget

The OSM Feature widget helps to identify OSM features. It shows basic information on feature type and identifier as well as info on who has when changed a feature. The OSM Feature widget also provides all editing tools (in the top part of it). More information on those tools can be found in the sections below. The widget is initially disabled. It activates itself after successfull loading some OSM

QGIS 1.4.0 User Guide 196

Figure 92: OSM plugin user interface

12.14

OpenStreetMap Plugin data.

OSM Undo/Redo widget

This Undo/Redo widget is used to undo and redo edit actions. It consists not only of a classical Undo and Redo button, it also shows a list with a brief description of the edit actions that were done. The

OSM Undo/Redo widget is initially closed. You can show it using a button on OSM Feature widget.

Toolbar menu icons

Load OSM from file : is used to load data from a special OpenStreetMap XML file.

Show/Hide OSM Feature Manager is used to show or hide the OSM Feature widget. The

OSM Feature widget is a panel that helps with OSM feature identification and with OSM data editing.

Download OSM data is used to download data from the OpenStreetMap server.

QGIS 1.4.0 User Guide 197

12 USING QGIS CORE PLUGINS

Upload OSM data is used to upload changes (on current data).

Import data from a layer is used to import data from a vector layer. At least one vector layer must be loaded and current OSM data must be selected.

Save OSM to file is used to save OSM data back to an XML file.

More detailed information on all the widgets, buttons and dialogs can be found in appropriate sections of this plugin section according to their functionality (editing, identification, etc.).

12.14.3. Loading OSM data

The first action that should be done after starting the OSM Plugin is opening data from an OSM file.

OSM data can be import as shapefile or downloaded directly from the OpenStreetMap server. Here we are focusing on the first mentioned method.

To load data from a file use the

Load OSM from file icon. If there is no such button, maybe someone disabled OpenStreetMap toolbar in your QGIS instalation. You can enable it again selecting

Settings > Toolbars > OpenStreetMap .

Figure 93: Load OSM data dialog

Purpose of its elements is explained below.

QGIS 1.4.0 User Guide 198

12.14

OpenStreetMap Plugin

OpenStreetMap file to load: Click on the button to select the .osm file you want to load data from.

Add columns for tags: This option determines a connection between OSM and QGIS data. Each feature of OSM data has some tags (pairs of key and value), that define the feature properties.

Each feature of a QGIS vector layer also has its attributes (key and value). With this option you can define which properties of OSM objects should be visible when displaying detailed information about QGIS features.

Replace current data: Checking this option means that new data should replace current data the user is working with. Layers of current data will be removed and new ones will be loaded. When loading OSM data for the first time, this option is not active, because there is nothing to replace.

Use custom renderer: This option determines how many details of the map will be used. There are three pre-defined OSM styles for map displaying. Use Small scale if you want to view OSM data at low level, to see all details and to edit something. If not you can use Medium scale or

Large scale . QGIS 1.4.0 doesn’t support changing the renderer style dynamically.

Click Ok to load your data. If this is the first time OSM file is loaded, the plugin must first parse the database. This may take few seconds or minutes - it depends on the amount of loaded data.

12.14.4. Viewing OSM data

After OSM data are loaded, you can identify map features using the appropriate tool. Use the

Identify feature button on the top-left of OSM Feature widget. Using this tool you can easily explore all map objects. When the mouse cursor is placed over an object, you can see all information on it directly in the OSM Feature widget. There is also a dynamic rubberband displayed on the map so that the user is able to determine which feature is currently identified.

The Properties tab of the widget contains of all feature tags. Clicking on the Relation tab shows you a list of all relations connected with identified feature.

If you want to hold a feature for a while to be able to read its properties and relations, move the mouse cursor at the same time, try left-clicking while you are over the feature. Identification process will stop until next left-clicking.

Sometimes there are more than one feature at a point where left-clicking was performed. This happens especially when clicking on cross-roads or if you didn’t zoom enough into the map. In this situation only one of such features is identified (and marked with the rubberband) but the plugin remembers all of them. Then (still in the pause mode) you can change identified features cyclical with right-clicking.

QGIS 1.4.0 User Guide 199

12 USING QGIS CORE PLUGINS

12.14.5. Editing basic OSM data

In the title of this section ’basic data’ means non-relation OSM features - nodes and ways. If you prefer reading information on relation editing, just skip this section and read the next one.

Basic data editing is a key part of OSM Plugin. You can change property, position or shape of any existing basic feature. You can remove features or add new ones. All such changes on nodes and ways are remembered for comfortable usage of Undo/Redo operations and for easy upload of all changes to OpenStreetMap server.

Changing feature tags

Changing the property/tag of an OSM feature can be done directly in the table of feature tags. The

Tags table of basic features can be found on the OSM Feature widget. Don’t forget to identify feature first.

Figure 94: Changing an OSM feature tag

If you want to change a tag value, just double-click in the appropriate row of column ’Value’ and type or select a new value. If you want to remove a tag, click in its row, then use button

Remove selected tags on the right bottom under the table.

To add new tags just type its key and value into the last row of the table - where ’<next tag value>’ is written. Notice that you cannot change the key of an existing tag pair. For comfortable usage, there are some combo boxes of all existing tag keys and their typical values.

QGIS 1.4.0 User Guide 200

12.14

OpenStreetMap Plugin

Point creation,

For point creation there is a

Create point button on the OSM Feature widget. To create some points just click on the button and start clicking on the map. If your cursor is over some map feature, the feature is marked/identified immediately. If you click on the map when a line or polygon is marked, a new point is created directly on such line or polygon - as its new member. If your cursor is over an existing point, new point cannot be created. In such case the OSM plugin will show following message:

Figure 95: OSM point creation message

The mechanism of helping a user to hit the line or polygon is called snapping and is enabled by default. If you want to create a point very close to some line (but not on it) you must disable snapping

¨ by holding the Ctrl key first.

§

¥

¦

Line creation

For line creation there is a

Create line button on the OSM Feature widget. To create a line just click the button and start left-clicking on the map. Each of your left-clicks is remembered as a member vertex of the new line. Line creation ends when first right-click is performed. The new line will immediately appear on the map.

Note: A Line with less than two members cannot be created. In such case the operation is ignored.

Snapping is performed to all map vertices - points from Point vector layer and all Line and Polygon

¨ members. Snapping can be disabled by holding the Ctrl key.

§

¥

¦

Polygon creation

For polygon creation there is a

Create polygon button on the OSM Feature widget. To create a polygon just click the button and start left-clicking on the map. Each of your left-clicks is remembered as a member vertex of the new polygon. The Polygon creation ends when first right-click is performed.

The new polygon will immediately appear on the map. Polygon with less than three members cannot be created. In such case operation is ignored. Snapping is performed to all map vertexes - points

(from Point vector layer) and all Line and Polygon members. Snapping can be disabled by holding

¨ the Ctrl key.

§

¥

¦

QGIS 1.4.0 User Guide 201

12 USING QGIS CORE PLUGINS

Map feature moving

If you want to move a feature (no matter what type) please use the

Move feature button from the OSM Feature widget menu. Then you can browse the map (features are identified dynamically when you go over them) and click on the feature you want to move. If a wrong feature is selected after your click, don’t move it from the place. Repeat right-clicking until the correct feature is identified.

When selection is done and you move the cursor, you are no more able to change your decision what to move. To confirm the move, click on the left mouse button. To cancel a move, click another mouse button.

If you are moving a feature that is connected to another features, these connections won’t be damaged. Other features will just adapt themselves to a new position of a moved feature.

Snapping is also supported in this operation, this means:

• When moving a standalone (not part of any line/polygon) point, snapping to all map segments and vertices is performed.

When moving a point that is a member of some lines/polygons, snapping to all map segments and vertices is performed, except for vertices of point parents.

• When moving a line/polygon, snapping to all map vertices is performed. Note that the OSM

Plugin tries to snap only to the 3 closest-to-cursor vertices of a moved line/polygon, otherwise

¨ the operation would by very slow. Snapping can be disabled by holding Ctrl key during the

§

¥

¦ operation.

Map feature removing

If you want to remove a feature, you must identify it first. To remove an identified feature, use the

Remove this feature button on the OSM Feature widget. When removing a line/polygon, the line/polygon itself is deleted, so are all its member points that doesn’t belong to any other line/polygon.

When removing a point that is member of some lines/polygons, the point is deleted and the geometries of parent lines/polygons are changed. The new parent geometry has less vertices than the old one.

If the parent feature was a polygon with three vertexes, its new geometry has only two vertexes. And because there cannot exist polygon with only two vertices, as described above, the feature type is automatically changed to Line.

If the parent feature was a line with two vertexes, its new geometry has only one vertex. And because there cannot exist a line with only one vertex, the feature type is automatically changed to Point.

QGIS 1.4.0 User Guide 202

12.14

OpenStreetMap Plugin

12.14.6. Editing relations

Thanks to existency of OSM relations we can join OSM features into groups and give them common properties - in such way we can model any possible map object: borders of a region (as group of ways and points), roads of a bus, etc. Each member of a relation has its specific role. There is a pretty good support for OSM Relations in our plugin. Let’s see how to examine, create, update or remove them.

Examining relation

If you want to see relation properties, first identify one of its members. After that open the Relations tab on the OSM Feature widget. At the top of the tab you can see a list of all relations the identified feature is part of. Please choose the one you want to examine and look at its information below. In the first table called ’Relation tags’ you find the properties of the selected relation. In the table called

’Relation members’ you see brief information on the relation members. If you click on a member, the plugin will make a rubberband on it in the map.

Relation creation

There are 2 ways to create a relation:

1. You can use the

Create relation button on OSM Feature widget.

2. You can create it from the Relation tab of OSM Feature widget using the button.

Add relation

In both cases a dialog will appear. For the second case, the feature that is currently identified is automatically considered to be the first relation member, so the dialog is prefilled a little. When creating a relation, please select its type first. You can select one of predefined relation types or write your own type. After that fill the relation tags and choose its members.

If you have already selected a relation type, try using the

Generate tags button. It will generate typical tags to your relation type. Then you are expected to enter values to the keys. Choosing relation members can be done either by writing member identifiers, types and roles or using the identify tool and clicking on map.

Finally when type, tags and members are chosen, the dialog can be submitted. In such case the plugin creates a new relation for you.

QGIS 1.4.0 User Guide 203

12 USING QGIS CORE PLUGINS

Changing relation

If you want to change an existing relation, identify it first (follow steps written above in Section ’Examining relation’). After that click on the

Edit relation button. You will find it on the OSM

Feature widget. A new dialog appears, nearly the same as for the ’create relation’ action. The dialog is pre-filled with information on given relations. You can change relation tags, members or even its type. After submiting the dialog your changes will be commited.

12.14.7. Downloading OSM data

To download data from OpenStreetMap server click on the

Download OSM data button. If there is no such button, the OSM toolbar may be disabled in your QGIS instalation. You can enable it again at Settings > Toolbars > OpenStreetMap . After clicking the button a dialog occurs and provides following functionalities:

Figure 96: OSM download dialog

Extent: Specifies an area to download data from intervals of latitude and longitude degrees. Because there is some restriction of OpenStreetMap server on how much data can be downloaded, the intervals must not be too wide. More detailed info on extent specification can is shown after clicking the help button on the right.

Download to: Here you are expected to write a path to the file where data will be stored. If you can’t remember the structure of your disk, don’t panic. The browse button will help you.

Open data automatically after download: Determines, if the download process should be followed by loading the data process or not. If you prefer not to load data now, you can do it later by using the

Load OSM from file button.

QGIS 1.4.0 User Guide 204

12.14

OpenStreetMap Plugin

Replace current data: This option is active only if

Open data automatically after download is checked. Checking this option means that downloaded data should replace current data we are working with now. Layers of the current data will be removed and new ones will be loaded.

When starting QGIS and downloading OSM data for the first time, this option is initially inactive, because there is nothing to replace.

Use custom renderer: This option is active only if the ⊙ Open data automatically after download checkbox is checked. It determines how many details will be in the map. There are three predefined OSM styles for map displaying. Use Small scale if you want to view OSM data at low level, to see all details and to edit something. If not you can use Medium scale or

Large scale . QGIS 1.4.0 does not support changing the renderer style dynamically.

Click the Download button to start the download process.

A progress dialog will continuously inform you about how much of data is already downloaded. When an error occures during the download process, a dialog tells you why. When action finishes succesfully both the progress dialog and download dialog will close themselves.

12.14.8. Uploading OSM data

Note that the upload is always done on current OSM data. Before opening the OSM Upload dialog, please be sure that you really have the right active layer OSM data.

To upload current data to the OSM server click on the

Upload OSM data button. If there is no such button, OSM toolbar in your QGIS installation is disabled. You can enable it again in Settings

> Toolbars > OpenStreetMap . After clicking the upload button a new dialog will appear.

At the top of the dialog you can check, if you are uploading the correct data. There is a short name of a current database. In the table you find information on how many changes will be uploaded.

Statistics are displayed separately for each feature type.

In the ’Comment on your changes’ box you can write brief information on meaning of your upload operation. Just write in brief what data changes you’ve done or let the box empty. Fill ’OSM account’ arrays so that the server could authenticate you. If you don’t have an account on the OSM server, it’s the best time to create one at http://www.openstreetmap.org

. Finally use Upload to start an upload operation.

QGIS 1.4.0 User Guide 205

12 USING QGIS CORE PLUGINS

Figure 97: OSM upload dialog

12.14.9. Saving OSM data

To save data from a current map extent to an XML file click on the

Save OSM to file button. If there is no such button, the OSM toolbar in your QuantumGIS installation is probably disabled. You can enable it again in Settings > Toolbars > OpenStreetMap . After clicking on the button a new dialog appears.

Select features you want to save into XML file and the file itself. Use the Ok button to start the operation. The process will create an XML file, in which OSM data from your current map extent are represented. The OSM version of the output file is 0.6. Elements of OSM data (<node>, <way>,

<relation>) do not contain information on their changesets and uids. These informations are not compulsory yet, see DTD for OSM XML version 0.6. In the output file OSM elements are not ordered.

Notice that not only data from the current extent are saved. Into the output file the whole polygons and lines are saved even if only a small part of them is visible in the current extent. For each saved line/polygon all its member nodes are saved too.

QGIS 1.4.0 User Guide 206

Figure 98: OSM saving dialog

12.14

OpenStreetMap Plugin

12.14.10. Import OSM data

To import OSM data from an opened non-OSM vector layer follow this instructions: Choose current

OSM data by clicking on one of their layers. Click on the

Import data from a layer button.

If there is no such button, someone has probably disable the OpenStreetMap toolbar in your QGIS installation. You can enable it again in Settings > Toolbars > OpenStreetMap .

After clicking on the button following message may show up:

Figure 99: OSM import message dialog

In such case there is no vector layer currently loaded. The import must be d one from a loaded layer

- please load a vector layer from which you want to import data. After a layer is opened, your second try should give you a better result (don’t forget to mark the current OSM layer again):

Use the submit dialog to start the process of OSM data importing. Reject it if you are not sure you want to import something.

QGIS 1.4.0 User Guide 207

12 USING QGIS CORE PLUGINS

Figure 100: Import data to OSM dialog

QGIS 1.4.0 User Guide 208

12.15

Raster Terrain Modelling Plugin

12.15. Raster Terrain Modelling Plugin

The Raster Terrain Modelling plugin can be used to calculate the slope, aspect, ruggedness, and total curvature for digital elevation models (DEM). It is very simple to handle and provides an intiuitive graphical user interface for creating new raster layers (See Figure

101 ). The plugin requires the

following parameters to be specified before running:

Analysis: Can be one of slope, aspect, ruggedness, or total curvature

Input layer: Specify the input raster from a list of loaded raster layers.

Output layer: Specify a name and path for the output raster file.

Output format: Specify a format type for the output raster file (Default is GeoTiff).

Slope: Calculates slope angle for each cell in degrees (based on first order derivative estimation).

Aspect: Exposition (starting with 0 for north direction, in degrees counterclockwise).

Ruggedness factor: A quantitative measurement of terrain heterogeneity.

Total curvature: A curvature measure that combines plan- and profile curvature.

Figure 101: Raster Terrain Modelling Plugin

QGIS 1.4.0 User Guide 209

12 USING QGIS CORE PLUGINS

Using the plugin

1. Start QGIS and load a DEM raster layer.

2. Load the Raster Terrain Modelling plugin in the Plugin Manager (see Section

11.1.1

) and click

on the

12.16

Quick Print Plugin

12.16. Quick Print Plugin

The

Quick Print Plugin makes it possible to export the current map canvas to PDF format quickly and easily, with minimal effort. The only parameters that need to be specified are a Map Title, a Map Name, and the Paper Size (See Figure

102 ). If you require additional control over the map

layout, please use the print composer plugin, described in Section

10 .

Figure 102: Quick Print Dialog

Figure 103: Quick Print result as DIN A4 PDF using the alaska sample dataset

QGIS 1.4.0 User Guide 211

12 USING QGIS CORE PLUGINS

12.17. Other core plugins

The remaining core plugins are listed in Table

15 , along with references to the chapters in this manual

which cover their usage.

Icon Plugin

Table 15: Other Core Plugins

Manual Reference

Diagram Overlay Chapter

5.4.10

GRASS

Plugin Installer

SPIT

WFS

Chapter

Chapter

Chapter

Chapter

9

and Appendix

11.1.3

5.2.4

7.3

B

QGIS 1.4.0 User Guide 212

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents