```r
reserve<-st_read(conn,query="select * from giam.reserve")
loss<- pgGetRast(conn, c("giam", "loss"))
forest2000<- pgGetRast(conn, c("giam", "forest2000"))

library(elevatr)
elev <- get_elev_raster(reserve, z = 9,clip="bbox")
elev <- projectRaster(elev, crs=st_crs(reserve)$proj4string) ## Make sure we stillknow the CRS
elev[elev<0]<-NA
elev[elev>100]<-NA

slope<-terrain(elev, opt='slope', unit='degrees')
aspect<-terrain(elev, opt='aspect',unit='degrees')
sloper<-terrain(elev, opt='slope', unit='radians')
aspectr<-terrain(elev, opt='aspect',unit='radians')
hillshade<-hillShade(sloper,aspectr,angle=5)
```