Query LAGOS GIS

query_gis(
  layer,
  id_name = NULL,
  ids = NULL,
  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

if (FALSE) { library(sf) st_layers(lagosnegis_path()) library(gdalUtils) ogrinfo(lagosnegis_path(), "HU12", so = TRUE) states <- query_gis("STATE") library(mapview) state <- query_gis("STATE", "State_Name", "Michigan") 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(state) + 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")) # query multiple feature ids res <- query_gis("IWS", "lagoslakeid", c(7010, 1)) }