Harold Nelson
10/16/2021
Read the Tobias Depth Elevation Model
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4
## ✓ tibble 3.1.2 ✓ dplyr 1.0.6
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## Linking to GEOS 3.8.1, GDAL 3.2.1, PROJ 7.2.1
## Loading required package: sp
##
## Attaching package: 'raster'
## The following object is masked from 'package:dplyr':
##
## select
## The following object is masked from 'package:tidyr':
##
## extract
Since this is a raster dataset, we use raster().
## CRS arguments: +proj=longlat +datum=NAD83 +no_defs
Since this data is not using the same CRS as the rest of the data, we need to convert it. To do this, we need an sf object with the CRS we want. We can use the shoreline sf object.
## Reading layer `Shoreline' from data source `/Users/haroldnelson/Dropbox/QGIS/Tobias/Shoreline.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1 feature and 6 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -123.1086 ymin: 37.69325 xmax: -122.3277 ymax: 37.92975
## Geodetic CRS: WGS84(DD)
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj
## = prefer_proj): Discarded datum Unknown based on WGS84 ellipsoid in Proj4
## definition
## Warning in showSRID(SRS_string, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum WGS84 in Proj4 definition
## CRS arguments: +proj=longlat +ellps=WGS84 +no_defs
## Rows: 10,331,100
## Columns: 3
## $ x <dbl> -122.6111, -122.6110, -122.6109, -122.6108, -122.6107, -122.610…
## $ y <dbl> 37.89356, 37.89356, 37.89356, 37.89356, 37.89356, 37.89356, 37.…
## $ DEM_SF <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…