Harold Nelson
11/13/2021
This a demonstration of the use of OpenStreetMap in combination with other data. It is based on transit stops in Washington.The transit stop data can be obtained at https://wsdot.wa.gov/mapsdata/products/gisdata.htm.
There is a video walkthrough at https://www.youtube.com/watch?v=qws9k7xOVYo
To see the video, right-click and open in a new tab or window.
## Reading layer `TransitStops' from data source
## `/Users/haroldnelson/Dropbox/WA Geodata/TransitStops.gdb' using driver `OpenFileGDB'
## Simple feature collection with 20327 features and 6 fields
## Geometry type: POINT
## Dimension: XY
## Bounding box: xmin: 626083.8 ymin: 67252.06 xmax: 2532432 ymax: 1343139
## Projected CRS: NAD83(HARN) / Washington South (ftUS)
ts_bb = st_bbox(ts)
osm_map = read_osm(ts_bb)
tm_shape(osm_map) +
tm_rgb() +
tm_shape(ts) + tm_dots()
## Reading layer `Thurston_County_Border' from data source
## `/Users/haroldnelson/Dropbox/WA Geodata/Thurston_County_Border.kml'
## using driver `KML'
## Simple feature collection with 7 features and 2 fields
## Geometry type: POLYGON
## Dimension: XY
## Bounding box: xmin: -123.2031 ymin: 46.76205 xmax: -122.2154 ymax: 47.18682
## Geodetic CRS: WGS 84
Thurston = st_transform(Thurston,st_crs(ts))
Thurston_bb = st_bbox(Thurston)
Thurston_map = read_osm(Thurston_bb)
tm_shape(Thurston_map) +
tm_rgb() +
tm_shape(Thurston) +
tm_borders(lwd = 2,col="blue") +
tm_shape(ts) +
tm_dots()