file_manager package
Subpackages
- file_manager.n10 package
- file_manager.n100 package
- Submodules
- file_manager.n100.file_manager_buildings module
Building_N100Building_N100.overview__runtime_all_building_functions__n100Building_N100.total_workfile_manager_files__n100Building_N100.data_selection___begrensningskurve_n100_input_data___n100_buildingBuilding_N100.data_selection___land_cover_n100_input_data___n100_buildingBuilding_N100.data_selection___land_cover_n50_input_data___n100_buildingBuilding_N100.data_selection___road_n100_input_data___n100_buildingBuilding_N100.data_selection___building_point_n50_input_data___n100_buildingBuilding_N100.data_selection___building_polygon_n50_input_data___n100_buildingBuilding_N100.data_selection___tourist_hut_n50_input_data___n100_buildingBuilding_N100.data_selection___railroad_stations_n100_input_data___n100_buildingBuilding_N100.data_selection___railroad_tracks_n100_input_data___n100_buildingBuilding_N100.data_selection___matrikkel_input_data___n100_buildingBuilding_N100.data_selection___displacement_feature___n100_buildingBuilding_N100.data_selection___anleggslinje___n100_buildingBuilding_N100.data_preparation___power_grid_lines___n100_buildingBuilding_N100.data_selection___power_grid_lines_500m_selection___n100_buildingBuilding_N100.data_preparation___geometry_validation___n100_buildingBuilding_N100.data_preparation___begrensingskurve_docu___building_n100Building_N100.data_preparation___begrensningskurve_base___n100_buildingBuilding_N100.data_preparation___processed_begrensningskurve___n100_buildingBuilding_N100.begrensningskurve_documentation_n100_buildingBuilding_N100.buffer_displacement_documentation_n100_buildingBuilding_N100.data_preparation___begrensningskurve_buffer_erase_2___n100_buildingBuilding_N100.data_preparation___unsplit_roads___n100_buildingBuilding_N100.data_preparation___road_symbology_buffers___n100_buildingBuilding_N100.data_preparation___root_file_line_symbology___n100_buildingBuilding_N100.data_preparation___urban_area_selection_n100___n100_buildingBuilding_N100.data_preparation___urban_area_selection_n50___n100_buildingBuilding_N100.data_preparation___urban_area_selection_n100_buffer___n100_buildingBuilding_N100.data_preparation___no_longer_urban_areas___n100_buildingBuilding_N100.data_preparation___matrikkel_points___n100_buildingBuilding_N100.data_preparation___n50_points___n100_buildingBuilding_N100.data_preparation___polygons_that_are_large_enough___n100_buildingBuilding_N100.data_preparation___polygons_that_are_too_small___n100_buildingBuilding_N100.data_preparation___points_created_from_small_polygons___n100_buildingBuilding_N100.data_preparation___merged_building_points___n100_buildingBuilding_N100.data_preparation___n50_points_in_urban_areas___n100_buildingBuilding_N100.data_preparation___churches_and_hospitals_in_urban_areas___n100_buildingBuilding_N100.data_preparation___railway_stations_to_polygons___n100_buildingBuilding_N100.data_preparation___railway_stations_to_polygons_symbology___n100_building_lyrxBuilding_N100.data_preparation___railway_station_points_from_n100___n100_buildingBuilding_N100.begrensingskurve_land_water___root_file___n100_buildingBuilding_N100.begrensingskurve_land_water___begrensingskurve_buffer_in_water___n100_buildingBuilding_N100.calculate_point_values___points_going_into_propagate_displacement___n100_buildingBuilding_N100.calculate_point_values___selection_building_points_with_undefined_nbr_values___n100_buildingBuilding_N100.calculate_point_values___building_points_with_undefined_nbr_values___n100_buildingBuilding_N100.calculate_polygon_values___final___n100_buildingBuilding_N100.polygon_to_point___merged_points_final___n100_buildingBuilding_N100.line_to_buffer_symbology___test___n100_buildingBuilding_N100.line_to_buffer_symbology___root_file___n100_buildingBuilding_N100.line_to_buffer_symbology___buffer_displaced_building_points___n100_buildingBuilding_N100.line_to_buffer_symbology___root_buffer_displaced___n100_buildingBuilding_N100.simplify_polygons___aggregated_polygons_to_points___n100_buildingBuilding_N100.simplify_polygons___not_intersect_aggregated_and_original_polygon___n100_buildingBuilding_N100.simplify_polygons___small_gaps___n100_buildingBuilding_N100.simplify_polygons___simplify_building_1___n100_buildingBuilding_N100.simplify_polygons___simplify_building_2___n100_buildingBuilding_N100.simplify_polygons___simplify_polygon___n100_buildingBuilding_N100.simplify_polygons___spatial_join_polygons___n100_buildingBuilding_N100.polygon_propogate_displacement___pre_displacement___n100_buildingBuilding_N100.polygon_propogate_displacement___building_polygons_after_displacement___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___begrensningskurve_500m_from_displaced_polygon___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___roads_500m_from_displaced_polygon___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___railroads_500m_from_displaced_polygon___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___root_file___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___partition_root_file___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___begrensingskurve_docu___building_n100Building_N100.polygon_resolve_building_conflicts___building_polygon___n100_building_lyrxBuilding_N100.polygon_resolve_building_conflicts___roads___n100_building_lyrxBuilding_N100.polygon_resolve_building_conflicts___begrensningskurve___n100_building_lyrxBuilding_N100.polygon_resolve_building_conflicts___after_rbc___n100_buildingBuilding_N100.rbc_polygon_documentation_n100_buildingBuilding_N100.polygon_resolve_building_conflicts___hospital_church_points___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___hospital_church_squares___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___polygonprocessor_symbology___n100_building_lyrxBuilding_N100.polygon_resolve_building_conflicts___invisible_polygons_after_rbc___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___not_invisible_polygons_after_rbc___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___invisible_polygons_to_points___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___building_polygons_final___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___building_polygons_not_invisible_not_intersecting___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___building_polygons_intersecting_road___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___intersecting_polygons_to_points___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___final_merged_points___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___small_building_polygons___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___small_building_polygons_to_point___n100_buildingBuilding_N100.polygon_resolve_building_conflicts___railway___n100_building_lyrxBuilding_N100.polygon_resolve_building_conflicts___power_grid_lines___n100_building_lyrxBuilding_N100.hospital_church_clusters___hospital_points___n100_buildingBuilding_N100.hospital_church_clusters___church_points___n100_buildingBuilding_N100.hospital_church_clusters___all_hospital_clusters___n100_buildingBuilding_N100.hospital_church_clusters___all_church_clusters___n100_buildingBuilding_N100.hospital_church_clusters___hospital_points_not_in_cluster___n100_buildingBuilding_N100.hospital_church_clusters___hospital_points_in_cluster___n100_buildingBuilding_N100.hospital_church_clusters___church_points_not_in_cluster___n100_buildingBuilding_N100.hospital_church_clusters___church_points_in_cluster___n100_buildingBuilding_N100.hospital_church_clusters___minimum_bounding_geometry_hospital___n100_hospitalBuilding_N100.hospital_church_clusters___feature_to_point_hospital___n100_buildingBuilding_N100.hospital_church_clusters___minimum_bounding_geometry_church___n100_buildingBuilding_N100.hospital_church_clusters___feature_to_point_church___n100_buildingBuilding_N100.hospital_church_clusters___chosen_hospitals_from_cluster___n100_buildingBuilding_N100.hospital_church_clusters___chosen_churches_from_cluster___n100_buildingBuilding_N100.hospital_church_clusters___reduced_hospital_and_church_points_merged___n100_buildingBuilding_N100.hospital_church_clusters___selecting_hospital_points_after_cluster_reduction___n100_buildingBuilding_N100.hospital_church_clusters___selecting_church_points_after_cluster_reduction___n100_buildingBuilding_N100.hospital_church_clusters___church_points_NOT_too_close_to_hospitals___n100_buildingBuilding_N100.hospital_church_clusters___final___n100_buildingBuilding_N100.hospital_church_clusters___all_other_points_that_are_not_hospital_church___n100_buildingBuilding_N100.point_propagate_displacement___points_after_propagate_displacement___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___water_features___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___tourist_cabins___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___not_tourist_cabins___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___merged_points_and_tourist_cabins___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___points_that_do_not_intersect_water_features___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___building_polygons_too_close_to_water_features___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___building_polygons_NOT_too_close_to_water_features___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___erased_polygons___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___correct_sized_polygons___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___too_small_polygons___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___polygons_to_points___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___points_polygons_to_points_merged___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___water_features_buffered___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___water_features_close_to_building_polygons___n100_buildingBuilding_N100.removing_points_and_erasing_polygons_in_water_features___final_building_polygons_merged___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___graphic_conflicts_polygon___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_close_to_graphic_conflict_polygons___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___point_clusters___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___all_building_points___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___hospital_church_tourist_points___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___merged_points_collapsed_polygon___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_no_road_conflict___n100_building_lyrxBuilding_N100.removing_overlapping_polygons_and_points___points_no_road_conflict_to_squares___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___squares_close_to_graphic_conflict_polygons___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___squares_not_close_to_graphic_conflict_polygons___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_in_a_cluster___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_not_in_a_cluster___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___merging_final_points___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_in_a_cluster_original___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_NOT_close_to_graphic_conflict_polygons___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_to_squares___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_no_road_conflict___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___all_points_not_hospital_and_church__n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___squares_back_to_points___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___hospital_and_church_points__n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___points_to_squares_church_hospitals___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___building_polygons_not_intersecting_church_hospitals___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___road_symbology_no_buffer_addition___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___root_file_line_symbology___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___polygons_intersecting_road_buffers___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___polygons_NOT_intersecting_road_buffers___n100_buildingBuilding_N100.removing_overlapping_polygons_and_points___polygons_to_points___n100_buildingBuilding_N100.point_displacement_with_buffer___church_hospital_selection___n100_buildingBuilding_N100.point_displacement_with_buffer___building_points_selection___n100_buildingBuilding_N100.point_displacement_with_buffer___root_file___n100_buildingBuilding_N100.point_displacement_with_buffer___partition_root_file___n100_buildingBuilding_N100.point_displacement_with_buffer___displaced_building_points___n100_buildingBuilding_N100.point_displacement_with_buffer___documentation___building_n100Building_N100.point_displacement_with_buffer___merged_buffer_displaced_points___n100_buildingBuilding_N100.point_displacement_with_buffer__iteration_points_to_square_polygons__n100Building_N100.point_displacement_with_buffer___squares_not_overlapping_roads___n100_buildingBuilding_N100.iteration__partition_iterator__n100Building_N100.iteration__partition_iterator_final_output_points__n100Building_N100.iteration___json_documentation___building_n100Building_N100.point_resolve_building_conflicts___building_points_squares___n100_buildingBuilding_N100.point_resolve_building_conflicts___geometry_validation___n100_buildingBuilding_N100.point_resolve_building_conflicts___lyrx_root___n100_buildingBuilding_N100.point_resolve_building_conflicts___root_path___n100_buildingBuilding_N100.point_resolve_building_conflicts___partition_root_path___n100_buildingBuilding_N100.point_resolve_building_conflicts___root_file___n100_buildingBuilding_N100.point_resolve_building_conflicts___documentation___building_n100Building_N100.point_resolve_building_conflicts___POINT_OUTPUT___n100_buildingBuilding_N100.point_resolve_building_conflicts___POLYGON_OUTPUT___n100_buildingBuilding_N100.rbc_point_documentation_n100_buildingBuilding_N100.finalizing_buildings___tourist_cabins___n100_buildingBuilding_N100.finalizing_buildings___points_not_close_to_urban_areas___n100_buildingBuilding_N100.finalizing_buildings___all_points_except_tourist_cabins___n100_buildingBuilding_N100.finalizing_buildings___urban_areas___n100_buildingBuilding_N100.finalizing_buildings___selecting_hospital_and_churches_in_urban_areas___n100_buildingBuilding_N100.finalizing_buildings___all_points_not_in_urban_areas___n100_buildingBuilding_N100.finalizing_buildings___polygon_to_line___n100_buildingBuilding_N100.finalizing_buildings___polygon_to_line_joined_fields___n100_buildingBuilding_N100.finalizing_buildings___hospitals_and_churches_pictogram___n100_buildingBuilding_N100.finalizing_buildings___points_too_close_to_urban_areas___n100_buildingBuilding_N100.data_cleanup___geometry_validation___n100_buildingBuilding_N100.TuristHytteBuilding_N100.BygningsPunktBuilding_N100.GrunnrissBuilding_N100.OmrissLinjeBuilding_N100.PiktogramBuilding_N100.point_resolve_building_conflicts___new_workfile_managger___n100_building
- file_manager.n100.file_manager_land_use module
- file_manager.n100.file_manager_rivers module
River_N100River_N100.selecting_water_polygons__centerline__n100River_N100.selecting_water_polygons__geometry_gaps__n100River_N100.unconnected_river_geometry__river_area_selection__n100River_N100.unconnected_river_geometry__unsplit_river_features__n100River_N100.unconnected_river_geometry__water_area_features__n100River_N100.unconnected_river_geometry__water_area_features_selected__n100River_N100.unconnected_river_geometry__river_dangles__n100River_N100.unconnected_river_selected_river_dangles__n100River_N100.unconnected_river_geometry__river_end_points__n100River_N100.unconnected_river_geometry__river_dangles_buffer__n100River_N100.unconnected_river_geometry__problematic_river_lines__n100River_N100.unconnected_river_geometry__problematic_river_dangles__n100River_N100.extending_river_geometry__input_rivers_copy__n100River_N100.extending_river_geometry__exluded_objects__n100River_N100.extending_river_geometry__near_table__n100River_N100.extending_river_geometry__new_lines__n100River_N100.extending_river_geometry__unsplit_new_lines__n100River_N100.extending_river_geometry__merged_lines__n100River_N100.extending_river_geometry__unsplit_merged_lines__n100River_N100.river_centerline__rivers_near_waterfeatures__n100River_N100.river_centerline__rivers_near_waterfeatures_erased__n100River_N100.short__water_feature__n100River_N100.short__water_feature_centroid__n100River_N100.river_centerline__water_feature_centerline__n100River_N100.river_centerline__water_feature_collapsed__n100River_N100.river_centerline__study_lake__n100River_N100.river_centerline__study_rivers__n100River_N100.river_centerline__study_centerline__n100River_N100.river_centerline__study_lake_collapsed__n100River_N100.river_centerline__study_dangles__n100River_N100.centerline_pruning__pruned_centerline__n100River_N100.thin_hydrology_lines__visible_streams__n100River_N100.centerline_pruning_loop__lake_features__n100River_N100.centerline_pruning_loop__rivers_erased_with_lake_features__n100River_N100.centerline_pruning_loop__study_area__n100River_N100.centerline_pruning_loop__water_features_study_area__n100River_N100.centerline_pruning_loop__water_features_dissolved__n100River_N100.centerline_pruning_loop__water_features_dissolved_river_intersect__n100River_N100.centerline_pruning_loop__water_features_river_final_selection__n100River_N100.centerline_pruning_loop__water_features_processed__n100River_N100.centerline_pruning_loop__polygon_to_line__n100River_N100.centerline_pruning_loop__water_features_shared_boundaries__n100River_N100.centerline_pruning_loop__shared_boundaries_midpoint__n100River_N100.centerline_pruning_loop__river_inlets__n100River_N100.centerline_pruning_loop__river_inlets_erased__n100River_N100.centerline_pruning_loop__river_inlets_points_merged__n100River_N100.short_name__water__n100River_N100.centerline_pruning_loop__collapsed_hydropolygon__n100River_N100.centerline_pruning_loop__collapsed_hydropolygon_points__n100River_N100.centerline_pruning_loop__collapsed_hydropolygon_points_selected__n100River_N100.centerline_pruning_loop__closed_centerline_lines__n100River_N100.centerline_pruning_loop__closed_centerline_point__n100River_N100.centerline_pruning_loop__intersection_points_merged__n100River_N100.centerline_pruning_loop__centerline_start_end_vertex__n100River_N100.centerline_pruning_loop__centerline_intersection_vertex__n100River_N100.centerline_pruning_loop__river_inlet_dangles__n100River_N100.centerline_pruning_loop__water_feature_summarized__n100River_N100.centerline_pruning_loop__simple_water_features__n100River_N100.centerline_pruning_loop__complex_water_features__n100River_N100.centerline_pruning_loop__simple_centerlines__n100River_N100.centerline_pruning_loop__complex_centerlines__n100River_N100.centerline_pruning_loop__finnished_centerlines__n100
- file_manager.n100.file_manager_roads module
ramps_fileRoad_N100Road_N100.data_selection___nvdb_roads___n100_roadRoad_N100.data_selection___vegsperring___n100_roadRoad_N100.data_selection___railroad___n100_roadRoad_N100.data_selection___admin_boundary___n100_roadRoad_N100.data_selection___begrensningskurve___n100_roadRoad_N100.data_selection___new_road_symbology___n100_road_lyrxRoad_N100.data_preparation___geometry_validation___n100_roadRoad_N100.data_preparation___water_feature_outline___n100_roadRoad_N100.data_preparation___road_single_part___n100_roadRoad_N100.data_preparation___road_single_part_2___n100_roadRoad_N100.data_preparation___car_raod___n100_roadRoad_N100.data_preparation___road_dangle___n100_roadRoad_N100.data_preparation___boarder_road_dangle___n100_roadRoad_N100.data_preparation___boarder_road___n100_roadRoad_N100.data_preparation___on_surface_selection___n100_roadRoad_N100.data_preparation___bridge_selection___n100_roadRoad_N100.data_preparation___tunnel_selection___n100_roadRoad_N100.data_preparation___dissolved_road_feature___n100_roadRoad_N100.data_preparation___intersections_root___n100_roadRoad_N100.data_preparation___dissolved_road_feature_2___n100_roadRoad_N100.data_preparation___dissolved_intersections___n100_roadRoad_N100.data_preparation___country_boarder___n100_roadRoad_N100.data_preparation___country_boarder_buffer___n100_roadRoad_N100.data_preparation___roads_near_boarder___n100_roadRoad_N100.data_preparation___removed_roads_near_boarder___n100_roadRoad_N100.data_preparation___intersections_root_2___n100_roadRoad_N100.data_preparation___intersections_root_3___n100_roadRoad_N100.data_preparation___intersections_root_4___n100_roadRoad_N100.data_preparation___intersections_root_5___n100_roadRoad_N100.data_preparation___dissolved_intersections_2___n100_roadRoad_N100.data_preparation___dissolved_intersections_3___n100_roadRoad_N100.data_preparation___root_calculate_boarder_hierarchy___n100_roadRoad_N100.data_preparation___calculated_boarder_hierarchy___n100_roadRoad_N100.data_preparation___dissolved_intersections_4___n100_roadRoad_N100.data_preparation___dissolved_intersections_5___n100_roadRoad_N100.data_preparation___merge_divided_roads___n100_roadRoad_N100.data_preparation___merge_divided_roads_displacement_feature___n100_roadRoad_N100.data_preparation___divided_roads_merged_outputs___n100_roadRoad_N100.data_preparation___remove_small_road_lines___n100_roadRoad_N100.data_preparation___collapse_road_detail___n100_roadRoad_N100.data_preparation___road_bridge_and_tunnel_selection___n100_roadRoad_N100.data_preparation___road_on_surface_selection___n100_roadRoad_N100.data_preparation___on_surface_feature_to_line___n100_roadRoad_N100.data_preparation___simplified_road___n100_roadRoad_N100.data_preparation___thin_road_sti_root___n100_roadRoad_N100.data_preparation___thin_sti_partition_root___n100_roadRoad_N100.thin_sti_docu___n100_roadRoad_N100.data_preparation___thin_road_sti_output___n100_roadRoad_N100.data_preparation___thin_road_root___n100_roadRoad_N100.data_preparation___thin_road_root_2___n100_roadRoad_N100.data_preparation___thin_road_root_3___n100_roadRoad_N100.data_preparation___thin_road_partition_root___n100_roadRoad_N100.data_preparation___collapse_root___n100_roadRoad_N100.data_preparation___thin_road_partition_root_2___n100_roadRoad_N100.data_preparation___thin_road_partition_root_3___n100_roadRoad_N100.thin_road_docu___n100_roadRoad_N100.collapse_road_docu___n100_roadRoad_N100.data_preparation___thin_road_docu_2___n100_roadRoad_N100.data_preparation___thin_road_docu_3___n100_roadRoad_N100.data_preparation___thin_road_output___n100_roadRoad_N100.data_preparation___thin_road_output_2___n100_roadRoad_N100.data_preparation___thin_road_output_3___n100_roadRoad_N100.data_preparation___final_merged_thin_iteration_output___n100_roadRoad_N100.data_preparation___smooth_road___n100_roadRoad_N100.data_preparation___road_single_part_3___n100_roadRoad_N100.data_preparation___calculated_boarder_hierarchy_2___n100_roadRoad_N100.data_preparation___root_calculate_boarder_hierarchy_2___n100_roadRoad_N100.data_preparation___railroad_single_part___n100_roadRoad_N100.data_preparation__water_feature_outline_dissolved__n100_roadRoad_N100.data_preparation__water_feature_outline_split_xm__n100_roadRoad_N100.data_preparation___water_feature_outline_single_part___n100_roadRoad_N100.data_preparation___resolve_road_conflicts___n100_roadRoad_N100.data_preparation___road_final_output___n100_roadRoad_N100.data_preparation___resolve_road_partition_root___n100_roadRoad_N100.resolve_road_docu___n100_roadRoad_N100.data_preparation___resolve_road_root___n100_roadRoad_N100.data_preparation___resolve_road_conflicts_displacement_feature___n100_roadRoad_N100.data_preperation___paths_n50___n100_roadRoad_N100.data_preperation___selecting_vegtrase_and_kjorebane_nvdb___n100_roadRoad_N100.data_preperation___selecting_everything_but_rampe_nvdb___n100_roadRoad_N100.data_preperation___selecting_everything_but_rampe_with_calculated_fields_nvdb___n100_roadRoad_N100.road_triangles_outputRoad_N100.road_triangles___roads_copy___n100_roadRoad_N100.road_triangles___graph_root___n100_roadRoad_N100.road_triangles___remove_triangles_root___n100_roadRoad_N100.road_triangles___removed_triangles___n100_roadRoad_N100.roundabout__roundabout__n100_roadRoad_N100.roundabout__centroids__n100_roadRoad_N100.roundabout__cleaned_road__n100_roadRoad_N100.dam__relevant_roads__n100_roadRoad_N100.dam__relevant_dam__n100_roadRoad_N100.dam__relevant_water__n100_roadRoad_N100.dam__dam_buffer_35m__n100_roadRoad_N100.dam__roads_inside_with_data__n100_roadRoad_N100.dam__roads_outside__n100_roadRoad_N100.dam__water_clipped__n100_roadRoad_N100.dam__water_center__n100_roadRoad_N100.dam__buffer_water__n100_roadRoad_N100.dam__water_singleparts__n100_roadRoad_N100.dam__dam_buffer_sti__n100_roadRoad_N100.dam__roads_clipped_sti__n100_roadRoad_N100.dam__roads_moved__n100_roadRoad_N100.dam__roads_shifted__n100_roadRoad_N100.dam__dam_buffer_150m__n100_roadRoad_N100.dam__dam_buffer_60m_flat__n100_roadRoad_N100.dam__dam_buffer_5m_flat__n100_roadRoad_N100.dam__dam_buffer_60m__n100_roadRoad_N100.dam__water_buffer_55m__n100_roadRoad_N100.dam__dam_buffer_60m_line__n100_roadRoad_N100.dam__roads_intermediate__n100_roadRoad_N100.dam__paths_in_dam__n100_roadRoad_N100.dam__paths_in_dam_valid__n100_roadRoad_N100.dam__cleaned_roads__n100_roadRoad_N100.major_road_crossing__road_u__n100_roadRoad_N100.major_road_crossing__road_u_buffer__n100_roadRoad_N100.major_road_crossing__road_u_buffer_shrunked__n100_roadRoad_N100.major_road_crossing__road_l__n100_roadRoad_N100.major_road_crossing__road_l_buffer__n100_roadRoad_N100.major_road_crossing__road_l_buffer_shrunked__n100_roadRoad_N100.major_road_crossing__ER__n100_roadRoad_N100.major_road_crossing__ER_bridge__n100_roadRoad_N100.major_road_crossing__ER_bridge_buffer__n100_roadRoad_N100.major_road_crossing__ER_bridge_shrunked__n100_roadRoad_N100.major_road_crossing__road_t__n100_roadRoad_N100.major_road_crossing__ER_t__n100_roadRoad_N100.major_road_crossing__bridge_cross_ER__n100_roadRoad_N100.major_road_crossing__underpass_cross_ER__n100_roadRoad_N100.major_road_crossing__surface_under_ER__n100_roadRoad_N100.major_road_crossing__keep_bru_ERFKP__n100_roadRoad_N100.major_road_crossing__keep_underpass_ERFKP__n100_roadRoad_N100.major_road_crossing__keep_surface_ERFKP__n100_roadRoad_N100.major_road_crossing__merged_keep__n100_roadRoad_N100.major_road_crossing__output__n100_roadRoad_N100.vegsperring__veg_uten_bom__n100_roadRoad_N100.ramps__ramps__n100_roadRoad_N100.ramps__collapsed_roundabouts__n100_roadRoad_N100.ramps__small_roundabouts__n100_roadRoad_N100.ramps__roads_with_cleaned_roundabouts__n100_roadRoad_N100.ramps__buffered_ramps__n100_roadRoad_N100.ramps__buffered_ramps_100__n100_roadRoad_N100.ramps__roads_near_ramp__n100_roadRoad_N100.ramps__endpoints__n100_roadRoad_N100.ramps__dissolved_ramps__n100_roadRoad_N100.ramps__intermediate_ramps__n100_roadRoad_N100.ramps__merged_ramps__n100_roadRoad_N100.ramps__closest_points__n100_roadRoad_N100.ramps__generalized_ramps__n100_roadRoad_N100.ramps__dissolved_group__n100_roadRoad_N100.ramps__splitted_group__n100_roadRoad_N100.ramps__ramp_points__n100_roadRoad_N100.ramps__ramp_points_moved__n100_roadRoad_N100.ramps__ramp_points_moved_2__n100_roadRoad_N100.ramps__test__n100_roadRoad_N100.road_cleaning__n100_roadRoad_N100.road_cleaning_output__n100_road
- Module contents
- file_manager.n250 package
- Submodules
- file_manager.n250.file_manager_roads module
ramps_fileRoad_N250Road_N250.data_selection___nvdb_roads___n250_roadRoad_N250.data_selection___vegsperring___n250_roadRoad_N250.data_selection___railroad___n250_roadRoad_N250.data_selection___admin_boundary___n250_roadRoad_N250.data_selection___begrensningskurve___n250_roadRoad_N250.data_selection___new_road_symbology___n250_road_lyrxRoad_N250.data_preparation___geometry_validation___n250_roadRoad_N250.data_preparation___water_feature_outline___n250_roadRoad_N250.data_preparation___road_single_part___n250_roadRoad_N250.data_preparation___road_single_part_2___n250_roadRoad_N250.data_preparation___car_raod___n250_roadRoad_N250.data_preparation___road_dangle___n250_roadRoad_N250.data_preparation___boarder_road_dangle___n250_roadRoad_N250.data_preparation___boarder_road___n250_roadRoad_N250.data_preparation___on_surface_selection___n250_roadRoad_N250.data_preparation___bridge_selection___n250_roadRoad_N250.data_preparation___tunnel_selection___n250_roadRoad_N250.data_preparation___dissolved_road_feature___n250_roadRoad_N250.data_preparation___intersections_root___n250_roadRoad_N250.data_preparation___dissolved_road_feature_2___n250_roadRoad_N250.data_preparation___dissolved_intersections___n250_roadRoad_N250.data_preparation___country_boarder___n250_roadRoad_N250.data_preparation___country_boarder_buffer___n250_roadRoad_N250.data_preparation___roads_near_boarder___n250_roadRoad_N250.data_preparation___removed_roads_near_boarder___n250_roadRoad_N250.data_preparation___intersections_root_2___n250_roadRoad_N250.data_preparation___intersections_root_3___n250_roadRoad_N250.data_preparation___intersections_root_4___n250_roadRoad_N250.data_preparation___intersections_root_5___n250_roadRoad_N250.data_preparation___dissolved_intersections_2___n250_roadRoad_N250.data_preparation___dissolved_intersections_3___n250_roadRoad_N250.data_preparation___root_calculate_boarder_hierarchy___n250_roadRoad_N250.data_preparation___calculated_boarder_hierarchy___n250_roadRoad_N250.data_preparation___dissolved_intersections_4___n250_roadRoad_N250.data_preparation___dissolved_intersections_5___n250_roadRoad_N250.data_preparation___merge_divided_roads___n250_roadRoad_N250.data_preparation___merge_divided_roads_displacement_feature___n250_roadRoad_N250.data_preparation___divided_roads_merged_outputs___n250_roadRoad_N250.data_preparation___remove_small_road_lines___n250_roadRoad_N250.data_preparation___collapse_road_detail___n250_roadRoad_N250.data_preparation___road_bridge_and_tunnel_selection___n250_roadRoad_N250.data_preparation___road_on_surface_selection___n250_roadRoad_N250.data_preparation___on_surface_feature_to_line___n250_roadRoad_N250.data_preparation___simplified_road___n250_roadRoad_N250.data_preparation___thin_road_sti_root___n250_roadRoad_N250.data_preparation___thin_sti_partition_root___n250_roadRoad_N250.thin_sti_docu___n250_roadRoad_N250.data_preparation___thin_road_sti_output___n250_roadRoad_N250.data_preparation___thin_road_root___n250_roadRoad_N250.data_preparation___thin_road_root_2___n250_roadRoad_N250.data_preparation___thin_road_root_3___n250_roadRoad_N250.data_preparation___thin_road_partition_root___n250_roadRoad_N250.data_preparation___thin_road_partition_root_2___n250_roadRoad_N250.data_preparation___thin_road_partition_root_3___n250_roadRoad_N250.thin_road_docu___n250_roadRoad_N250.collapse_road_docu___n250_roadRoad_N250.data_preparation___thin_road_docu_2___n250_roadRoad_N250.data_preparation___thin_road_docu_3___n250_roadRoad_N250.data_preparation___thin_road_output___n250_roadRoad_N250.data_preparation___thin_road_output_2___n250_roadRoad_N250.data_preparation___thin_road_output_3___n250_roadRoad_N250.data_preparation___final_merged_thin_iteration_output___n250_roadRoad_N250.data_preparation___smooth_road___n250_roadRoad_N250.data_preparation___road_single_part_3___n250_roadRoad_N250.data_preparation___calculated_boarder_hierarchy_2___n250_roadRoad_N250.data_preparation___root_calculate_boarder_hierarchy_2___n250_roadRoad_N250.data_preparation___railroad_single_part___n250_roadRoad_N250.data_preparation___water_feature_outline_single_part___n250_roadRoad_N250.data_preparation___resolve_road_conflicts___n250_roadRoad_N250.data_preparation___road_final_output___n250_roadRoad_N250.data_preparation___resolve_road_partition_root___n250_roadRoad_N250.resolve_road_docu___n250_roadRoad_N250.data_preparation___resolve_road_root___n250_roadRoad_N250.data_preparation___resolve_road_conflicts_displacement_feature___n250_roadRoad_N250.data_preperation___paths_n50___n250_roadRoad_N250.data_preperation___selecting_vegtrase_and_kjorebane_nvdb___n250_roadRoad_N250.data_preperation___selecting_everything_but_rampe_nvdb___n250_roadRoad_N250.data_preperation___selecting_everything_but_rampe_with_calculated_fields_nvdb___n250_roadRoad_N250.road_triangles_outputRoad_N250.road_triangles___roads_copy___n250_roadRoad_N250.road_triangles___graph_root___n250_roadRoad_N250.road_triangles___remove_triangles_root___n250_roadRoad_N250.road_triangles___removed_triangles___n250_roadRoad_N250.roundabout__roundabout__n250_roadRoad_N250.roundabout__centroids__n250_roadRoad_N250.roundabout__cleaned_road__n250_roadRoad_N250.dam__relevant_roads__n250_roadRoad_N250.dam__relevant_dam__n250_roadRoad_N250.dam__relevant_water__n250_roadRoad_N250.dam__dam_buffer_35m__n250_roadRoad_N250.dam__roads_inside_with_data__n250_roadRoad_N250.dam__roads_outside__n250_roadRoad_N250.dam__water_clipped__n250_roadRoad_N250.dam__water_center__n250_roadRoad_N250.dam__buffer_water__n250_roadRoad_N250.dam__water_singleparts__n250_roadRoad_N250.dam__dam_buffer_sti__n250_roadRoad_N250.dam__roads_clipped_sti__n250_roadRoad_N250.dam__roads_moved__n250_roadRoad_N250.dam__roads_shifted__n250_roadRoad_N250.dam__dam_buffer_150m__n250_roadRoad_N250.dam__dam_buffer_60m_flat__n250_roadRoad_N250.dam__dam_buffer_5m_flat__n250_roadRoad_N250.dam__dam_buffer_60m__n250_roadRoad_N250.dam__water_buffer_55m__n250_roadRoad_N250.dam__dam_buffer_60m_line__n250_roadRoad_N250.dam__roads_intermediate__n250_roadRoad_N250.dam__paths_in_dam__n250_roadRoad_N250.dam__paths_in_dam_valid__n250_roadRoad_N250.dam__cleaned_roads__n250_roadRoad_N250.major_road_crossing__road_u__n250_roadRoad_N250.major_road_crossing__road_u_buffer__n250_roadRoad_N250.major_road_crossing__road_u_buffer_shrunked__n250_roadRoad_N250.major_road_crossing__road_l__n250_roadRoad_N250.major_road_crossing__road_l_buffer__n250_roadRoad_N250.major_road_crossing__road_l_buffer_shrunked__n250_roadRoad_N250.major_road_crossing__ER__n250_roadRoad_N250.major_road_crossing__ER_bridge__n250_roadRoad_N250.major_road_crossing__ER_bridge_buffer__n250_roadRoad_N250.major_road_crossing__ER_bridge_shrunked__n250_roadRoad_N250.major_road_crossing__road_t__n250_roadRoad_N250.major_road_crossing__ER_t__n250_roadRoad_N250.major_road_crossing__bridge_cross_ER__n250_roadRoad_N250.major_road_crossing__underpass_cross_ER__n250_roadRoad_N250.major_road_crossing__surface_under_ER__n250_roadRoad_N250.major_road_crossing__keep_bru_ERFKP__n250_roadRoad_N250.major_road_crossing__keep_underpass_ERFKP__n250_roadRoad_N250.major_road_crossing__keep_surface_ERFKP__n250_roadRoad_N250.major_road_crossing__merged_keep__n250_roadRoad_N250.major_road_crossing__output__n250_roadRoad_N250.vegsperring__veg_uten_bom__n250_roadRoad_N250.ramps__ramps__n250_roadRoad_N250.ramps__collapsed_roundabouts__n250_roadRoad_N250.ramps__small_roundabouts__n250_roadRoad_N250.ramps__roads_with_cleaned_roundabouts__n250_roadRoad_N250.ramps__buffered_ramps__n250_roadRoad_N250.ramps__buffered_ramps_100__n250_roadRoad_N250.ramps__roads_near_ramp__n250_roadRoad_N250.ramps__endpoints__n250_roadRoad_N250.ramps__dissolved_ramps__n250_roadRoad_N250.ramps__intermediate_ramps__n250_roadRoad_N250.ramps__merged_ramps__n250_roadRoad_N250.ramps__closest_points__n250_roadRoad_N250.ramps__generalized_ramps__n250_roadRoad_N250.ramps__dissolved_group__n250_roadRoad_N250.ramps__splitted_group__n250_roadRoad_N250.ramps__ramp_points__n250_roadRoad_N250.ramps__ramp_points_moved__n250_roadRoad_N250.ramps__ramp_points_moved_2__n250_roadRoad_N250.ramps__test__n250_road
- Module contents
Submodules
file_manager.base_file_manager module
- class file_manager.base_file_manager.BaseFileManager(scale: str, object_name: str, script_source_name: str = '', description: str = '')[source]
Bases:
objectThe core file manager class handles the creation of absolute paths across our project, imported in different file managers.
- Functions:
- generate_file_name_gdb (str, str) -> str:
Generates the absolute path for files that can be stored in geodatabases (gdb).
- generate_file_name_general_files (str, str, str) -> str:
Generates the absolute path for files that cannot be stored in geodatabases, specifying its file type.
- generate_file_name_lyrx (str, str) -> str:
Generates the absolute path for ArcGIS layer files (.lyrx) that cannot be stored in geodatabases.
- local_root_directory
The local root directory for the project’s output.
- Type:
str
- project_root_directory
The root directory name of the project.
- Type:
str
- general_files_directory_name
The directory name for storing general files.
- Type:
str
- lyrx_directory_name
The directory name for storing ArcGIS layer files (.lyrx).
- Type:
str
- Parameters:
scale (str) – The scale of the geospatial data, used to differentiate directories and file names. Needs to be defined when imported.
object_name (str) – The name of the geospatial object, used to differentiate directories and file names. Needs to be defined when imported.
This class provides methods to generate standardized absolute paths for geodatabase files, general files, and layer files, using the project’s naming conventions and directory structure.
- local_root_directory = 'C:\\path\\to\\folder\\you\\want\\your\\outputs\\in'
- project_root_directory = 'ag_outputs'
- general_files_directory_name = 'general_files'
- lyrx_directory_name = 'lyrx_outputs'
- property script_source_name
- property description
- generate_file_name_gdb(script_source_name: str, description: str) GdbFilePath[source]
Generates a file path for geodatabase (.gdb) files. After validating the input.
- Parameters:
script_source_name (str) – The name of the script or source generating the file.
description (str) – A brief description of the file’s purpose or contents.
- Returns:
The absolute path for the .gdb file.
- Return type:
str
- generate_file_name_general_files(script_source_name: str, description: str, file_type: str) GeneralFilePath[source]
Generates a file path for general files (e.g., CSV, TXT). After validating the input.
- Parameters:
script_source_name (str) – The name of the script or source generating the file.
description (str) – A brief description of the file’s purpose or contents.
file_type (str) – The filetype extension (without dot).
- Returns:
The absolute path for the general file, including the file extension.
- Return type:
str
- generate_file_name_lyrx(script_source_name: str, description: str) LyrxFilePath[source]
Generates a file path for ArcGIS layer files (.lyrx). After validating the input.
- Parameters:
script_source_name (str) – The name of the script or source generating the file.
description (str) – A brief description of the layer file’s purpose or contents.
- Returns:
The absolute path for the .lyrx file.
- Return type:
str
- generate_file_lyrx_directory_deprecated(script_source_name: str, description: str)[source]
Generates a file path for ArcGIS layer files (.lyrx). After validating the input.
- Parameters:
script_source_name (str) – The name of the script or source generating the file.
description (str) – A brief description of the layer file’s purpose or contents.
- Returns:
The absolute path for the .lyrx file.
- Return type:
str
- generate_final_outputs(file_name: str) GdbFilePath[source]
Generates a file path for geodatabase (.gdb) files for the final output files. After validating the input.
- Parameters:
file_name (str) – The name of the file name for the final output file.
- Returns:
The absolute path for the .gdb file.
- Return type:
str
- generate_general_subdirectory(description: str) SubdirectoryPath[source]
Generates a subdirectory path under the general files directory.
- Parameters:
description (str) – A short descriptor for the subdirectory purpose.
- Returns:
Absolute path of the subdirectory.
- Return type:
str
file_manager.work_file_manager module
- class file_manager.work_file_manager.WorkFileManager(config: WorkFileConfig)[source]
Bases:
object- What:
This class handles the creation and deletion of work files used in other classes or processes. It is designed to make it easy to switch between writing to disk and in-memory, and to delete/stop deleting work files to better troubleshoot issues. This class is not intended to be used to create final outputs of logics or processes.
- How:
The same instance of WorkFileManager can create and manage different structures containing files. for each call of the setup_work_file_paths is designed to take a single structure. Each file path generated by the WorkFileManager is tracked by the created_paths attribute so if you do not need stage the deletion of the files you can simply call the delete_created_files method without any parameters.
- Parameters:
config (WorkFileConfig) – Configuration object containing work file options.
- general_files_directory_name = 'general_files'
- lyrx_directory_name = 'lyrx_outputs'
- build_file_path(file_name: str, file_type: Literal['gdb'] = 'gdb', index: int | None = None) GdbFilePath[source]
- build_file_path(file_name: str, file_type: Literal['lyrx'], index: int | None = None) LyrxFilePath
- build_file_path(file_name: str, file_type: str, index: int | None = None) GeneralFilePath
Generates a file path based on the file name, type, and an optional index.
- Parameters:
file_name (str) – The name of the file.
file_type (str) – The type of file to generate the path for.
index (int, optional) – An optional index to append for uniqueness.
- Returns:
A string representing the file path.
- Return type:
str
- generate_output(instance: object, name: str, iteration_index: int) str[source]
- What:
Generates a unique file path for a given base name and iteration index. Designed to allow users of WorkFileManager to generate indexed outputs in a loop.
- Parameters:
instance (object) – The caller instance to update attributes on if needed.
name (str) – The base name of the work file.
iteration_index (int) – The current iteration index for uniqueness.
instance – The caller instance to update attributes on if needed.
- Returns:
The generated file path.
- Return type:
str
- setup_work_file_paths(instance: object, file_structure: Any, keys_to_update: str = None, add_key: str = None, file_type: str = 'gdb', index: int = None) Any[source]
- What:
Generates file paths for supported structures and sets them as attributes on the instance. Currently tested and supported structures include: - str - list[str] - dict[str, str] - list[dict[str, str]]
- Parameters:
instance (object) – The instance to set the file paths as attributes on.
file_structure (Any) – The input structure to process and return.
keys_to_update (str, optional) – Keys to update if file_structure is a dictionary.
add_key (str, optional) – An additional key to add to the dictionary.
file_type (str, optional) – The type of file path to generate. Defaults to “gdb”.
index (int, optional) – Index to ensure uniqueness in file names when processing lists of dicts.
- Returns:
The same structure as file_structure, updated with generated file paths.
- Return type:
Any
- delete_created_files(delete_targets: Iterable[GdbFilePath | GeneralFilePath | InjectIO | LyrxFilePath | None] | None = None, exceptions: Iterable[GdbFilePath | GeneralFilePath | InjectIO | LyrxFilePath | None] | None = None, delete_files: bool | None = None) None[source]
Deletes created paths. If delete_targets is None, deletes all tracked paths. ‘exceptions’ (if any) are excluded. If delete_files is None, uses not self.keep_files.
- static list_contents(data: Any, title: str = 'Contents')[source]
Pretty prints the contents of a data structure (list, dict, or other serializable objects).
- Parameters:
data (Any) – The data structure to print (list, dict, or other serializable objects).
title (str, optional) – A title to display before printing. Defaults to “Contents”.
- static apply_to_structure(data, func, **key_map)[source]
- What:
Applies a function to elements within a supported data structure. Designed to work with dictionaries, lists of dictionaries, and extensible for other structures.
- How:
Maps specified keys in the data structure to the function’s parameters and applies the function to each valid element.
- Parameters:
data (Union[dict, list[dict]]) – The data structure to process.
func (callable) – The function to apply. The keys in key_map should match the function parameters.
**key_map (str) – Mapping of function parameter names to keys in the data structure.
- Raises:
TypeError – If the data type is unsupported.
KeyError – If a required key is missing in a dictionary.
- static extract_key_by_alias(data: list[dict], unique_alias: str, key: str) str[source]
Extracts the value of a specific key from the dictionary with the specified alias.
- Parameters:
data (list[dict]) – The input list of dictionaries.
unique_alias (str) – The alias identifying the target dictionary.
key (str) – The key to extract the value from.
- Returns:
The value associated with the key in the specified dictionary.
- Return type:
str
- Raises:
ValueError – If no dictionary with the specified alias is found.
KeyError – If the key does not exist in the identified dictionary.
- static extract_key_all(data: list[dict], key: str) list[str][source]
Extracts all values for a specific key across all dictionaries.
- static set_key_by_alias(data: list[dict], unique_alias: str, key: str, new_value: str) None[source]
Sets the value of a key in the dictionary with the specified alias. Adds the key if it does not exist.
- Parameters:
data (list[dict]) – The input list of dictionaries.
unique_alias (str) – The alias identifying the target dictionary.
key (str) – The key to set or update.
new_value (str) – The value to set for the key.
- Raises:
ValueError – If no dictionary with the specified alias is found.
- class file_manager.work_file_manager.PartitionWorkFileManager(config: WorkFileConfig)[source]
Bases:
WorkFileManagerExtension of WorkFileManager to support partition-aware file path generation. Intended for use inside PartitionIterator or similar partition-based logic.
- generate_partition_path(object_name: str, tag: str | None = None, partition_id: int | None = None, suffix: str = '', extension: str = 'gdb') str[source]
Constructs a consistent file path for work files. If a partition_id is provided, it becomes a partition-aware path; otherwise, it generates a general work path.
- Parameters:
object_name (str) – Identifier for the object (e.g., layer).
tag (str, optional) – Tag (e.g., ‘input’, ‘context’, ‘copy’, etc.).
partition_id (int | None, optional) – Partition number. Defaults to None.
suffix (str, optional) – Extra string to differentiate logic. Defaults to “”.
extension (str) – File type or extension. Defaults to ‘gdb’.
- Returns:
Constructed file path.
- Return type:
str
Module contents
- class file_manager.WorkFileManager(config: WorkFileConfig)[source]
Bases:
object- What:
This class handles the creation and deletion of work files used in other classes or processes. It is designed to make it easy to switch between writing to disk and in-memory, and to delete/stop deleting work files to better troubleshoot issues. This class is not intended to be used to create final outputs of logics or processes.
- How:
The same instance of WorkFileManager can create and manage different structures containing files. for each call of the setup_work_file_paths is designed to take a single structure. Each file path generated by the WorkFileManager is tracked by the created_paths attribute so if you do not need stage the deletion of the files you can simply call the delete_created_files method without any parameters.
- Parameters:
config (WorkFileConfig) – Configuration object containing work file options.
- static apply_to_structure(data, func, **key_map)[source]
- What:
Applies a function to elements within a supported data structure. Designed to work with dictionaries, lists of dictionaries, and extensible for other structures.
- How:
Maps specified keys in the data structure to the function’s parameters and applies the function to each valid element.
- Parameters:
data (Union[dict, list[dict]]) – The data structure to process.
func (callable) – The function to apply. The keys in key_map should match the function parameters.
**key_map (str) – Mapping of function parameter names to keys in the data structure.
- Raises:
TypeError – If the data type is unsupported.
KeyError – If a required key is missing in a dictionary.
- build_file_path(file_name: str, file_type: str = 'gdb', index: int | None = None) GdbFilePath | LyrxFilePath | GeneralFilePath[source]
Generates a file path based on the file name, type, and an optional index.
- Parameters:
file_name (str) – The name of the file.
file_type (str) – The type of file to generate the path for.
index (int, optional) – An optional index to append for uniqueness.
- Returns:
A string representing the file path.
- Return type:
str
- delete_created_files(delete_targets: Iterable[GdbFilePath | GeneralFilePath | InjectIO | LyrxFilePath | None] | None = None, exceptions: Iterable[GdbFilePath | GeneralFilePath | InjectIO | LyrxFilePath | None] | None = None, delete_files: bool | None = None) None[source]
Deletes created paths. If delete_targets is None, deletes all tracked paths. ‘exceptions’ (if any) are excluded. If delete_files is None, uses not self.keep_files.
- static extract_key_all(data: list[dict], key: str) list[str][source]
Extracts all values for a specific key across all dictionaries.
- static extract_key_by_alias(data: list[dict], unique_alias: str, key: str) str[source]
Extracts the value of a specific key from the dictionary with the specified alias.
- Parameters:
data (list[dict]) – The input list of dictionaries.
unique_alias (str) – The alias identifying the target dictionary.
key (str) – The key to extract the value from.
- Returns:
The value associated with the key in the specified dictionary.
- Return type:
str
- Raises:
ValueError – If no dictionary with the specified alias is found.
KeyError – If the key does not exist in the identified dictionary.
- general_files_directory_name = 'general_files'
- generate_output(instance: object, name: str, iteration_index: int) str[source]
- What:
Generates a unique file path for a given base name and iteration index. Designed to allow users of WorkFileManager to generate indexed outputs in a loop.
- Parameters:
instance (object) – The caller instance to update attributes on if needed.
name (str) – The base name of the work file.
iteration_index (int) – The current iteration index for uniqueness.
instance – The caller instance to update attributes on if needed.
- Returns:
The generated file path.
- Return type:
str
- static list_contents(data: Any, title: str = 'Contents')[source]
Pretty prints the contents of a data structure (list, dict, or other serializable objects).
- Parameters:
data (Any) – The data structure to print (list, dict, or other serializable objects).
title (str, optional) – A title to display before printing. Defaults to “Contents”.
- lyrx_directory_name = 'lyrx_outputs'
- static set_key_by_alias(data: list[dict], unique_alias: str, key: str, new_value: str) None[source]
Sets the value of a key in the dictionary with the specified alias. Adds the key if it does not exist.
- Parameters:
data (list[dict]) – The input list of dictionaries.
unique_alias (str) – The alias identifying the target dictionary.
key (str) – The key to set or update.
new_value (str) – The value to set for the key.
- Raises:
ValueError – If no dictionary with the specified alias is found.
- setup_work_file_paths(instance: object, file_structure: Any, keys_to_update: str = None, add_key: str = None, file_type: str = 'gdb', index: int = None) Any[source]
- What:
Generates file paths for supported structures and sets them as attributes on the instance. Currently tested and supported structures include: - str - list[str] - dict[str, str] - list[dict[str, str]]
- Parameters:
instance (object) – The instance to set the file paths as attributes on.
file_structure (Any) – The input structure to process and return.
keys_to_update (str, optional) – Keys to update if file_structure is a dictionary.
add_key (str, optional) – An additional key to add to the dictionary.
file_type (str, optional) – The type of file path to generate. Defaults to “gdb”.
index (int, optional) – Index to ensure uniqueness in file names when processing lists of dicts.
- Returns:
The same structure as file_structure, updated with generated file paths.
- Return type:
Any
- created_paths: set[str]