Skip to content

Path Registry

Scott Morken edited this page May 16, 2018 · 6 revisions

Path Registry

Description:

Stores all paths involved in the preprocessing scripts. Uses a dependency graph to build up dependent paths, allowing cascading changes to directory structure. Configured by pathregistry json file.

Example Json configuration

{
  "Path_Variables": [ "region_path", "sha_future_scenario", "scenario_name" ],
  "Paths": {
    "Source_Dir": [ "M:/", "Spatially_explicit", "01_Projects", "17_BC_ON_1ha", "05_working_BC" ],
    "Source_External_Data_Dir": [ "${Source_Dir}", "00_external_data" ],
    "Source_External_Future_Dir": [ "${Source_Dir}", "SHA", "Scenarios", "${sha_future_scenario}" ],
    "Source_External_Spatial_Dir": [ "${Source_External_Data_Dir}", "01_spatial" ],
    "Source_External_Aspatial_Dir": [ "${Source_External_Data_Dir}", "02_aspatial" ],
    "Source_Tools_Dir": [ "M:/", "Spatially_explicit", "03_Tools" ],
    "Source_Recliner2GCBM-x64_Dir": [ "${Source_Tools_Dir}", "Recliner2GCBM-x64" ],
    "Source_Recliner2GCBM-x86_Dir": [ "${Source_Tools_Dir}", "Recliner2GCBM-x86" ],
    "Source_GCBM_Dir": [ "${Source_Tools_Dir}", "GCBMBuilds", "2018_04_25" ],
    "Source_lostgis_dir": [ "${Source_Tools_Dir}", "lostgis" ],
    "Local_Dir": [ "H:/", "scott3", "17_BC_ON_1ha" ],
    "Local_Working_Dir": [ "${Local_Dir}", "05_working_BC" ],
    "PostGIS_Connection_Vars": [ "${Local_Working_Dir}", "postgis", "postgis_connection.json" ],
    "PostGIS_Region_Connection_Vars": [ "${Local_Working_Dir}", "${region_path}", "postgis_connection.json" ],
    "Local_Tools_Dir": [ "${Local_Dir}", "03_tools" ],
    "Local_Recliner2GCBM-x64_Dir": [ "${Local_Tools_Dir}", "Recliner2GCBM-x64" ],
    "Local_Recliner2GCBM-x86_Dir": [ "${Local_Tools_Dir}", "Recliner2GCBM-x86" ],
    "Local_GCBM_Dir": [ "${Local_Tools_Dir}", "GCBMBuilds", "2018_04_25" ],
    "GCBM_EXE": [ "${Local_GCBM_Dir}", "moja.cli.exe" ],
    "GCBM_Logging_Conf": [ "${Local_GCBM_Dir}", "logging.conf" ],
    "Local_lostgis_dir": [ "${Local_Tools_Dir}", "lostgis" ],
    "ST_Safe_Intersection": [ "${Local_lostgis_dir}", "sql", "functions", "ST_Safe_Intersection.sql" ],
    "ST_Safe_Repair": [ "${Local_lostgis_dir}", "sql", "functions", "ST_Safe_Repair.sql" ],
    "External_Data_Dir": [ "${Local_Working_Dir}", "00_external_data" ],
    "External_Spatial_Dir": [ "${External_Data_Dir}", "01_spatial" ],
    "External_Aspatial_Dir": [ "${External_Data_Dir}", "02_aspatial" ],
    "Disturbance_Age_Proportions": [ "${External_Aspatial_Dir}", "03_disturbance_age_proportion", "DistAgeProp.csv" ],
    "Spatial_Boundaries": [ "${External_Spatial_Dir}", "01_spatial_reference" ],
    "Clip_Feature": [ "${Spatial_Boundaries}", "PSPUS_2016_FINAL_1_Reprojected.shp" ],
    "Inventory_Workspace": [ "${External_Spatial_Dir}", "02_inventory", "Processed.gdb" ],
    "External_Historic_Dist": [ "${External_Spatial_Dir}", "03_disturbances", "01_historic" ],
    "Historic_Fire_Dir": [ "${External_Historic_Dist}", "01_fire", "shapefiles" ],
    "Historic_Harvest_Dir": [ "${External_Historic_Dist}", "02_harvest" ],
    "Historic_Insect_Dir": [ "${External_Historic_Dist}", "03_insect_filtered_30" ],
    "Environment_Dir": [ "${External_Spatial_Dir}", "04_environment" ],
    "SubRegionDir": [ "${Local_Working_Dir}", "${region_path}" ],
    "Pretiled_Layers": [ "${SubRegionDir}", "01a_pretiled_layers" ],
    "RollbackTilerConfigPath": [ "${Pretiled_Layers}", "rollback_tiler_config.yaml" ],
    "HistoricTilerConfigPath": [ "${Pretiled_Layers}", "historic_tiler_config.yaml" ],
    "Clipped_Inventory_Path": [ "${Pretiled_Layers}", "00_Workspace.gdb" ],
    "Copied_Spatial_Boundaries_Dir": [ "${Pretiled_Layers}", "01_spatial_reference" ],
    "Default_Spatial_Boundaries_Layer": [ "${Copied_Spatial_Boundaries_Dir}", "PSPUS_2016.shp" ],
    "InventoryRasterOutputDir": [ "${Pretiled_Layers}", "02_inventory" ],
    "Pretiled_Disturbances": [ "${Pretiled_Layers}", "03_disturbances" ],
    "Copied_Environment_Dir": [ "${Pretiled_Layers}", "04_environment" ],
    "Clipped_Historic_Disturbance_Path": [ "${Pretiled_Disturbances}", "01_historic" ],
    "Clipped_Historic_Fire_Path": [ "${Clipped_Historic_Disturbance_Path}", "01_fire", "shapefiles" ],
    "Clipped_Historic_Harvest_Path": [ "${Clipped_Historic_Disturbance_Path}", "02_harvest" ],
    "Clipped_Historic_Insect_Path": [ "${Clipped_Historic_Disturbance_Path}", "03_insect_filtered" ],
    "Future_Dist_Input_Dir": [ "${Pretiled_Disturbances}", "02_future", "inputs", "${sha_future_scenario}" ],
    "Future_Dist_Output_Dir": [ "${Pretiled_Disturbances}", "02_future", "outputs", "${scenario_name}" ],
    "RollbackDisturbancesOutput": [ "${Pretiled_Disturbances}", "03_rollback", "rollbackDist.shp" ],
    "MeanAnnualTempPath": [ "${Copied_Environment_Dir}", "NAmerica_MAT_1971_2000.tif" ],
    "TiledLayersDir": [ "${SubRegionDir}", "01b_tiled_layers", "${scenario_name}" ],
    "TransitionRulesPath": [ "${TiledLayersDir}", "transition_rules.csv" ],
    "ArchiveIndex": [ "${External_Aspatial_Dir}", "01_AIDB", "ArchiveIndex_Beta_Install_BASE.mdb" ],
    "YieldTable": [ "${External_Aspatial_Dir}", "02_yield_table", "yield.csv" ],
    "Recliner2GCBMConfigTemplate": [ "${External_Aspatial_Dir}", "04_configuration_templates", "recliner2GCBMConfigTemplate.json" ],
    "GCBM_config_provider_template": [ "${External_Aspatial_Dir}", "04_configuration_templates", "GCBM_config_provider_template.json" ],
    "GCBM_config_template": [ "${External_Aspatial_Dir}", "04_configuration_templates", "GCBM_config_template.json" ],
    "Recliner2GCBMOutpath": [ "${SubRegionDir}", "02b_recliner2GCBM_output", "${scenario_name}", "GCBMinput.db" ],
    "GCBM_Config_Dir": ["${SubRegionDir}", "04_Run_GCBM", "00_configs", "${scenario_name}"],
    "GCBMInputDBPath": [ "${Recliner2GCBMOutpath}"],
    "GCBM_OutputDB_Path": [ "${SubRegionDir}", "04_Run_GCBM", "01_run", "outputs", "${scenario_name}", "GCBMoutput.db" ],
    "GCBM_Variable_Grid_Output_Dir": [ "${SubRegionDir}", "04_Run_GCBM", "01_run", "outputs", "${scenario_name}" ]
  }
}

Clone this wiki locally