This function provides a handy way of filtering a cppRosm data set for specific secondary tags. It will return a data set to which will be added new columns based on the specific secondary keys and values that are looked for.
Arguments
- data
a cppRosm data set, with an
attrs
column.- keys
either a vector of valid key parameters, or a named list where names correspond to keys and attributes are vectors of matching values.
- cores
number of cores to parallelise the computation
Examples
test_file <- system.file(package = 'cppRosm','extdata','map.osm')
data <- cppRosm::extract_data(test_file)
#> → Using main keys `amenity`,`shop`,`tourism`.
keys <- list("cuisine"=c("pizza","japanese")
,"takeaway"=c("yes"))
data_filtered <- cppRosm::filter_sec(data,keys)
#> ℹ Searching for exact key~value matches.