% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/noise.R
\name{get_noise_map}
\alias{get_noise_map}
\title{Create a screening-level urban road-noise workflow object}
\usage{
get_noise_map(
  x = NULL,
  height_field = "Height",
  datasource_canopy_height = NULL,
  datasource_greenspace = NULL,
  greenspace_year = NULL,
  greenspace_zoom = 17,
  opentopo_key = NULL,
  roads = NULL,
  greenspace = NULL,
  canopy_height = NULL,
  dem = NULL,
  population = FALSE,
  population_field = NULL,
  population_year = 2025,
  min_tree_height = 2,
  receiver = c("grid", "none"),
  resolution = 10,
  out_dir = NULL,
  write = FALSE,
  run = FALSE,
  nm_path = NULL,
  nm_version = "5.0.1",
  download_nm = TRUE,
  osm_file = NULL,
  osm_remove_tunnels = TRUE,
  osm_eliminate_no_traffic_roads = TRUE,
  java = NULL,
  keep_files = FALSE,
  wall_alpha = 0.1,
  reflection_order = 0,
  max_src_distance = 150,
  max_reflection_distance = 50,
  thread_count = 0,
  diffraction_vertical = FALSE,
  diffraction_horizontal = FALSE,
  export_source_id = FALSE,
  humidity = NULL,
  temperature = NULL,
  favourable_occurrences = NULL,
  rays_name = NULL,
  max_error = NULL,
  frequency_field_prepend = "HZ",
  noise_wps_args = NULL,
  delaunay_max_area = NULL,
  road_width = 2,
  building_buffer = 2,
  iso_levels = c(35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 200),
  iso_field = "LAEQ",
  iso_smooth = 0.5,
  quiet = TRUE
)
}
\arguments{
\item{x}{\code{sf} polygon object with building footprints and a height field.}

\item{height_field}{Building height column name. Defaults to \code{"Height"}.}

\item{datasource_canopy_height}{Character or \code{NULL}. Canopy height source to
retrieve internally when \code{canopy_height} is not supplied. Currently supports
\code{"metachm"} and \code{"ethCHM"}.}

\item{datasource_greenspace}{character or \code{NULL}. Optional 2D greenspace map
tile source for the visible-green feature layer. Supports \code{"esri"} and
\code{"sentinel2"}. If both canopy height and greenspace sources are supplied,
the visible-green layer is the union of height-filtered canopy and 2D
greenspace.}

\item{greenspace_year}{numeric. The desired year for Sentinel-2 cloudless mosaic
tiles. (This has to be specified when \code{datasource_greenspace = "sentinel2"})}

\item{greenspace_zoom}{numeric. Zoom level of map tile when
\code{datasource_greenspace = "esri"} or \code{"sentinel2"}.}

\item{opentopo_key}{OpenTopography API key used to retrieve DEM data internally when
\code{dem} is not supplied.}

\item{roads}{Optional \code{sf} line object, usually from OSM. If \code{NULL}, OSM
roads are downloaded from the bounding box of \code{x}. If inferred traffic
columns are absent, \code{infer_osm_traffic()} is applied.}

\item{greenspace}{Optional \code{sf} polygons or \code{terra::SpatRaster} marking green
areas. Green areas are translated to ground absorption \code{G = 1}.}

\item{canopy_height}{Optional \code{terra::SpatRaster} canopy height map. Cells
greater than or equal to \code{min_tree_height} are treated as green ground.}

\item{dem}{Optional \code{terra::SpatRaster} terrain layer.}

\item{population}{Logical. If \code{TRUE}, assign GHSL population to buildings
with the package population helper (or \code{get_pop()} when available) before writing
NoiseModelling \code{BUILDINGS}. Existing \code{POP}
or \code{population_field} values are used when available.}

\item{population_field}{Optional column containing building population. The
value is copied to NoiseModelling's \code{POP} field.}

\item{population_year}{GHSL population year passed to the package population
function when
\code{population = TRUE} and no usable population field is already present.}

\item{min_tree_height}{Minimum canopy height treated as green cover.}

\item{receiver}{One of \code{"grid"} or \code{"none"}.}

\item{resolution}{Receiver grid resolution in map units.}

\item{out_dir}{Optional output directory for a GeoPackage.}

\item{write}{Logical. If \code{TRUE}, write layers to \code{noise_inputs.gpkg}.}

\item{run}{Logical. If \code{TRUE}, run NoiseModelling after preparing inputs.}

\item{nm_path}{Optional path to a \verb{NoiseModelling_without_gui-*} directory.
If \code{NULL}, the package uses \code{options(gloBFPr.noisemodelling.path)},
\code{NOISEMODELLING_HOME}, or a cached download.}

\item{nm_version}{NoiseModelling version to download when needed.}

\item{download_nm}{Logical. If \code{TRUE}, download the headless NoiseModelling
runner when \code{nm_path} is not available.}

\item{osm_file}{Optional path to a local \code{.osm}, \code{.osm.gz}, or \code{.osm.pbf}
extract. When supplied with \code{roads = NULL} and \code{run = TRUE}, NoiseModelling's
\code{Import_OSM.groovy} creates the \code{ROADS} table internally using its OSM road
defaults. This is different from the default R workflow, which downloads
roads from the building bounding box.}

\item{osm_remove_tunnels}{Logical passed to NoiseModelling \code{Import_OSM} when
\code{osm_file} is used. If \code{TRUE}, OSM roads tagged \code{tunnel=yes} are removed.}

\item{osm_eliminate_no_traffic_roads}{Logical passed to NoiseModelling
\code{Import_OSM} when \code{osm_file} is used. If \code{TRUE}, keeps only road classes that
NoiseModelling treats as traffic-bearing roads.}

\item{java}{Optional Java executable, Java home directory, or installed Java
major version such as \code{17}. If \code{NULL}, the function uses \code{JAVA_HOME} or
\code{java} on \code{PATH}. NoiseModelling 5.0.1 works with Java 11-21; Java 17 is
recommended.}

\item{keep_files}{Logical. If \code{TRUE}, keep the temporary NoiseModelling work
directory and include it in the result.}

\item{wall_alpha}{Wall absorption coefficient passed to NoiseModelling.}

\item{reflection_order}{Reflection order passed to NoiseModelling.}

\item{max_src_distance}{Maximum source-receiver distance in meters.}

\item{max_reflection_distance}{Maximum reflection distance in meters.}

\item{thread_count}{Number of NoiseModelling worker threads. \code{0} lets
NoiseModelling choose.}

\item{diffraction_vertical}{Logical. Passes \code{confDiffVertical}; enables
diffraction around vertical edges. NoiseModelling notes that CNOSSOS-EU uses
this mainly for rail and industrial sources.}

\item{diffraction_horizontal}{Logical. Passes \code{confDiffHorizontal}; enables
diffraction over horizontal building/terrain edges.}

\item{export_source_id}{Logical. Passes \code{confExportSourceId}; if \code{TRUE},
receiver levels are kept by source identifier instead of merged across all
sources. This is useful for source-contribution diagnostics and can greatly
enlarge the output.}

\item{humidity}{Relative humidity percentage for atmospheric absorption.
Passes \code{confHumidity}. Defaults to NoiseModelling's script default of \code{70}.}

\item{temperature}{Air temperature in degrees Celsius for atmospheric
absorption. Passes \code{confTemperature}. Defaults to NoiseModelling's script
default of \code{15}.}

\item{favourable_occurrences}{Probability of favourable propagation
conditions by 16 wind-direction sectors, clockwise, where the north sector is
the last value. Supply one value to recycle to all sectors or 16 values. The
NoiseModelling default is sixteen \code{0.5} values.}

\item{rays_name}{Optional table name or file URL passed as \code{confRaysName}.
When supplied, NoiseModelling exports propagation rays/attenuation details for
advanced diagnostics. This can create very large outputs.}

\item{max_error}{Maximum allowed error in dB for pruning negligible source
contributions. Passes \code{confMaxError}; NoiseModelling's default is \code{0.1}.}

\item{frequency_field_prepend}{Prefix for source spectral columns, passed as
\code{frequencyFieldPrepend}. Defaults to \code{"HZ"} for columns such as \code{HZ1000}.}

\item{noise_wps_args}{Optional named list of additional raw arguments passed
to \code{Noise_level_from_source.groovy}. Use this only for advanced
NoiseModelling options not yet exposed directly.}

\item{delaunay_max_area}{Maximum Delaunay triangle area in square map units.
Defaults to \code{resolution^2}. Smaller values create denser receiver/contour
meshes and slower runs.}

\item{road_width}{Receiver exclusion distance around roads in meters for the
NoiseModelling Delaunay grid.}

\item{building_buffer}{Receiver exclusion distance around buildings in meters
for the NoiseModelling Delaunay grid.}

\item{iso_levels}{Numeric vector of isosurface breakpoints in dB passed to
\code{Create_Isosurface.groovy}.}

\item{iso_field}{Result field used to build isosurfaces. Defaults to \code{"LAEQ"}.}

\item{iso_smooth}{Smoothing coefficient passed to \code{Create_Isosurface.groovy}.}

\item{quiet}{Logical. If \code{TRUE}, suppress informational messages.}
}
\value{
Prepared noise input layers when \code{run = FALSE}; otherwise a list with
prepared inputs, receiver-level results, output file paths, and logs.
}
\description{
Convenience wrapper around \code{prepare_noisemodelling_inputs()}. With
\code{run = FALSE}, it returns reproducible input layers. With \code{run = TRUE}, it
runs the official headless NoiseModelling WPS scripts and reads the
\code{RECEIVERS_LEVEL} output table back into R. The returned \code{noise_map} element
joins the calculated levels to receiver geometries for point mapping, and
\code{isophones} contains NoiseModelling's \code{CONTOURING_NOISE_MAP} polygons.
}
