User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

en:learning:schools:s01:worksheets:ba-ws-10-1 [2015/09/22 16:22]
en:learning:schools:s01:worksheets:ba-ws-10-1 [2015/09/22 16:22] (current)
Line 1: Line 1:
 +====== W10-1 GIS data I/O and some visualizations ======
 +This worksheet provides a first impression on how to handle GIS data sets in R. After completing this worksheet you should know how to read ESRI shape files and GeoTiff raster data sets and visualize them in a simple plot.
 +===== Things you need for this worksheet =====
 +  * {{section>​en:​resources:​templates:​tools#​R environment&​inline}}
 +  * {{section>​en:​resources:​templates:​tools#​R studio&​inline}}
 +  * {{section>​en:​resources:​templates:​tools#​Field survey 2014 subset 01 as shape data set&​inline}}
 +  * {{section>​en:​resources:​templates:​tools#​Fogo DEM and NDVI &​inline}}
 +===== Learning log assignments =====
 +:!: Please open a new script and name it "​W10-1.R"​.
 +For this worksheet we will need the packages "​rgdal",​ "​raster"​ and "​plotKML"​. Please load them (peek at [[en:​learning:​schools:​s01:​worksheets:​ba-ws-04-1|W04-1]] if you forgot how to load libraries or install packages).
 +So far we have worked on a CSV version of the data subset from the field survey of 2014. In this worksheet, we will use the same data but this time it is provided as an ESRI shape data set. Hence, in addition to the information we got already from the CSV version, we now have a location information about the plots.
 +:-\ Please read the ESRI shape file version of he field survey data subset. Instead of read.table(),​ please use readOGR(). Have a look at the meta data of this shape file using the print() function once you have loaded it into memory. Check out what is happening if you use the plot() function instead.
 +:-\ To make things a little more interesting,​ please load the two raster data sets (NDVI and DEM) by simply supplying the file names to the raster() function. Have a look at the meta information of the variables you have used to store the two data sets.
 +Let's combine one of the raster data sets and your field survey plots into one map type figure.
 +:-\ Please plot the NDVI image using the plot() function and add your ESRI shape content to the plot by calling the plot() function once again, this time supplying the shape variable and the attribute "add =TRUE"​.
 +:-\ The result might look good but it's so ... small! Unless one of your ancestors was an eagle you won't be able to identify anything. So let's zoom in a bit using the zoom() function and combine it again with our plots. ​
 +:-\ Enough of that normal stuff. Let's do some fancy plotting of the locations where the vegetation coverage has been recorded in Google Earth by supplying the vegetation coverage attribute of the shape data set to the plotKML() function.
en/learning/schools/s01/worksheets/ba-ws-10-1.txt ยท Last modified: 2015/09/22 16:22 (external edit)