query_gis_: Raw (non-vectorized) query of LAGOS GIS

Description Usage Arguments Examples

View source: R/query.R

Description

Raw (non-vectorized) query of LAGOS GIS

Usage

1
query_gis_(gis_path = lagosnegis_path(), query, crs = albers_conic())

Arguments

gis_path

file path

query

SQL string

crs

coordinate reference system string or epsg code

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
res <- query_gis_(query = "SELECT * FROM IWS WHERE lagoslakeid IN ('7010');")

# query nested hucs
hu4  <- query_gis("HU4", "ZoneID", c("HU4_5"))
hu8s <- query_gis_(query = "SELECT * FROM HU8 WHERE HUC8 LIKE '0415%';")

# query multiple nested hucs
hu4s  <- query_gis("HU4", "ZoneID", c("HU4_5", "HU4_6"))
hu8s  <- query_gis_(query = paste0("SELECT * FROM HU8 WHERE ",
            paste0("HUC8 LIKE '", hu4s$HUC4, "%'", collapse = " OR ")))

## End(Not run)

jsta/LAGOSNEgis documentation built on Dec. 7, 2018, 8:01 a.m.