Skip to content

Commit

Permalink
differences for PR #435
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 7, 2024
1 parent 8a6252f commit 3fbb0cf
Show file tree
Hide file tree
Showing 23 changed files with 196 additions and 1,297 deletions.
32 changes: 16 additions & 16 deletions 01-raster-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ source: Rmd
---


```{.warning}
```warning
Warning in
download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip",
: cannot open URL
'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip':
HTTP status was '500 Internal Server Error'
```

```{.error}
```error
Error in download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip", : cannot open URL 'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip'
```

Expand Down Expand Up @@ -95,7 +95,7 @@ your data.
describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_dsmCrop.tif")
```

```{.output}
```output
[1] "Driver: GTiff/GeoTIFF"
[2] "Files: data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_dsmCrop.tif"
[3] "Size is 1697, 1367"
Expand Down Expand Up @@ -204,7 +204,7 @@ DSM_HARV <-
DSM_HARV
```

```{.output}
```output
class : SpatRaster
dimensions : 1367, 1697, 1 (nrow, ncol, nlyr)
resolution : 1, 1 (x, y)
Expand All @@ -225,11 +225,11 @@ columns, descriptive statistics for raster data can be retrieved like
summary(DSM_HARV)
```

```{.warning}
```warning
Warning: [summary] used a sample
```

```{.output}
```output
HARV_dsmCrop
Min. :305.6
1st Qu.:345.6
Expand All @@ -249,7 +249,7 @@ the function `values`:
summary(values(DSM_HARV))
```

```{.output}
```output
HARV_dsmCrop
Min. :305.1
1st Qu.:345.6
Expand Down Expand Up @@ -277,7 +277,7 @@ dataframe format.
str(DSM_HARV_df)
```

```{.output}
```output
'data.frame': 2319799 obs. of 3 variables:
$ x : num 731454 731454 731456 731456 731458 ...
$ y : num 4713838 4713838 4713838 4713838 4713838 ...
Expand Down Expand Up @@ -360,7 +360,7 @@ function.
crs(DSM_HARV, proj = TRUE)
```

```{.output}
```output
[1] "+proj=utm +zone=18 +datum=WGS84 +units=m +no_defs"
```

Expand Down Expand Up @@ -424,7 +424,7 @@ can view these values:
minmax(DSM_HARV)
```

```{.output}
```output
HARV_dsmCrop
min 305.07
max 416.07
Expand All @@ -434,15 +434,15 @@ max 416.07
min(values(DSM_HARV))
```

```{.output}
```output
[1] 305.07
```

```r
max(values(DSM_HARV))
```

```{.output}
```output
[1] 416.07
```

Expand Down Expand Up @@ -481,7 +481,7 @@ view the number of bands in a raster using the `nly()` function.
nlyr(DSM_HARV)
```

```{.output}
```output
[1] 1
```

Expand Down Expand Up @@ -562,7 +562,7 @@ Use the output from the `describe()` and `sources()` functions to find out what
describe(sources(DSM_HARV))
```

```{.output}
```output
[1] "Driver: GTiff/GeoTIFF"
[2] "Files: /home/runner/work/r-raster-vector-geospatial/r-raster-vector-geospatial/site/built/data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_dsmCrop.tif"
[3] "Size is 1697, 1367"
Expand Down Expand Up @@ -676,7 +676,7 @@ ggplot() +
geom_histogram(data = DSM_HARV_df, aes(HARV_dsmCrop))
```

```{.output}
```output
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
```

Expand Down Expand Up @@ -726,7 +726,7 @@ Notice: this file is a hillshade. We will learn about hillshades in the [Working
describe("data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif")
```

```{.output}
```output
[1] "Driver: GTiff/GeoTIFF"
[2] "Files: data/NEON-DS-Airborne-Remote-Sensing/HARV/DSM/HARV_DSMhill.tif"
[3] "Size is 1697, 1367"
Expand Down
18 changes: 9 additions & 9 deletions 02-raster-plot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ source: Rmd
---


```{.warning}
```warning
Warning in
download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip",
: cannot open URL
'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip':
HTTP status was '500 Internal Server Error'
```

```{.error}
```error
Error in download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip", : cannot open URL 'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip'
```

Expand Down Expand Up @@ -85,7 +85,7 @@ values of `fct_elevation`:
unique(DSM_HARV_df$fct_elevation)
```

```{.output}
```output
[1] (379,416] (342,379] (305,342]
Levels: (305,342] (342,379] (379,416]
```
Expand All @@ -100,7 +100,7 @@ DSM_HARV_df %>%
count()
```

```{.output}
```output
# A tibble: 3 × 2
# Groups: fct_elevation [3]
fct_elevation n
Expand All @@ -126,7 +126,7 @@ DSM_HARV_df <- DSM_HARV_df %>%
unique(DSM_HARV_df$fct_elevation_2)
```

