From 1226df6b760b65e8e44d751e80b37029f5d5d486 Mon Sep 17 00:00:00 2001 From: James Douglass Date: Thu, 29 Jun 2023 14:51:14 -0700 Subject: [PATCH] Adding accessible urban nature for pop groups. RE:#1344 --- src/natcap/invest/urban_nature_access.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/natcap/invest/urban_nature_access.py b/src/natcap/invest/urban_nature_access.py index 1205954f7..10fd61ac7 100644 --- a/src/natcap/invest/urban_nature_access.py +++ b/src/natcap/invest/urban_nature_access.py @@ -1167,6 +1167,23 @@ def execute(args): decayed_population_in_group_tasks = [] for pop_group in split_population_fields: search_radius_m = search_radii_by_pop_group[pop_group] + + accessible_urban_nature_path = os.path.join( + intermediate_dir, + f'accessible_urban_nature_to_{pop_group}{suffix}.tif') + _ = graph.add_task( + _convolve_and_set_lower_bound, + kwargs={ + "signal_path_band": (urban_nature_pixels_path, 1), + "kernel_path_band": (kernel_paths[search_radius_m], 1), + "target_path": accessible_urban_nature_path, + "working_dir": intermediate_dir, + }, + task_name='Accessible urban nature', + target_path_list=[accessible_urban_nature_path], + dependent_task_list=[urban_nature_reclassification_task] + ) + decayed_population_in_group_path = os.path.join( intermediate_dir, f'distance_weighted_population_in_{pop_group}{suffix}.tif')