Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
1 QGIS - Bird's Eye View GIS
Low Cost and Free Public Health Mapping Tools
Quantum GIS - QGIS
1) Download and Install
a) QGIS can be quickly and easily installed on Windows, Macs and Linux from installers
found here: http://hub.qgis.org/projects/quantum-gis/wiki/Download
2) Documentation
a) QGIS is a large piece of software and only basics are covered in this document. Full
documentation can be found via pdf in the shared DropBox folder or online here:
http://docs.qgis.org/html/en/docs/user_manual/index.html
b) Anita Graser has a fantastic QGIS blog with a lot of resources http://anitagraser.com/
3) Working with GIS Pro Data
a) Since GIS Pro exports shapefiles it is a simple matter to bring them into QGIS.
b) QGIS has a main tool bar with buttons for brining in different kinds of spatial data. Click
the Add Vector data button. Click the Browse button and navigate to your data folder.
Set the file type filter to All files or ESRI Shapefiles. Select your layer(s) and click Open.
c) The other add data buttons allow you to add Raster and data from several commonly
used open source spatial databases.
4) Map Navigation
a) Once you have the layer loaded, take a look at the map navigation toolbar.
From left to right, the tools are:
2 QGIS - Bird's Eye View GIS
1. Pan - pan the map by dragging the mouse 2. Zoom In - zoom in by dragging the mouse or clicking 3. Zoom Out - zoom out by dragging the mouse or clicking 4. Zoom to Native Pixel Resolution 5. Zoom to Full Extents - zoom to the full extent of all layers 6. Zoom to Selection - zoom to the extent of the selected features 7. Zoom to Layer - zoom to the extent of the active layer 8. Zoom to Last Extent - zoom to the previous extent 9. Zoom to Forward Extent – zoom to the next extent 10. Refresh Map - redraw the map
5) Saving a project
a) Save your map document. You can either go to File Save Project or hit the Save Project button on the File toolbar. QGIS projects are saved as *.qgs files just as ArcMap documents are saved as *.mxd’s.
b) You can access project properties from the Settings Project Properties. This window has several tabs for setting common project properties such as: data paths (absolute or relative), units, selection color, Projection on the fly and identifiable layers etc.
3 QGIS - Bird's Eye View GIS
6) Symbology and Layer Properties
a) Right clicking on a layer gives you a context menu. Use this to open the attribute table,
define the layers coordinate reference system, toggle editing, and accessing layer
properties.
4 QGIS - Bird's Eye View GIS
b) Open the Properties of the layer.
c) There are several tabs. Click on the Style tab. This gives you access to the layer
symbology.
d) You can adjust the default icons size and color here. You can also save styles, load styles
and work with the style manager to manage styles.
e) To create a more custom symbol click on the Change button to open the Symbol
properties. This allows you to use different marker symbols and adjust color and size.
There are several default symbol sets including simple, ellipse, font and SVG markers.
5 QGIS - Bird's Eye View GIS
7) Using the eVIS Plugin for hot linking photos to points
a) QGIS uses Plugins to provide extra functionality. These can be accessed via the Plugins
menu Manage Plugins.
b) The Plugins in the list by default are QGIS Core Plugins. You can also click on Menu
Fetch Python Plugins. This will give you access to many more third party plugins that
you can easily install.
c) One Plugin that may be immediately applicable if you're using GIS Pro is eVIS. This Core
plugin allows you to manage hyper-linking. So for example you could set it up to link to
the photo you took in the field when you click on a feature with the eVIS Event ID Tool.
d) This is the link to online eVIS documentation:
http://docs.qgis.org/html/en/docs/user_manual/plugins/plugins_evis.html
6 QGIS - Bird's Eye View GIS
e) Go to the Plugins menu Manage Plugins and check the box next to eVIS.
f) Some extra buttons will be added to a tool bar.
g) Select your field point layer and click on the eVIS Event Browser. Open the Options tab.
h) Next to Attribute containing path to file, select the column with the path to the jpg.
Click Path is Relative and Remember this.
7 QGIS - Bird's Eye View GIS
i) Next to Base path identify the path to your data folder where the shapefile is stored.
j) Now move to the Configure External Applications tab. Click in the Extension cell and
input .jpg. Click in the Application cell and insert the path to the MS PhotoViewer app
that comes standard on Windows. The default path is: C:/Program Files/Windows Photo
Viewer/PhotoViewer.dll. You can also choose another software package to have the
image open in.
8) Working with ODK Collect & EPI Collect Data
a) Both ODK Collect EPI Collect provides the data as a CSV file.
b) QGIS provides several tools for adding different types of data to your map. You will use
the Create a Layer from a Delimited Text File option.
c) You can preview the CSV file in MS Excel to familiarize yourself with the data structure.
d) Populate the Create a Layer from a Delimited Text File form as below. Browse to your
CSV file, provide an output layer name, choose only Comma as the delimiter. Click OK.
8 QGIS - Bird's Eye View GIS
e) The data will show up as a temporary point layer with all the attributes.
f) To save it as a permanent shapefile, right click on the layer and choose Save As… from
the context menu.
g) Fill out the Save vector layer as... form. You'll notice that there are many options for file
Format. Here I've chosen an ESRI shapefile.
9 QGIS - Bird's Eye View GIS
h) It is also possible to choose the output layers coordinate reference system here by
choosing Selected CRS and clicking the Browse button. This opens the Coordinate
Reference System Selector (below).
10 QGIS - Bird's Eye View GIS
11 QGIS - Bird's Eye View GIS
9) Joining Tables
a) Here is the online link for Joins documentation:
http://docs.qgis.org/html/en/docs/user_manual/working_with_vector/vector_properties.html#
joins-tab
b) To do a join you need to have an a common index in both your attribute table and the
standalone table you'd like to join to it. The join will be based on these two columns.
They don't have to have the same name, but they do need to have the same data in the
same format (number, string etc.).
c) Add the table you'd like to join to your QGIS project. The table needs to be in a comma
separated values (CSV) format. If you're data is in Excel simply export the data to a CSV
file in Excel. Once you have your table click on the Add vector layer button. You will
need to filter by Comma Separated Value [OGR] or just choose All files to see your csv
file.
d) Open the layer properties for the layer whose attribute table you'd like to join data to.
Click on the Joins tab. Click the button to add the table and create the join.
Choose the Join layer (standalone table), the Join field and the Target field in the GIS
layer. If you're not sure what fields to use open both tables again and determine which
fields the join should be based on.
e) The standalone table is now joined to your GIS layer within the QGIS project. To make
the join permanent, right click on the GIS layer and select Save as… Choose the file
format (ESRI shapefile), a file name and the appropriate folder.
f) Voila!
10) Merging shapefiles
a) You may end up with multiple shapefiles that need to be merged. To merge shapefiles
they need to have 1) the same geometry (point and point or line and line etc. ), 2) the
same attribute columns and 3) the same coordinate reference system.
b) All of these items should be the same since the data will have been collected via the
same methods. However, it is good to keep these points in mind if the merged shapefile
ends up looking incorrect.
c) The QGIS merge utility can either be set up to merge all the shapefiles in a given folder
or you can select the shapefiles to merge.
d) Go to the Vector menu Data Management Tools Merge shapefiles to one
12 QGIS - Bird's Eye View GIS
e) You can either check Select by layers in the folder to choose individual shapefiles to
merge, or leave that unchecked and just select the folder whose shapefiles are to be
merged.
f) After you've chosen your input files, click Browse to select the output folder and output
shapefile name. Click Add result to map canvas to have the new layer added to your
map.
11) Working with Projections
a) If you're not familiar with coordinate systems contact Kurt Menke and he will provide
you with some background information.
b) QGIS has the same functionality for dealing with projections as other desktop GIS
packages. You can:
i) Assign a coordinate reference system (CRS) to your project and QGIS can then
project data on the fly.
ii) Define the CRS of a data layer if it is undefined.
iii) Reproject a data layer to a new projection if need be.
c) Documentation for all of this can be found here:
http://docs.qgis.org/1.8/html/en/docs/user_manual/working_with_projections/working_with_
projections.html