Created
September 10, 2023 20:45
-
-
Save NewGraphEnvironment/4ae4ebb25f4e5f4451fb3e59fafd556e to your computer and use it in GitHub Desktop.
update background_layers.gpkg streams and crossings from shared db
This file contains 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
query <- "SELECT * | |
FROM bcfishpass.streams | |
WHERE watershed_group_code IN ('ADMS', 'MORK', 'UFRA', 'CANO', 'LNTH', 'UNTH', 'MURT', 'CLWR', 'CLRH', 'REVL')" | |
##import and grab the coordinates - this is already done | |
sf::st_read(conn, query = query) %>% st_write('background_layers.gpkg', delete_layer =TRUE, layer = 'streams') | |
query <- "SELECT * | |
FROM bcfishpass.crossings | |
WHERE watershed_group_code IN ('ADMS', 'MORK', 'UFRA', 'CANO', 'LNTH', 'UNTH', 'MURT', 'CLWR', 'CLRH', 'REVL')" | |
##import and grab the coordinates - this is already done | |
sf::st_read(conn, query = query) %>% st_write('background_layers.gpkg', delete_layer =TRUE, layer = 'crossings') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment