-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathr-raster-vector-geospatial--03-raster-reproject-in-r.diff
127 lines (118 loc) · 3.31 KB
/
r-raster-vector-geospatial--03-raster-reproject-in-r.diff
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
diff --git a/home/zhian/Documents/Carpentries/Git/zkamvar--postmaul/data/rmd-repos/datacarpentry--r-raster-vector-geospatialR3/_episodes/03-raster-reproject-in-r.md b/home/zhian/Documents/Carpentries/Git/zkamvar--postmaul/data/rmd-repos/datacarpentry--r-raster-vector-geospatialR4/_episodes/03-raster-reproject-in-r.md
index 0f40a7b..6bbee46 100644
--- a/home/zhian/Documents/Carpentries/Git/zkamvar--postmaul/data/rmd-repos/datacarpentry--r-raster-vector-geospatialR3/_episodes/03-raster-reproject-in-r.md
+++ b/home/zhian/Documents/Carpentries/Git/zkamvar--postmaul/data/rmd-repos/datacarpentry--r-raster-vector-geospatialR4/_episodes/03-raster-reproject-in-r.md
@@ -144,8 +144,7 @@ the hillshade data to see how they differ.
> >
> > ~~~
> > CRS arguments:
-> > +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs +ellps=WGS84
-> > +towgs84=0,0,0
+> > +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
> > ~~~
> > {: .output}
> >
@@ -160,8 +159,7 @@ the hillshade data to see how they differ.
> >
> >
> > ~~~
-> > CRS arguments:
-> > +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
+> > CRS arguments: +proj=longlat +datum=WGS84 +no_defs
> > ~~~
> > {: .output}
> >
@@ -209,6 +207,30 @@ DTM_hill_UTMZ18N_HARV <- projectRaster(DTM_hill_HARV,
~~~
{: .language-r}
+
+
+~~~
+Warning in rgdal::rawTransform(projfrom, projto, nrow(xy), xy[, 1], xy[, : Using
+PROJ not WKT2 strings
+~~~
+{: .error}
+
+
+
+~~~
+Warning in rgdal::rawTransform(projection(obj), crs, nrow(xy), xy[, 1], : Using
+PROJ not WKT2 strings
+~~~
+{: .error}
+
+
+
+~~~
+Warning in rgdal::rawTransform(projto_int, projfrom, nrow(xy), xy[, 1], : Using
+PROJ not WKT2 strings
+~~~
+{: .error}
+
Now we can compare the CRS of our original DTM hillshade
and our new DTM hillshade, to see how they are different.
@@ -222,8 +244,7 @@ crs(DTM_hill_UTMZ18N_HARV)
~~~
CRS arguments:
- +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs +ellps=WGS84
-+towgs84=0,0,0
+ +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
~~~
{: .output}
@@ -237,8 +258,7 @@ crs(DTM_hill_HARV)
~~~
-CRS arguments:
- +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
+CRS arguments: +proj=longlat +datum=WGS84 +no_defs
~~~
{: .output}
@@ -337,6 +357,22 @@ DTM_hill_UTMZ18N_HARV <- projectRaster(DTM_hill_HARV,
~~~
{: .language-r}
+
+
+~~~
+Warning in rgdal::rawTransform(projfrom, projto, nrow(xy), xy[, 1], xy[, : Using
+PROJ not WKT2 strings
+~~~
+{: .error}
+
+
+
+~~~
+Warning in rgdal::rawTransform(projto_int, projfrom, nrow(xy), xy[, 1], : Using
+PROJ not WKT2 strings
+~~~
+{: .error}
+
Let's double-check our resolution to be sure
~~~
@@ -415,7 +451,28 @@ hillshade to produce a nice looking, textured map!
> > DTM_hill_UTMZ18N_SJER <- projectRaster(DSM_hill_SJER_WGS,
> > crs = crs(DSM_SJER),
> > res = 1)
+> > ~~~
+> > {: .language-r}
+> >
> >
+> >
+> > ~~~
+> > Warning in rgdal::rawTransform(projfrom, projto, nrow(xy), xy[, 1], xy[, : Using
+> > PROJ not WKT2 strings
+> > ~~~
+> > {: .error}
+> >
+> >
+> >
+> > ~~~
+> > Warning in rgdal::rawTransform(projto_int, projfrom, nrow(xy), xy[, 1], : Using
+> > PROJ not WKT2 strings
+> > ~~~
+> > {: .error}
+> >
+> >
+> >
+> > ~~~
> > # convert to data.frames
> > DSM_SJER_df <- as.data.frame(DSM_SJER, xy = TRUE)
> >