Last active
April 10, 2018 17:40
-
-
Save a-r-d/42314a458c9890339f547851b33efbf5 to your computer and use it in GitHub Desktop.
playing with elevatr public AWS data not authed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgdal) | |
library(elevatr) | |
# this is the prjection system given as example in the documentation | |
ll_prj <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0" | |
# Im using this projection system based on reading this document: | |
# https://www.nceas.ucsb.edu/~frazier/RSpatialGuides/OverviewCoordinateReferenceSystems.pdf | |
us_prj = "+init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0" | |
# SpatialPoints is from 'rgdal' package | |
# this is centered on minneapolis | |
mans_sp <- SpatialPoints(coordinates(data.frame(y=-93.289865, x=44.965937)), CRS(us_prj)) | |
# get raster data, Z is the zoom level | |
elevation <- get_elev_raster(mans_sp, z = 12, src = "aws") | |
# plot the raster data | |
plot(elevation) |
Author
a-r-d
commented
Apr 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment