library(tidyverse)
library(mapview)
library(sf)
library(tmap)
library(RColorBrewer)
library(giscourse)
load("DEM.rda")
mapviewOptions(basemaps =c("Esri.WorldImagery",
"OpenStreetMap",
"Esri.WorldStreetMap"), homebutton = FALSE)
pal<- brewer.pal(12,"Paired")
con<-sconnect11()
st_as_sf(data.frame(b="birds",geom=st_convex_hull(st_union(birds$geom)))) ->b1
st_write(b1, con)
query<-"select s.sssi_name,s.geom from sssi s, b1 b where st_intersects(geometry, geom) "
sssis<-st_read(con,query=query)
birds %>% st_join(sssis) ->birds
mapview(sssis, legend=FALSE) +mapview(birds) ->map
map@map %>% addFullscreenControl()