際際滷

際際滷Share a Scribd company logo
Workshop  Lund 2013 1
Landscape ecology analysis with QGIS
Workshop at Lund University (2013) by Martin Jung
Workshop  Lund 2013 2
About me
 Currently master student in Biology at the University of
Copenhagen
 BSc thesis about plant-pollinator networks in Biaowieza
 Interested in Ecology, Conservation and species distributions
Workshop  Lund 2013 3
Visit my homepage for news about conservation, ecology and QGIS
 http://conservationecology.wordpress.com/
QGIS and me
 Primary GIS system since
2008
 Contributed a new plugin
called LecoS to the QGIS
community
 Since 2012 support of QGIS-
users on gis.stackexchange
Workshop  Lund 2013 4
Roadplan for today
 Introduction in QGIS, install of QGIS and dependencies
 Get familiar with basic Raster and Vector layer processing
(introduction of common plugins)
  Short break somewhere here ...
 Landscape Analysis with QGIS
 Map presentation
 Advanced QGIS techniques examples + Questions :)
Workshop  Lund 2013 5
What is GIS?
A geographic information system (GIS) is a system designed
to capture, store, manipulate, analyze, manage, and present
types of geographical data. Wikipedia.com
Workshop  Lund 2013 6
Open Source GIS solutions
 QGIS started in 2002 as an
Open Source project
 Primarily intended as
interface for Geo-databases
(POSTGIS)
 Increasing popularity since
the last years
Workshop  Lund 2013 7
Functionalities
 Support for multiple file-formats
 Basic Vector processing
 Raster modifications
 Access to databases (POSTGIS,
MySQL, Spatiallite, )
 Web-support
(WMS,WFS,Webserver,...)
 Easily extendable
????
Workshop  Lund 2013 8
(Dis)Advantages of QGIS
 Pro
 Open Source
 Easy access to other Open
Source Software (R, GRASS,
Python, ...)
 Runs on all mayor OS
 Easy extendable through
plugins
 Very active global community
 Contra
 Missing features (cross-
dependencies)
 Bugs, Errors, Instability
 ( Layout capabilities )
Workshop  Lund 2013 9
Lets get started
Workshop  Lund 2013 10
http://www.qgis.org
Workshop  Lund 2013 11
QGIS 1.9 Master
http://tinyurl.com/QGIS-Install
Workshop-Files
http://tinyurl.com/Lund-Fileshttp://tinyurl.com/Lund-Files
Workshop  Lund 2013 12
Now install ...
 Make some room on your computer (at least 1 GB !)
 Install the current Development Version ( QGIS 1.9 ) on your
computer (see provided folder)
Important!
 Make sure the libraries python-scipy and python-numpy are checked
Workshop  Lund 2013 13
 Select Advanced Install
 Install from local Folder
 Mark the following (or all)
 Qgis-dev
 Python-numpy
 Python-scipy
 qgis-grass-plugin
 grass64
How to install (WIN)
Install from local folder
Workshop  Lund 2013 14
 and start QGIS 1.9 dev.
Workshop  Lund 2013 15
GIS data
Source: maprabu.blogspot.com
Format:
*.shp, *.csv, *.gpx, *.kml, ...
Format:
*.tif, *.vrt, *.hdr, *.asc, ...
Workshop  Lund 2013 16
Example Data set
 CORINE 2006 Landcover grid
 Naturalearth (National Boundaries) www.naturalearthdata.com
 GMTED 2010 DEM
 Artdatabanken (through GBIF) www.artdatabanken.se
Workshop  Lund 2013 17
Load in: CORINE (g100_06.tif)
 Zoom in / Zoom out
 Explore Properties
 Enable correct styles
 Look into Layer CRS
 Disable the layer
Tasks
Workshop  Lund 2013 18
Load in: State provinces (NE_Provinces.zip)
 Look into Attribute table
 Identify & remove Antarctica
 Color provinces according to
size (Graduated)
 Label the provinces
 Select provinces in Sweden
 Subset/reproject to a
Lambert Azimutal Projection
Tasks
Workshop  Lund 2013 19
 Calculate the mean (+SD)
province area (in km族) in
Sweden
Final task
Workshop  Lund 2013 20
Sweden 21,246,594,670.1467 km族
Workshop  Lund 2013 21
QGIS and Plugins
Must have:
 SEXTANTE, Openlayers Plugin, Points2One, MMQGIS, Point
Sampling Tool, Color Ramp Manager, LecoS, ...
Workshop  Lund 2013 22
Short Break
Kort paus
Kurze Pause
Workshop  Lund 2013 23
The genus Lycaena
Common Copper (Lycaena phlaeas) Purple-edged Copper (Lycaena hippothoe) Scarce Copper (Lycaena virgaureae)
Workshop  Lund 2013 24
Research questions
1) Where can those Lycaena species be found in Skane? (what is
the most abundant landcover-type on the landscape scale?) And
does it differ among the species?
2) Is there a different response among the species to landscape
heterogeneity?
3) Does one of the Coppers in Skane prefer higher elevations
compared to the other Coppers?
4) Is there a correlation between the number of Lycaena sp.
occurences and greater distance from forests?
Workshop  Lund 2013 25
Landscape analysis preparation  (1) Raster
Workshop  Lund 2013 26
Landscape analysis preparation  (2) species data
 Enable Add Delimited text layer-plugin in the plugin options
 Add GBIF-Lycaena.csv as vector layer
Workshop  Lund 2013 27
Landscape analysis preparation 
(3) Data processing
 Remove all points outside Skane
 Check for and remove unsure
determinations (? in name)
 Apply a circular buffer of 1000m
around each point
 Display the result categorized with
different colors
Workshop  Lund 2013 28
Research Question 1.)
 Crop your CORINE dataset with your buffered Occurrences
(overlapping buffers are not correctly cropped. Use UnionUnion first)
 Use LecoS  Land cover statistics to compute the
Landscape proportion of each land cover class
 Then calculate the area in m族 per buffer for the most abundant
(Using LecoS  Polygon overlay)
 Use Groupstats to get the mean/median values per species
Workshop  Lund 2013 29
Results Question 1.)
Results Top 3:
12 (non irrigated arable land) 35 %
24 (coniferous forest)  22 %
23 (broad-leaved forest) 13 %
Total Landcover of non-irrigated arable land
Species | Landcover Median
Lycaena hippothoe 695037.9779805 m族
Lycaena phlaeas 910049.726564 m族
Lycaena virgaureae 710038.797649 m族
Workshop  Lund 2013 30
Research Question 2.)
 Use LecoS  Polygon overlay to compute the Shannon
diversity index for each buffer
 Use Groupstats to display results
Workshop  Lund 2013 31
Results Question 2.)
Average
Workshop  Lund 2013 32
Research Question 3.)
Use the DEM and try it out :)
Workshop  Lund 2013 33
Results Question 3.)
Average
Workshop  Lund 2013 34
Research Question 4.)
 Combine all types of forested lands into a single raster class (QGIS
Rastercalculator)
 Then use the Proximity tool in the Raster menu
 Use the Save-As function (rightclick raster) to correctly set a nodata-
value
 Create a Vector-grid (5 km rectangles) and count the number of
Lycaena occ. inside.
 Use LecoS to extract the median values inside the grid
A bit more difficult
Workshop  Lund 2013 35
Results question 4.)
Spearman's rank
correlation rho
data: layer[[y]] and
layer[[x]]
S = 4172666, p-value =
0.5529
alternative hypothesis:
true rho is not equal to 0
sample estimates:
rho
0.03462806
Workshop  Lund 2013 36
Here could be another break
Workshop  Lund 2013 37
Map Presentation
Workshop  Lund 2013 38
Advanced Landscape Analysis Techniques
The landscape modifier
Workshop  Lund 2013 39
Advanced Landscape Analysis Techniques
Workshop  Lund 2013 40
Sextante Modeller
Theoretical Idea:
 Create random points
inside Skane
 Apply a buffer
 Calculate number of
occurrences inside buffer
Batchrun for occurrence
probability ?
Workshop  Lund 2013 41
Sextante R commands
Command Function
##[datagis]=group Sets the group to datagis
##layer = vector or raster Specifies the input layer to use
##distance=number 100 Sets a number field with default 100
##title=string France Get text input. Default is France
##field=field layer Select a field from the vector layer layer
hist(layer[[field]]) R-command: Histogram for fields from layer
##showplots Has to be set in order to see plot outputs
>t.test(layer[[field]]) Console output with a > before command
##output=output vector File output as vector or raster
Workshop  Lund 2013 42
Example Script
##[Own Scripts]=group
##showplots
##layer=vector
##y=field layer
##x=field layer
library("car")
plot(as.numeric( layer[[y]] )~as.numeric( layer[[x]] ),pch=19,bty="l",ylab=paste( y ),xlab=paste( x ) )
fit = lm( layer[[y]]~layer[[x]] )
regLine(fit,col="blue",lwd=2)
Workshop  Lund 2013 43
Hydrological Analysis
 Using DEMs and
hydrographic information
 What can be calculated:
 Watershed basins
 (Potential) Wetness
 Way of travel, Flood risks
 Potential location of aquifers
...
Potential Wetness based on Topography
Workshop  Lund 2013 44
Image Classification
Workshop  Lund 2013 45
Home-range estimation
 Possible through plugin
Animove (currently broken)
 Interface to R and package
adehabitat
 Alternative in SAGA and
Grass
Workshop  Lund 2013 46
Additional examples, help and tutorials
 http://www.gistutor.com/
 http://qgis.spatialthoughts.com/
 Youtube  search QGIS
 http://gis.stackexchange.com
 QGIS-user mailing list  http://lists.osgeo.org/listinfo/qgis-user
Workshop  Lund 2013 47
Thanks for your attention and good luck with your
projects!

More Related Content

