-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathVectorRaster_Feedback.Rmd
72 lines (45 loc) · 1.79 KB
/
VectorRaster_Feedback.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
title: "Raster Vector Lesson"
author: "Jan Verbesselt"
date: "12 Jan 2016"
output: slidy_presentation
---
# Q&A forum
Excellent to see some action!
- are there any open questions to be solved?
- [a recent question](http://www.geo-informatie.nl/courses/grs33806/question2answer/index.php?qa=60&qa_1=cannot-bind-2-lines-together)
# General comments
[Ubuntu Desktop versus server](http://www.ubuntu.com/download/)
Feedback via Blackboard
- Did you see the feedback on Ex 1, 2 and 3?
# Feedback previous lessons
Start your script, and define a e.g. in and out file name and path.
Do not change the working directory within your script or certainly not within your function
Example:
```{r, eval = FALSE}
# set input folder or file
# or ask for input folder or file
ifolder <- "/path/"
ofolder <- "/path/"
```
More info via this question: "[R user input?](http://stackoverflow.com/questions/5974967/what-is-the-correct-way-to-ask-for-user-input-in-an-r-program)"
> [R examples](http://www.rexamples.com/4/Reading%20user%20input)
# Solution of Wednesday's shell script
```{r, engine='bash', results='hide', eval =FALSE}
#!/bin/bash
cd ../data
fnin="ndvi.tif"
fnout="ndvi_latlong_60.tif"
fntemp="temp.tif"
fnpng="ndvilatlong.png"
echo "resample the inputfile: $fnin"
####
```
> What is the benefit of the Shell script? Why would you use it?
# Tutorial of today
Questions:
Would you rather reproject a raster or a vector layer?
Why can't we simply use the LineLength() function from the sp package?
> Hint, look at the CRS in which we are working, and at the help page of the distHaversine() function. Also the see distVincentyEllipsoid() function. Does this one provide a more accurate distance?
# Todays lesson
[Vector & Raster](http://geoscripting-wur.github.io/VectorRaster/)