name
& ref
field
for an OSM feature, or whichever is available.R/oi_road_names.R
oi_road_names.Rd
Function to recategorise OSM data, combining both the name
& ref
field
for an OSM feature, or whichever is available.
oi_road_names(osm_sf, remove=FALSE)
A Simple Features sf
and data.frame
object containing
OpenStreetMap infrastructure data.
If TRUE, will remove all features that still have a NA for openinfra_road_name column (removes nameless features).
an sf object with openinfra_road_name column added, indicating the name and ref fields of the feature, if they are included.
This function analyses OSM features, specifically the name
and
ref
fields that contain a road name (i.e. Otley Road) and the road
reference field (i.e A62). If both the name
and ref
appear, then
openinfra_road_name
will be name | ref
, otherwise openinfra_road_name
will be whichever field appears within the OSM data.
Note: the osm_sf
must contain the following tags: c("name", "ref")