query_gis: Query LAGOS GIS

Description Usage Arguments Examples

Description

Query LAGOS GIS

Usage

1
2
query_gis(layer, id_name, ids, crs = albers_conic(),
  gis_path = lagosnegis_path())

Arguments

layer

character layer name

id_name

selection column

ids

feature ids to select

crs

character projection info defaults to lagosnegis_path()

gis_path

character path to LAGOSNE GIS gpkg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

library(sf)
st_layers(lagosnegis_path())

library(gdalUtils)
ogrinfo(lagosnegis_path(), "HU12", so = TRUE)

library(mapview)
res_iws  <- query_gis("IWS", "lagoslakeid", c(34352))
res_lake <- query_gis("LAGOS_NE_All_Lakes_4ha", "lagoslakeid", 34352)
res_pnt  <- query_gis("LAGOS_NE_All_Lakes_4ha_POINTS", "lagoslakeid", 34352)
mapview(res_iws) + mapview(res_lake) + mapview(res_pnt)

res <- query_gis("IWS", "lagoslakeid", c(7010))
res <- query_gis("HU12", "ZoneID", c("HU12_1"))
res <- query_gis("HU8", "ZoneID", c("HU8_100"))
res <- query_gis("HU4", "ZoneID", c("HU4_5"))

## End(Not run)

jsta/LAGOSNEgis documentation built on Dec. 14, 2018, 3:04 p.m.