@@ -176,22 +176,23 @@ ggplot() +
176
176
coord_quickmap()
177
177
```
178
178
179
- ::::::::::::::::::::::::::::::::::::::::: callout
179
+ :::::::::::::::: callout
180
180
181
181
## Plotting Tip
182
182
183
183
More information about the Viridis palette used above at
184
184
[ R Viridis package documentation] ( https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html ) .
185
185
186
+ ::::::::::::::::::
186
187
187
- ::::::::::::::::::::::::::::::::::::::::::::::::::
188
188
189
- ::::::::::::::::::::::::::::::::::::::::: callout
189
+ ::::::::::::::::::::::::::::::::::::::::: challenge
190
190
191
191
## Plotting Tip
192
192
193
193
For faster, simpler plots, you can use the ` plot ` function from the ` terra ` package.
194
194
195
+
195
196
::::::::::::::: solution
196
197
197
198
## Show plot
@@ -202,9 +203,10 @@ See `?plot` for more arguments to customize the plot
202
203
plot(DSM_HARV)
203
204
```
204
205
205
- :::::::::::::::::::::::::
206
+ :::::::::::::::::
207
+
208
+ :::::::::::::::::::::::::::::::::::::::::::
206
209
207
- ::::::::::::::::::::::::::::::::::::::::::::::::::
208
210
209
211
This map shows the elevation of our study site in Harvard Forest. From the
210
212
legend, we can see that the maximum elevation is ~ 400, but we can't tell whether
@@ -238,8 +240,6 @@ What units are our data in?
238
240
239
241
` +units=m ` tells us that our data is in meters.
240
242
241
-
242
-
243
243
:::::::::::::::::::::::::
244
244
245
245
::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -443,7 +443,7 @@ raster's metadata. If a `NoDataValue` was stored in the GeoTIFF tag, when R
443
443
opens up the raster, it will assign each instance of the value to ` NA ` . Values
444
444
of ` NA ` will be ignored by R as demonstrated above.
445
445
446
- ::::::::::::::::::::::::::::::::::::::::: callout
446
+ ::::::::::::::::::::::::::::::::::::::::: challenge
447
447
448
448
## Challenge
449
449
@@ -460,8 +460,6 @@ describe(sources(DSM_HARV))
460
460
461
461
` NoDataValue ` are encoded as -9999.
462
462
463
-
464
-
465
463
:::::::::::::::::::::::::
466
464
467
465
::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -547,41 +545,40 @@ was created using the default of 30 bins. The distribution of elevation values
547
545
for our ` Digital Surface Model (DSM) ` looks reasonable. It is likely there are
548
546
no bad data values in this particular raster.
549
547
550
- > ## Challenge: Explore Raster Metadata
551
- >
552
- > Use ` describe() ` to determine the following about the ` NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif ` file:
553
- >
554
- > 1 . Does this file have the same CRS as ` DSM_HARV ` ?
555
- > 2 . What is the ` NoDataValue ` ?
556
- > 3 . What is resolution of the raster data?
557
- > 4 . How large would a 5x5 pixel area be on the Earth's surface?
558
- > 5 . Is the file a multi- or single-band raster?
559
- >
560
- > Notice: this file is a hillshade. We will learn about hillshades in the [ Working with[ Multi-band Rasters in R] ( 05-raster-multi-band-in-r/ ) episode.
561
- >
562
- > > ## Answers
563
- > >
564
- > > ``` {r challenge-code-attributes}
565
- > > ```
566
-
567
- describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV\_DSMhill.tif")
568
-
569
548
::::::::::::::::::::::::::::::::::::::: challenge
570
549
550
+ ## Challenge: Explore Raster Metadata
551
+
552
+ Use ` describe() ` to determine the following about the ` NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif ` file:
553
+
554
+ 1 . Does this file have the same CRS as ` DSM_HARV ` ?
555
+ 2 . What is the ` NoDataValue ` ?
556
+ 3 . What is resolution of the raster data?
557
+ 4 . How large would a 5x5 pixel area be on the Earth's surface?
558
+ 5 . Is the file a multi- or single-band raster?
559
+
560
+ Notice: this file is a hillshade. We will learn about hillshades in the [ Working with Multi-band Rasters in R] ( 05-raster-multi-band-in-r/ ) episode.
561
+
571
562
::::::::::::::: solution
572
563
564
+ ## Answers
565
+
566
+ ``` {r challenge-code-attributes}
567
+ describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif")
573
568
```
569
+
570
+
574
571
1 . If this file has the same CRS as DSM_HARV? Yes: UTM Zone 18, WGS84, meters.
575
572
2 . What format ` NoDataValues ` take? -9999
576
573
3 . The resolution of the raster data? 1x1
577
574
4 . How large a 5x5 pixel area would be? 5mx5m How? We are given resolution of 1x1 and units in meters, therefore resolution of 5x5 means 5x5m.
578
575
5 . Is the file a multi- or single-band raster? Single.
579
- ```
580
576
581
- :::::::::::::::::::::::::
577
+ :::::::::::::::
582
578
583
579
::::::::::::::::::::::::::::::::::::::::::::::::::
584
580
581
+
585
582
::::::::::::::::::::::::::::::::::::::::: callout
586
583
587
584
## More Resources
0 commit comments