1- create a PostgreSQL + Postgris local DB 2- download the osm (brf format) and import in the DB example: planet_7.63_49.178_3c305aff.osm.pbf 3- generate a temporary noise table 'noise_tmp' containing the noise_factors SELECT losmid, lhighway, sum(noise_factor) sum_noise_factor into table noise_tmp from ( SELECT l.osm_id losmid, l.highway lhighway, case when p.highway in ('motorway', 'motorway_link','trunk','trunk_link') then sum(st_area(st_intersection(ST_Buffer(l.way, 30), ST_Buffer(p.way, 50))) / st_area(ST_Buffer(l.way, 30))) when p.highway in ('primary','primary_link') then sum(st_area(st_intersection(ST_Buffer(l.way, 30), ST_Buffer(p.way, 50))) / (2 * st_area(ST_Buffer(l.way, 30)))) when p.highway in ('secondary') then sum(st_area(st_intersection(ST_Buffer(l.way, 30), ST_Buffer(p.way, 50))) / (6 * st_area(ST_Buffer(l.way, 30)))) end as noise_factor FROM planet_osm_line AS l INNER JOIN planet_osm_line AS p ON ST_Intersects(l.way, ST_Buffer(p.way,50)) WHERE (l.highway is not null or l.route='ferry’) and p.highway in ('motorway’, 'motorway_link','trunk','trunk_link','primary','primary_link','secondary') GROUP BY losmid, lhighway, p.highway order by noise_factor desc) as abcd GROUP BY losmid, lhighway order by sum_noise_factor desc; 4- generate a file with the osm_id + noise class (as admin \o my_noise.log) SELECT 'osm_id', losmid, ' noise_factor', case when y.sum_noise_factor < 0.1 then null when y.sum_noise_factor < 0.3 then '1' when y.sum_noise_factor < 0.6 then '2' when y.sum_noise_factor < 1 then '3' when y.sum_noise_factor < 1.5 then '4' when y.sum_noise_factor < 4 then '5' else '6' end as noise_factor, ' ende' from noise_tmp y where sum_noise_factor > 0.1; 5- convert the osm map from pbf to osm format osmconvert64.exe planet_7.63_49.178_3c305aff.osm.pbf > planet_7.63_49.178_3c305aff.osm 6- enrich the osm with new tags (example ) ==> use the perl script "add_noise_tag.sh" (input are my_noise.log and planet_7.63_49.178_3c305aff.osm, output is 'modif.osm') 7- generate the rd5 files standard mapcreation using 'modif.osm' as input AND the new lookups.dat (do not forget srtm data and estimated_traffic_class by need) ( "process_modif.sh" ) remark: By adding the "estimated_noise_class" tag the size of the rd5 files increases by nearly 2% 8- extend the lookups.dat add in "---context:way " estimated_noise_class;0000000001 1 estimated_noise_class;0000000001 2 estimated_noise_class;0000000001 3 estimated_noise_class;0000000001 4 estimated_noise_class;0000000001 5 estimated_noise_class;0000000001 6 9- extension in the brouter scripts (brf) 9-a add a new variable: ... assign consider_noise = true # %consider_noise% | set to true to consider costs for noise | boolean ... 9-b add a penalty for noise example: ... assign noise_penalty switch consider_noise switch estimated_noise_class= 0 switch estimated_noise_class=1 0.3 switch estimated_noise_class=2 0.5 switch estimated_noise_class=3 0.7 switch estimated_noise_class=4 1 switch estimated_noise_class=5 1.2 switch estimated_noise_class=6 1.5 0 0 ... assign costfactor add noise_penalty ... start tests....example (fastbike-verylowtraffic.brf) /#map=12/49.8197/9.1224/osm-mapnik-german_style&lonlats=9.077396,49.867285;9.172485,49.783066 (consider to manually change the options "consider_noise" and "consider_elevation" in the profile to examine the impacts) performance ============= germany map (4 GB as pbf, 73 GB as osm) ==> create/calculate "noise" data with Postgreesql ==> 20 minutes ==> add noise tags in osm ==> 15 minutes