get_roads_layer {wdnr.gis}R Documentation

Retrieve WDNR's roads spatial layer

Description

A function to retrieve WDNR's roads spatial layers. "layer_type" can be set to "major_roads" or "minor_roads" to query the Major Roads or County and Local Roads respectively. A spatial query can be performed to limit the output of the function by supplying a county name, watershed code, watershed name, or custom sf polygon object. Use the 'watershed_lookup' to find valid watershed codes and names. The "where" argument can be used to run custom SQL queries.

Usage

get_roads_layer(
  county = NULL,
  watershed_code = NULL,
  watershed_name = NULL,
  sf_object = NULL,
  where = NULL,
  layer_type = "all",
  ...
)

Arguments

county

A character object specifying a county name

watershed_code

A character object specifying the HUC code for a watershed

watershed_name

A character object specifying the HUC name for a watershed

sf_object

Any sf polygon object

where

SQL statement

layer_type

"major_roads" or "minor_roads"

...

Additional parameters to pass to get_spatial_layer

Value

A sf object of class polylines

Examples

## Not run: 
get_roads_layer(county = "washington", layer_type = "major_roads")
get_roads_layer(watershed_code = "07070006", layer_type = "minor_roads")
get_roads_layer(where ="HWY_NUM = '43'",layer_type = "major_roads")

## End(Not run)

[Package wdnr.gis version 0.1.5 Index]