def copy_dams_to_inputs(proj_path, dams, in_network): """ If the given dams are not in the inputs, :param proj_path: The path to the project root :param dams: The path to the given dams :param in_network: the input Conservation Restoration Network :return: Filepath to dams in inputs folder """ if proj_path in dams: # The dams input is already in our project folder, so we don't need to copy it over return inputs_folder = find_folder(proj_path, "Inputs") beaver_dams_folder = find_folder(inputs_folder, "*[0-9]*_BeaverDams") if beaver_dams_folder is None: beaver_dams_folder = make_folder( inputs_folder, find_available_num_prefix(inputs_folder) + "_BeaverDams") new_dam_folder = make_folder( beaver_dams_folder, "Beaver_Dam_" + find_available_num_suffix(beaver_dams_folder)) new_dam_path = os.path.join(new_dam_folder, os.path.basename(dams)) coord_sys = arcpy.Describe(in_network).spatialReference arcpy.Project_management(dams, new_dam_path, coord_sys) return new_dam_path
def make_topo_layers(topo_folder): """ Writes the layers :param topo_folder: We want to make layers for the stuff in this folder :return: """ source_code_folder = os.path.dirname(os.path.abspath(__file__)) symbology_folder = os.path.join(source_code_folder, 'BRATSymbology') dem_symbology = os.path.join(symbology_folder, "DEM.lyr") slope_symbology = os.path.join(symbology_folder, "Slope.lyr") for folder in os.listdir(topo_folder): dem_folder_path = os.path.join(topo_folder, folder) for file_name in os.listdir(dem_folder_path): if file_name.endswith(".tif"): dem_file = os.path.join(dem_folder_path, file_name) if not os.path.exists(os.path.join(dem_folder_path, "DEM.lyr")) and os.path.exists(dem_file): make_layer(dem_folder_path, dem_file, "DEM", dem_symbology, is_raster=True) hillshade_folder = find_folder(dem_folder_path, "Hillshade") hillshade_file = os.path.join(hillshade_folder, "Hillshade.tif") if not os.path.exists(os.path.join(hillshade_folder, "Hillshade.lyr")) and os.path.exists(hillshade_file): make_layer(hillshade_folder, hillshade_file, "Hillshade", is_raster=True) slope_folder = find_folder(dem_folder_path, "Slope") slope_file = os.path.join(slope_folder, "Slope.tif") if not os.path.exists(os.path.join(slope_folder, "Slope.lyr")) and os.path.exists(slope_file): make_layer(slope_folder, slope_file, "Slope", slope_symbology, is_raster=True)
def copy_points_to_inputs(proj_path, conflict_points, in_network): """ If the given points are not in the inputs, :param proj_path: The path to the project root :param conflict_points: The path to known points of beaver dam-human conflict :param in_network: the input Conservation Restoration Network :return: Filepath to points in inputs folder """ if proj_path in conflict_points: # The points input is already in our project folder, so we don't need to copy it over return inputs_folder = find_folder(proj_path, "Inputs") conflict_pts_folder = find_folder(inputs_folder, "*[0-9]*_ConflictPoints") if conflict_pts_folder is None: conflict_pts_folder = make_folder( inputs_folder, find_available_num_prefix(inputs_folder) + "_ConflictPoints") new_pts_folder = make_folder( conflict_pts_folder, "Conflict_Points_" + find_available_num_suffix(conflict_pts_folder)) new_conflict_path = os.path.join(new_pts_folder, os.path.basename(conflict_points)) coord_sys = arcpy.Describe(in_network).spatialReference arcpy.Project_management(conflict_points, new_conflict_path, coord_sys) return new_conflict_path
def check_intermediate_layer(intermediates_folder, symbology_folder, symbology_layer_name, brat_table_file, folder_name, layer_name, field_for_layer, layer_file_name=None): """ :param intermediates_folder: The :param symbology_folder: :param symbology_layer_name: :param brat_table_file: :param folder_name: :param layer_name: :param field_for_layer: :param layer_file_name: :return: """ fields = [f.name for f in arcpy.ListFields(brat_table_file)] if field_for_layer not in fields: # we don't want to create the layer if the field isn't in the BRAT table file return if layer_file_name == None: layer_file_name = layer_name.replace(" ", "") layer_symbology = os.path.join(symbology_folder, symbology_layer_name) layer_folder = find_folder(intermediates_folder, folder_name) if layer_folder == None: layer_folder = make_folder(intermediates_folder, find_available_num(intermediates_folder) + "_" + folder_name) layer_path = os.path.join(layer_folder, layer_file_name) if not layer_path.endswith(".lyr"): layer_path += '.lyr' if not os.path.exists(layer_path): make_layer(layer_folder, brat_table_file, layer_name, layer_symbology, file_name=layer_file_name)
def check_analyses(analyses_folder, symbology_folder): """ Checks for all the intermediate layers :param analyses_folder: Where our analyses are kept :param symbology_folder: Where we pull symbology from :return: """ capacity_folder = find_folder(analyses_folder, "Capacity") historic_capacity_folder = find_folder(capacity_folder, "HistoricCapacity") existing_capacity_folder = find_folder(capacity_folder, "ExistingCapacity") management_folder = find_folder(analyses_folder, "Management") check_analyses_layer(analyses_folder, existing_capacity_folder, "Existing Dam Building Capacity", symbology_folder, "Existing_Capacity.lyr", "oCC_EX") check_analyses_layer(analyses_folder, historic_capacity_folder, "Historic Dam Building Capacity", symbology_folder, "Historic_Capacity.lyr", "oCC_PT") check_analyses_layer(analyses_folder, existing_capacity_folder, "Existing Dam Complex Size", symbology_folder, "Existing_Capacity_Count.lyr", "mCC_EX_Ct") check_analyses_layer(analyses_folder, historic_capacity_folder, "Historic Dam Complex Size", symbology_folder, "Historic_Capacity_Count.lyr", "mCC_PT_Ct") check_analyses_layer(analyses_folder, management_folder, "Beaver Management Zones", symbology_folder, "BeaverManagementZones.lyr", "oPBRC") check_analyses_layer(analyses_folder, management_folder, "Unsuitable or Limited Opportunities", symbology_folder, "Dam_Building_Not_Likely.lyr", "oPBRC") check_analyses_layer(analyses_folder, management_folder, "Restoration or Conservation Opportunities", symbology_folder, "Restoration_Conservation_Opportunities.lyr", "oPBRC")
def get_intermediates_layers(empty_group_layer, intermediates_folder, df, mxd): """ Returns a group layer with all of the intermediates :param empty_group_layer: The base to build the group layer with :param intermediates_folder: Path to the intermediates folder :param df: The dataframe we're working with :param mxd: The map document we're working with :return: Layer for intermediates """ intermediate_layers = [] # findAndGroupLayers(intermediate_layers, intermediatesFolder, "HumanBeaverConflict", "Human Beaver Conflict", emptyGroupLayer, df, mxd) anthropogenic_metrics_folder = find_folder(intermediates_folder, "AnthropogenicMetrics") if anthropogenic_metrics_folder: sorted_conflict_layers = [] wanted_conflict_layers = [] existing_conflict_layers = find_layers_in_folder(anthropogenic_metrics_folder) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoCanal.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoRailroad.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoRailroadinValleyBottom.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoRoad.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoRoadCrossing.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoRoadinValleyBottom.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "DistancetoClosestInfrastructure.lyr")) wanted_conflict_layers.append(os.path.join(anthropogenic_metrics_folder, "LandUseIntensity.lyr")) for layer in wanted_conflict_layers: if layer in existing_conflict_layers: sorted_conflict_layers.append(layer) intermediate_layers.append(group_layers(empty_group_layer, "Human Beaver Conflict", sorted_conflict_layers, df, mxd)) find_and_group_layers(intermediate_layers, intermediates_folder, "VegDamCapacity", "Overall Vegetation Dam Capacity", empty_group_layer, df, mxd) find_and_group_layers(intermediate_layers, intermediates_folder, "Buffers", "Buffers", empty_group_layer, df, mxd) find_and_group_layers(intermediate_layers, intermediates_folder, "Hydrology", "Hydrology", empty_group_layer, df, mxd) find_and_group_layers(intermediate_layers, intermediates_folder, "AnabranchHandler", "Anabranch Handler", empty_group_layer, df, mxd) find_and_group_layers(intermediate_layers, intermediates_folder, "TopographicMetrics", "Topographic Index", empty_group_layer, df, mxd) # veg_folder_name = "VegDamCapacity" # veg_group_layer_name = "Overall Vegetation Dam Capacity" # veg_folder_path = findFolder(intermediatesFolder, veg_folder_name) # if veg_folder_path: # veg_layers = findLayersInFolder(veg_folder_path) # if len(veg_layers) == 2: # desc = arcpy.Describe(veg_layers[0]) # if "Existing" in desc.nameString: # veg_layers = [veg_layers[1], veg_layers[0]] # # intermediate_layers.append(groupLayers(emptyGroupLayer, veg_group_layer_name, veg_layers, df, mxd)) return group_layers(empty_group_layer, "Intermediates", intermediate_layers, df, mxd)
def get_analyses_layer(analyses_folder, empty_group_layer, df, mxd): """ Returns the layers we want for the 'Output' section :param analyses_folder: :return: """ capacity_folder = find_folder(analyses_folder, "Capacity") existing_capacity_folder = find_folder(capacity_folder, "ExistingCapacity") historic_capacity_folder = find_folder(capacity_folder, "HistoricCapacity") management_folder = find_folder(analyses_folder, "Management") existing_capacity_layers = find_layers_in_folder(existing_capacity_folder) existing_capacity_layer = group_layers(empty_group_layer, "Existing Capacity", existing_capacity_layers, df, mxd) historic_capacity_layers = find_layers_in_folder(historic_capacity_folder) historic_capacity_layer = group_layers(empty_group_layer, "Historic Capacity", historic_capacity_layers, df, mxd) management_layers = find_layers_in_folder(management_folder) management_layer = group_layers(empty_group_layer, "Management", management_layers, df, mxd) capacity_layer = group_layers(empty_group_layer, "Capacity", [historic_capacity_layer, existing_capacity_layer], df, mxd) output_layer = group_layers(empty_group_layer, "Beaver Restoration Assessment Tool - BRAT", [management_layer, capacity_layer], df, mxd) return output_layer
def find_and_group_layers(layers_list, folder_base, folder_name, group_layer_name, empty_group_layer, df, mxd): """ Looks for the folder that matches what we're looking for, then groups them together. Adds that grouped layer to the list of grouped layers that it was given :param layers_list: The list of layers that we will add our grouped layer to :param folder_base: Path to the folder that contains the folder we want :param folder_name: The name of the folder to look in :param group_layer_name: What we want to name the group layer :param empty_group_layer: The base to build the group layer with :param df: The dataframe we're working with :param mxd: The map document we're working with :return: """ folderPath = find_folder(folder_base, folder_name) if folderPath: layers = find_layers_in_folder(folderPath) layers_list.append(group_layers(empty_group_layer, group_layer_name, layers, df, mxd))
def check_buffer_layers(intermediates_folder, symbology_folder): """ Finds the buffer folder, and checks that it has the :param intermediates_folder: :param symbology_folder: :return: """ buffer_folder = find_folder(intermediates_folder, "Buffers") buffer_100m = os.path.join(buffer_folder, "buffer_100m.shp") buffer_100m_layer = os.path.join(buffer_folder, "100mBuffer.lyr") buffer_100m_symbology = os.path.join(symbology_folder, "buffer_100m.lyr") check_layer(buffer_100m_layer, buffer_100m, buffer_100m_symbology, is_raster= False, layer_name ='100 m Buffer') buffer_30m = os.path.join(buffer_folder, "buffer_30m.shp") buffer_30m_layer = os.path.join(buffer_folder, "30mBuffer.lyr") buffer_30m_symbology = os.path.join(symbology_folder, "buffer_30m.lyr") check_layer(buffer_30m_layer, buffer_30m, buffer_30m_symbology, is_raster= False, layer_name ='30 m Buffer')
def main(output_folder, layer_package_name, clipping_network=None): """ Generates a layer package from a BRAT project :param output_folder: What output folder we want to use for our layer package :param layer_package_name: What we want to name our layer package :param clipping_network: What we want to clip our network to :return: """ if layer_package_name == None: layer_package_name = "LayerPackage" projectFolder = os.path.dirname(output_folder) inputsFolder = find_folder(projectFolder, "Inputs") intermediatesFolder = os.path.join(output_folder, "01_Intermediates") analysesFolder = os.path.join(output_folder, "02_Analyses") tribCodeFolder = os.path.dirname(os.path.abspath(__file__)) symbologyFolder = os.path.join(tribCodeFolder, 'BRATSymbology') check_for_layers(intermediatesFolder, analysesFolder, inputsFolder, symbologyFolder) make_layer_package(output_folder, intermediatesFolder, analysesFolder, inputsFolder, symbologyFolder, layer_package_name, clipping_network)
def make_kmz_old(shapefile, type): analyses_folder = os.path.dirname(shapefile) capacity_folder = find_folder(analyses_folder, "Capacity") existing_capacity_folder = find_folder(capacity_folder, "ExistingCapacity") historic_capacity_folder = find_folder(capacity_folder, "HistoricCapacity") management_folder = find_folder(analyses_folder, "Management") validation_folder = find_folder(analyses_folder, "Validation") if type == 'risk': layer = os.path.join(management_folder, 'RiskofUndesirableDams.lyr') if not os.path.exists(layer): print 'Risk layer not found; attempting to re-create...' make_layer( management_folder, shapefile, "Risk of Undesirable Dams", symbology_layer=os.path.join( symbology_folder, "Areas_Beavers_Can_Build_Dams_but_could_be_Undesirable.lyr" )) elif type == 'limits': layer = os.path.join(management_folder, 'UnsuitableorLimitedOpportunities.lyr') if not os.path.exists(layer): print 'Unsuitable layer not found; attempting to re-create...' make_layer( management_folder, shapefile, "Unsuitable or Limited Opportunities", symbology_layer=os.path.join( symbology_folder, "Unsuitable_Limited_Dam_Building_Opportunities.lyr")) elif type == 'management': layer = os.path.join(management_folder, 'RestorationorConservationOpportunities.lyr') if not os.path.exists(layer): print 'Conservation layer not found; attempting to re-create...' make_layer( management_folder, shapefile, "Restoration or Conservation Opportunities", symbology_layer=os.path.join( symbology_folder, "Possible_Beaver_Dam_Conservation_Restoration_Opportunities.lyr" )) elif type == 'existing_capacity': layer = os.path.join(existing_capacity_folder, 'ExistingDamBuildingCapacity.lyr') if not os.path.exists(layer): print 'Existing capacity layer not found; attempting to re-create...' make_layer(existing_capacity_folder, shapefile, "Existing Dam Building Capacity", symbology_layer=os.path.join(symbology_folder, "Existing_Capacity.lyr")) elif type == 'existing_complex': layer = os.path.join(existing_capacity_folder, 'ExistingDamComplexSize.lyr') if not os.path.exists(layer): print 'Existing complex layer not found; attempting to re-create...' make_layer(existing_capacity_folder, shapefile, "Existing Dam Complex Size", symbology_layer=os.path.join( symbology_folder, "Existing_Capacity_Count.lyr")) elif type == 'historic_capacity': layer = os.path.join(historic_capacity_folder, 'HistoricDamBuildingCapacity.lyr') if not os.path.exists(layer): print 'Historic capacity layer not found; attempting to re-create...' make_layer(historic_capacity_folder, shapefile, "Historic Dam Building Capacity", symbology_layer=os.path.join(symbology_folder, "Historic_Capacity.lyr")) elif type == 'historic_complex': layer = os.path.join(historic_capacity_folder, 'HistoricDamComplexSize.lyr') if not os.path.exists(layer): print 'Existing capacity layer not found; attempting to re-create...' make_layer(historic_capacity_folder, shapefile, "Historic Dam Complex Size", symbology_layer=os.path.join( symbology_folder, "Historic_Capacity_Count.lyr"))
def get_inputs_layer(empty_group_layer, inputs_folder, df, mxd): """ Gets all the input layers, groups them properly, returns the layer :param empty_group_layer: The base to build the group layer with :param inputs_folder: Path to the inputs folder :param df: The dataframe we're working with :param mxd: The map document we're working with :return: layer for inputs """ vegetation_folder = find_folder(inputs_folder, "_Vegetation") ex_veg_folder = find_folder(vegetation_folder, "_ExistingVegetation") hist_veg_folder = find_folder(vegetation_folder, "_HistoricVegetation") network_folder = find_folder(inputs_folder, "_Network") topo_folder = find_folder(inputs_folder, "_Topography") conflict_folder = find_folder(inputs_folder, "Anthropogenic") valley_folder = find_folder(conflict_folder, "ValleyBottom") roads_folder = find_folder(conflict_folder, "Roads") railroads_folder = find_folder(conflict_folder, "Railroads") canals_folder = find_folder(conflict_folder, "Canals") land_use_folder = find_folder(conflict_folder, "LandUse") ex_veg_layers = find_instance_layers(ex_veg_folder) ex_veg_layer = group_layers(empty_group_layer, "Existing Vegetation Dam Capacity", ex_veg_layers, df, mxd) hist_veg_layers = find_instance_layers(hist_veg_folder) hist_veg_layer = group_layers(empty_group_layer, "Historic Vegetation Dam Capacity", hist_veg_layers, df, mxd) veg_layer = group_layers(empty_group_layer, "Vegetation", [hist_veg_layer, ex_veg_layer], df, mxd) network_layers = find_instance_layers(network_folder) network_layer = group_layers(empty_group_layer, "Network", network_layers, df, mxd) dem_layers = find_instance_layers(topo_folder) hillshade_layers = find_dem_derivative(topo_folder, "Hillshade") slope_layers = find_dem_derivative(topo_folder, "Slope") flow_layers = find_dem_derivative(topo_folder, "Flow") topo_layer = group_layers(empty_group_layer, "Topography", hillshade_layers + dem_layers + slope_layers + flow_layers, df, mxd) valley_layers = find_instance_layers(valley_folder) valley_layer = group_layers(empty_group_layer, "Valley Bottom", valley_layers, df, mxd) road_layers = find_instance_layers(roads_folder) road_layer = group_layers(empty_group_layer, "Roads", road_layers, df, mxd) railroad_layers = find_instance_layers(railroads_folder) railroad_layer = group_layers(empty_group_layer, "Railroads", railroad_layers, df, mxd) canal_layers = find_instance_layers(canals_folder) canal_layer = group_layers(empty_group_layer, "Canals", canal_layers, df, mxd) land_use_layers = find_instance_layers(land_use_folder) land_use_layer = group_layers(empty_group_layer, "Land Use", land_use_layers, df, mxd) conflict_layer = group_layers(empty_group_layer, "Conflict Layers", [valley_layer, road_layer, railroad_layer, canal_layer, land_use_layer], df, mxd) return group_layers(empty_group_layer, "Inputs", [topo_layer, veg_layer, network_layer, conflict_layer], df, mxd)
def check_inputs(inputs_folder, symbology_folder): """ Checks for all the intermediate layers :param inputs_folder: Where our inputs are kept :param symbology_folder: Where we pull symbology from :return: """ vegetation_folder = find_folder(inputs_folder, "Vegetation") network_folder = find_folder(inputs_folder, "Network") topo_folder = find_folder(inputs_folder, "Topography") anthropogenic_folder = find_folder(inputs_folder, "Anthropogenic") ex_veg_folder = find_folder(vegetation_folder, "ExistingVegetation") hist_veg_folder = find_folder(vegetation_folder, "HistoricVegetation") valley_bottom_folder = find_folder(anthropogenic_folder, "ValleyBottom") road_folder = find_folder(anthropogenic_folder, "Roads") railroad_folder = find_folder(anthropogenic_folder, "Railroads") canals_folder = find_folder(anthropogenic_folder, "Canals") land_use_folder = find_folder(anthropogenic_folder, "LandUse") land_ownership_folder = find_folder(anthropogenic_folder, "LandOwnership") ex_veg_suitability_symbology = os.path.join(symbology_folder, "Existing_Veg_Suitability.lyr") ex_veg_riparian_symbology = os.path.join(symbology_folder, "Existing_Veg_Riparian.lyr") ex_veg_evt_type_symbology = os.path.join(symbology_folder, "Existing_Veg_EVT_Type.lyr") ex_veg_evt_class_symbology = os.path.join(symbology_folder, "Existing_Veg_EVT_Class.lyr") ex_veg_class_name_symbology = os.path.join(symbology_folder, "Existing_Veg_ClassName.lyr") hist_veg_group_symbology = os.path.join(symbology_folder, "Historic_Veg_BPS_Type.lyr") hist_veg_BPS_name_symbology = os.path.join(symbology_folder, "Historic_Veg_BPS_Name.lyr") hist_veg_suitability_symbology = os.path.join(symbology_folder, "Historic_Veg_Suitability.lyr") hist_veg_riparian_symbology = os.path.join(symbology_folder, "Historic_Veg_Riparian.lyr") network_symbology = os.path.join(symbology_folder, "Network.lyr") landuse_symbology = os.path.join(symbology_folder, "Land_Use_Raster.lyr") land_ownership_symbology = os.path.join(symbology_folder, "SurfaceManagementAgency.lyr") canals_symbology = os.path.join(symbology_folder, "Canals.lyr") roads_symbology = os.path.join(symbology_folder, "Roads.lyr") railroads_symbology = os.path.join(symbology_folder, "Railroads.lyr") valley_bottom_symbology = os.path.join(symbology_folder, "ValleyBottom.lyr") valley_bottom_outline_symbology = os.path.join(symbology_folder, "ValleyBottom_Outline.lyr") flow_direction_symbology = os.path.join(symbology_folder, "Network_FlowDirection.lyr") ex_veg_destinations = find_destinations(ex_veg_folder) make_input_layers(ex_veg_destinations, "Existing Vegetation Suitability for Beaver Dam Building", symbology_layer=ex_veg_suitability_symbology, is_raster=True, file_name="ExVegSuitability") make_input_layers(ex_veg_destinations, "Existing Riparian", symbology_layer=ex_veg_riparian_symbology, is_raster=True) make_input_layers(ex_veg_destinations, "Veg Type - EVT Type", symbology_layer=ex_veg_evt_type_symbology, is_raster=True) make_input_layers(ex_veg_destinations, "Veg Type - EVT Class", symbology_layer=ex_veg_evt_class_symbology, is_raster=True) make_input_layers(ex_veg_destinations, "Veg Type - ClassName", symbology_layer=ex_veg_class_name_symbology, is_raster=True) hist_veg_destinations = find_destinations(hist_veg_folder) make_input_layers(hist_veg_destinations, "Historic Vegetation Suitability for Beaver Dam Building", symbology_layer=hist_veg_suitability_symbology, is_raster=True) make_input_layers(hist_veg_destinations, "Veg Type - BPS Type", symbology_layer=hist_veg_group_symbology, is_raster=True, check_field="GROUPVEG") make_input_layers(hist_veg_destinations, "Veg Type - BPS Name", symbology_layer=hist_veg_BPS_name_symbology, is_raster=True) make_input_layers(hist_veg_destinations, "Historic Riparian", symbology_layer=hist_veg_riparian_symbology, is_raster=True, check_field="GROUPVEG") network_destinations = find_destinations(network_folder) make_input_layers(network_destinations, "Network", symbology_layer=network_symbology, is_raster=False) make_input_layers(network_destinations, "Flow Direction", symbology_layer=flow_direction_symbology, is_raster=False) make_topo_layers(topo_folder) # add landuse raster to the project if land_use_folder is not None: landuse_destinations = find_destinations(land_use_folder) make_input_layers(landuse_destinations, "Land Use Raster", symbology_layer=landuse_symbology, is_raster=True) # add the conflict inputs to the project if valley_bottom_folder is not None: vally_bottom_destinations = find_destinations(valley_bottom_folder) make_input_layers(vally_bottom_destinations, "Valley Bottom Fill", symbology_layer=valley_bottom_symbology, is_raster=False) make_input_layers(vally_bottom_destinations, "Valley Bottom Outline", symbology_layer=valley_bottom_outline_symbology, is_raster=False) # add road layers to the project if road_folder is not None: road_destinations = find_destinations(road_folder) make_input_layers(road_destinations, "Roads", symbology_layer=roads_symbology, is_raster=False) # add railroad layers to the project if railroad_folder is not None: rr_destinations = find_destinations(railroad_folder) make_input_layers(rr_destinations, "Railroads", symbology_layer=railroads_symbology, is_raster=False) # add canal layers to the project if canals_folder is not None: canal_destinations = find_destinations(canals_folder) make_input_layers(canal_destinations, "Canals", symbology_layer=canals_symbology, is_raster=False) # add land ownership layers to the project if land_ownership_folder is not None: ownership_destinations = find_destinations(land_ownership_folder) make_input_layers(ownership_destinations, "Land Ownership", symbology_layer=land_ownership_symbology, is_raster=False)