Presentation - Lund 2013 GIS workshop

  • 1. Workshop Lund 2013 1 Landscape ecology analysis with QGIS Workshop at Lund University (2013) by Martin Jung
  • 2. Workshop Lund 2013 2 About me Currently master student in Biology at the University of Copenhagen BSc thesis about plant-pollinator networks in Biaowieza Interested in Ecology, Conservation and species distributions
  • 3. Workshop Lund 2013 3 Visit my homepage for news about conservation, ecology and QGIS http://conservationecology.wordpress.com/ QGIS and me Primary GIS system since 2008 Contributed a new plugin called LecoS to the QGIS community Since 2012 support of QGIS- users on gis.stackexchange
  • 4. Workshop Lund 2013 4 Roadplan for today Introduction in QGIS, install of QGIS and dependencies Get familiar with basic Raster and Vector layer processing (introduction of common plugins) Short break somewhere here ... Landscape Analysis with QGIS Map presentation Advanced QGIS techniques examples + Questions :)
  • 5. Workshop Lund 2013 5 What is GIS? A geographic information system (GIS) is a system designed to capture, store, manipulate, analyze, manage, and present types of geographical data. Wikipedia.com
  • 6. Workshop Lund 2013 6 Open Source GIS solutions QGIS started in 2002 as an Open Source project Primarily intended as interface for Geo-databases (POSTGIS) Increasing popularity since the last years
  • 7. Workshop Lund 2013 7 Functionalities Support for multiple file-formats Basic Vector processing Raster modifications Access to databases (POSTGIS, MySQL, Spatiallite, ) Web-support (WMS,WFS,Webserver,...) Easily extendable ????
  • 8. Workshop Lund 2013 8 (Dis)Advantages of QGIS Pro Open Source Easy access to other Open Source Software (R, GRASS, Python, ...) Runs on all mayor OS Easy extendable through plugins Very active global community Contra Missing features (cross- dependencies) Bugs, Errors, Instability ( Layout capabilities )
  • 9. Workshop Lund 2013 9 Lets get started
  • 10. Workshop Lund 2013 10 http://www.qgis.org
  • 11. Workshop Lund 2013 11 QGIS 1.9 Master http://tinyurl.com/QGIS-Install Workshop-Files http://tinyurl.com/Lund-Fileshttp://tinyurl.com/Lund-Files
  • 12. Workshop Lund 2013 12 Now install ... Make some room on your computer (at least 1 GB !) Install the current Development Version ( QGIS 1.9 ) on your computer (see provided folder) Important! Make sure the libraries python-scipy and python-numpy are checked
  • 13. Workshop Lund 2013 13 Select Advanced Install Install from local Folder Mark the following (or all) Qgis-dev Python-numpy Python-scipy qgis-grass-plugin grass64 How to install (WIN) Install from local folder
  • 14. Workshop Lund 2013 14 and start QGIS 1.9 dev.
  • 15. Workshop Lund 2013 15 GIS data Source: maprabu.blogspot.com Format: *.shp, *.csv, *.gpx, *.kml, ... Format: *.tif, *.vrt, *.hdr, *.asc, ...
  • 16. Workshop Lund 2013 16 Example Data set CORINE 2006 Landcover grid Naturalearth (National Boundaries) www.naturalearthdata.com GMTED 2010 DEM Artdatabanken (through GBIF) www.artdatabanken.se
  • 17. Workshop Lund 2013 17 Load in: CORINE (g100_06.tif) Zoom in / Zoom out Explore Properties Enable correct styles Look into Layer CRS Disable the layer Tasks
  • 18. Workshop Lund 2013 18 Load in: State provinces (NE_Provinces.zip) Look into Attribute table Identify & remove Antarctica Color provinces according to size (Graduated) Label the provinces Select provinces in Sweden Subset/reproject to a Lambert Azimutal Projection Tasks
  • 19. Workshop Lund 2013 19 Calculate the mean (+SD) province area (in km族) in Sweden Final task
  • 20. Workshop Lund 2013 20 Sweden 21,246,594,670.1467 km族
  • 21. Workshop Lund 2013 21 QGIS and Plugins Must have: SEXTANTE, Openlayers Plugin, Points2One, MMQGIS, Point Sampling Tool, Color Ramp Manager, LecoS, ...
  • 22. Workshop Lund 2013 22 Short Break Kort paus Kurze Pause
  • 23. Workshop Lund 2013 23 The genus Lycaena Common Copper (Lycaena phlaeas) Purple-edged Copper (Lycaena hippothoe) Scarce Copper (Lycaena virgaureae)
  • 24. Workshop Lund 2013 24 Research questions 1) Where can those Lycaena species be found in Skane? (what is the most abundant landcover-type on the landscape scale?) And does it differ among the species? 2) Is there a different response among the species to landscape heterogeneity? 3) Does one of the Coppers in Skane prefer higher elevations compared to the other Coppers? 4) Is there a correlation between the number of Lycaena sp. occurences and greater distance from forests?
  • 25. Workshop Lund 2013 25 Landscape analysis preparation (1) Raster
  • 26. Workshop Lund 2013 26 Landscape analysis preparation (2) species data Enable Add Delimited text layer-plugin in the plugin options Add GBIF-Lycaena.csv as vector layer
  • 27. Workshop Lund 2013 27 Landscape analysis preparation (3) Data processing Remove all points outside Skane Check for and remove unsure determinations (? in name) Apply a circular buffer of 1000m around each point Display the result categorized with different colors
  • 28. Workshop Lund 2013 28 Research Question 1.) Crop your CORINE dataset with your buffered Occurrences (overlapping buffers are not correctly cropped. Use UnionUnion first) Use LecoS Land cover statistics to compute the Landscape proportion of each land cover class Then calculate the area in m族 per buffer for the most abundant (Using LecoS Polygon overlay) Use Groupstats to get the mean/median values per species
  • 29. Workshop Lund 2013 29 Results Question 1.) Results Top 3: 12 (non irrigated arable land) 35 % 24 (coniferous forest) 22 % 23 (broad-leaved forest) 13 % Total Landcover of non-irrigated arable land Species | Landcover Median Lycaena hippothoe 695037.9779805 m族 Lycaena phlaeas 910049.726564 m族 Lycaena virgaureae 710038.797649 m族
  • 30. Workshop Lund 2013 30 Research Question 2.) Use LecoS Polygon overlay to compute the Shannon diversity index for each buffer Use Groupstats to display results
  • 31. Workshop Lund 2013 31 Results Question 2.) Average
  • 32. Workshop Lund 2013 32 Research Question 3.) Use the DEM and try it out :)
  • 33. Workshop Lund 2013 33 Results Question 3.) Average
  • 34. Workshop Lund 2013 34 Research Question 4.) Combine all types of forested lands into a single raster class (QGIS Rastercalculator) Then use the Proximity tool in the Raster menu Use the Save-As function (rightclick raster) to correctly set a nodata- value Create a Vector-grid (5 km rectangles) and count the number of Lycaena occ. inside. Use LecoS to extract the median values inside the grid A bit more difficult
  • 35. Workshop Lund 2013 35 Results question 4.) Spearman's rank correlation rho data: layer[[y]] and layer[[x]] S = 4172666, p-value = 0.5529 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.03462806
  • 36. Workshop Lund 2013 36 Here could be another break
  • 37. Workshop Lund 2013 37 Map Presentation
  • 38. Workshop Lund 2013 38 Advanced Landscape Analysis Techniques The landscape modifier
  • 39. Workshop Lund 2013 39 Advanced Landscape Analysis Techniques
  • 40. Workshop Lund 2013 40 Sextante Modeller Theoretical Idea: Create random points inside Skane Apply a buffer Calculate number of occurrences inside buffer Batchrun for occurrence probability ?
  • 41. Workshop Lund 2013 41 Sextante R commands Command Function ##[datagis]=group Sets the group to datagis ##layer = vector or raster Specifies the input layer to use ##distance=number 100 Sets a number field with default 100 ##title=string France Get text input. Default is France ##field=field layer Select a field from the vector layer layer hist(layer[[field]]) R-command: Histogram for fields from layer ##showplots Has to be set in order to see plot outputs >t.test(layer[[field]]) Console output with a > before command ##output=output vector File output as vector or raster
  • 42. Workshop Lund 2013 42 Example Script ##[Own Scripts]=group ##showplots ##layer=vector ##y=field layer ##x=field layer library("car") plot(as.numeric( layer[[y]] )~as.numeric( layer[[x]] ),pch=19,bty="l",ylab=paste( y ),xlab=paste( x ) ) fit = lm( layer[[y]]~layer[[x]] ) regLine(fit,col="blue",lwd=2)
  • 43. Workshop Lund 2013 43 Hydrological Analysis Using DEMs and hydrographic information What can be calculated: Watershed basins (Potential) Wetness Way of travel, Flood risks Potential location of aquifers ... Potential Wetness based on Topography
  • 44. Workshop Lund 2013 44 Image Classification
  • 45. Workshop Lund 2013 45 Home-range estimation Possible through plugin Animove (currently broken) Interface to R and package adehabitat Alternative in SAGA and Grass
  • 46. Workshop Lund 2013 46 Additional examples, help and tutorials http://www.gistutor.com/ http://qgis.spatialthoughts.com/ Youtube search QGIS http://gis.stackexchange.com QGIS-user mailing list http://lists.osgeo.org/listinfo/qgis-user
  • 47. Workshop Lund 2013 47 Thanks for your attention and good luck with your projects!