This function takes heterogeneous input and calculates the layerid required for creating the REST API requests for geometry.

huc_code(x)

Arguments

x

One or more: labels, codes, or code lengths to convert to layerid

Value

integer

Examples


huc_code(c("subregion", "watershed",
           "071000050101", "10-digit",
           8, 12, 16))
#> [1] 2 5 6 5 4 6 8