% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/noise.R
\name{infer_osm_traffic}
\alias{infer_osm_traffic}
\title{Infer screening-level road traffic inputs from OSM road attributes}
\usage{
infer_osm_traffic(
  roads,
  defaults = osm_noise_traffic_defaults(),
  use_maxspeed = FALSE,
  use_lanes = FALSE,
  use_oneway = FALSE,
  quiet = TRUE
)
}
\arguments{
\item{roads}{\code{sf} line object containing at least a \code{highway} column.}

\item{defaults}{Data frame of road-class assumptions. Defaults to
\code{osm_noise_traffic_defaults()}.}

\item{use_maxspeed}{Logical. If \code{TRUE}, parse numeric speeds from \code{maxspeed}
and use them when available. Defaults to \code{FALSE} to match NoiseModelling's
OSM import defaults.}

\item{use_lanes}{Logical. If \code{TRUE}, scale vehicle counts by lane count
relative to a two-lane road. Defaults to \code{FALSE} to match NoiseModelling's
OSM import defaults.}

\item{use_oneway}{Logical. If \code{TRUE}, halve traffic counts on OSM one-way
roads. Defaults to \code{FALSE}.}

\item{quiet}{Logical. If \code{TRUE}, suppress informational messages.}
}
\value{
An \code{sf} object with inferred traffic columns, including
\code{speed_kmh}, \code{light_veh_h}, \code{heavy_veh_h}, and NoiseModelling-style
\verb{LV_*}, \verb{MV_*}, \verb{HGV_*}, \verb{WAV_*}, \verb{WBV_*}, and speed columns for
day/evening/night.
}
\description{
Adds traffic volume and speed columns to an OSM road \code{sf} object based on the
\code{highway} class and optional \code{maxspeed}, \code{lanes}, or \code{oneway} values. These
values are intended for relative/scenario noise mapping when measured traffic
counts are unavailable, not calibrated regulatory noise maps.
}
