Skip to content

Commit

Permalink
Fix broken WCS vignette
Browse files Browse the repository at this point in the history
 - use `terra::metags()` not attr() after 8aebc85
  • Loading branch information
brownag committed Jan 18, 2024
1 parent f381d27 commit a54bc51
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions vignettes/wcs-ssurgo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ b <- buffer(p, 1000)
mu <- mukey.wcs(b, db = 'gSSURGO')
# inspect
plot(mu, legend = FALSE, axes = FALSE, main = attr(mu, 'layer name'))
box()
plot(mu, legend = FALSE, axes = FALSE, main = metags(mu)['description'])
# add buffer, after transforming to mukey grid CRS
plot(project(b, "EPSG:5070"), add = TRUE)
Expand Down Expand Up @@ -212,8 +211,7 @@ st_crs(x) <- 4326
mu <- mukey.wcs(x, db = 'gSSURGO')
# inspect
plot(mu, legend = FALSE, axes = FALSE, main = attr(mu, 'layer name'))
box()
plot(mu, legend = FALSE, axes = FALSE, main = metags(mu)['description'])
# add original BBOX, after transforming to mukey grid CRS
plot(st_transform(x, 5070), add = TRUE)
Expand Down Expand Up @@ -346,7 +344,7 @@ plot(
x,
axes = FALSE,
legend = FALSE,
main = attr(x, 'layer name')
main = metags(x)['description']
)
plot(a, add = TRUE)
Expand All @@ -355,7 +353,7 @@ plot(
y,
axes = FALSE,
legend = FALSE,
main = attr(y, 'layer name')
main = metags(y)['description']
)
plot(a, add = TRUE)
Expand All @@ -364,7 +362,7 @@ plot(
z,
axes = FALSE,
legend = FALSE,
main = attr(z, 'layer name'),
main = metags(z)['description'],
ext = x
)
plot(a, add = TRUE)
Expand All @@ -386,15 +384,15 @@ plot(
x,
axes = FALSE,
legend = FALSE,
main = attr(x, 'layer name')
main = metags(x)['description']
)
# STATSGO
plot(
statsgo,
axes = FALSE,
legend = FALSE,
main = attr(statsgo, 'layer name')
main = metags(statsgo)['description']
)
```

Expand All @@ -421,7 +419,7 @@ plot(
mu,
legend = FALSE,
axes = FALSE,
main = attr(mu, 'layer name'),
main = metags(mu)['description'],
colNA = 'royalblue'
)
```
Expand Down Expand Up @@ -456,7 +454,7 @@ plot(
mu,
legend = FALSE,
axes = FALSE,
main = attr(mu, 'layer name'),
main = metags(mu)['description'],
colNA = 'royalblue'
)
```
Expand Down Expand Up @@ -757,7 +755,6 @@ Inspect just the plant available water 0-25cm.

```{r fig.width = 6, fig.height = 4}
plot(mu2$awc_r)
box()
```

Plot aggregate soil properties.
Expand Down

0 comments on commit a54bc51

Please sign in to comment.