```{.output}
```output
[1] (400,450] (350,400] (300,350]
Levels: (300,350] (350,400] (400,450]
```
Expand Down Expand Up @@ -163,7 +163,7 @@ DSM_HARV_df %>%
count()
```

```{.output}
```output
# A tibble: 3 × 2
# Groups: fct_elevation_2 [3]
fct_elevation_2 n
Expand Down Expand Up @@ -196,7 +196,7 @@ Since we have three bins, we want to create a 3-color palette:
terrain.colors(3)
```

```{.output}
```output
[1] "#00A600" "#ECB176" "#F2F2F2"
```

Expand Down Expand Up @@ -311,7 +311,7 @@ DSM_hill_HARV <-
DSM_hill_HARV
```

```{.output}
```output
class : SpatRaster
dimensions : 1367, 1697, 1 (nrow, ncol, nlyr)
resolution : 1, 1 (x, y)
Expand All @@ -332,7 +332,7 @@ DSM_hill_HARV_df <- as.data.frame(DSM_hill_HARV, xy = TRUE)
str(DSM_hill_HARV_df)
```

```{.output}
```output
'data.frame': 2313675 obs. of 3 variables:
$ x : num 731454 731456 731456 731458 731458 ...
$ y : num 4713836 4713836 4713836 4713836 4713836 ...
Expand Down
24 changes: 12 additions & 12 deletions 03-raster-reproject-in-r.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ source: Rmd
---


```{.warning}
```warning
Warning in
download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip",
: cannot open URL
'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip':
HTTP status was '500 Internal Server Error'
```

```{.error}
```error
Error in download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip", : cannot open URL 'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip'
```

Expand Down Expand Up @@ -164,7 +164,7 @@ does each use?
crs(DTM_HARV, parse = TRUE)
```

```{.output}
```output
[1] "PROJCRS[\"WGS 84 / UTM zone 18N\","
[2] " BASEGEOGCRS[\"WGS 84\","
[3] " DATUM[\"World Geodetic System 1984\","
Expand Down Expand Up @@ -210,7 +210,7 @@ crs(DTM_HARV, parse = TRUE)
crs(DTM_hill_HARV, parse = TRUE)
```

```{.output}
```output
[1] "GEOGCRS[\"WGS 84\","
[2] " DATUM[\"World Geodetic System 1984\","
[3] " ELLIPSOID[\"WGS 84\",6378137,298.257223563,"
Expand Down Expand Up @@ -288,7 +288,7 @@ hillshade, to see how they are different.
crs(DTM_hill_UTMZ18N_HARV, parse = TRUE)
```

```{.output}
```output
[1] "PROJCRS[\"WGS 84 / UTM zone 18N\","
[2] " BASEGEOGCRS[\"WGS 84\","
[3] " DATUM[\"World Geodetic System 1984\","
Expand Down Expand Up @@ -333,7 +333,7 @@ crs(DTM_hill_UTMZ18N_HARV, parse = TRUE)
crs(DTM_hill_HARV, parse = TRUE)
```

```{.output}
```output
[1] "GEOGCRS[\"WGS 84\","
[2] " DATUM[\"World Geodetic System 1984\","
[3] " ELLIPSOID[\"WGS 84\",6378137,298.257223563,"
Expand All @@ -357,15 +357,15 @@ We can also compare the extent of the two objects.
ext(DTM_hill_UTMZ18N_HARV)
```

```{.output}
```output
SpatExtent : 731402.31567604, 733200.22199435, 4712407.19751409, 4713901.78222079 (xmin, xmax, ymin, ymax)
```

```r
ext(DTM_hill_HARV)
```

```{.output}
```output
SpatExtent : -72.1819236223343, -72.1606102223342, 42.5294079700285, 42.5423355900285 (xmin, xmax, ymin, ymax)
```

Expand Down Expand Up @@ -403,15 +403,15 @@ our original data.
res(DTM_hill_UTMZ18N_HARV)
```

```{.output}
```output
[1] 1.001061 1.001061
```

```r
res(DTM_HARV)
```

```{.output}
```output
[1] 1 1
```

Expand All @@ -436,15 +436,15 @@ together. Let's double-check our resolution to be sure:
res(DTM_hill_UTMZ18N_HARV)
```

```{.output}
```output
[1] 1 1
```

```r
res(DTM_HARV)
```

```{.output}
```output
[1] 1 1
```

Expand Down
Loading

0 comments on commit 3fbb0cf

Please sign in to comment.