|
|
@ -39,7 +39,7 @@ def parse_yaml(yaml_name):
|
|
|
|
params = {}
|
|
|
|
params = {}
|
|
|
|
for line in yaml.split('\n'):
|
|
|
|
for line in yaml.split('\n'):
|
|
|
|
if line:
|
|
|
|
if line:
|
|
|
|
key, val = line.split(':')
|
|
|
|
key, val = line.split(':', 1)
|
|
|
|
params[key] = val.strip()
|
|
|
|
params[key] = val.strip()
|
|
|
|
|
|
|
|
|
|
|
|
return params
|
|
|
|
return params
|
|
|
@ -50,15 +50,15 @@ def process(yaml_name):
|
|
|
|
beach = params['BEACH']
|
|
|
|
beach = params['BEACH']
|
|
|
|
base_name = os.path.splitext(os.path.basename(params['INPUT LAS']))[0]
|
|
|
|
base_name = os.path.splitext(os.path.basename(params['INPUT LAS']))[0]
|
|
|
|
|
|
|
|
|
|
|
|
# Set all paths relative to current script location
|
|
|
|
# Make all input and output paths absolute
|
|
|
|
input_tif_dir = params['TIF DEM FOLDER']
|
|
|
|
mxd_name = os.path.abspath(params['MAP DOCUMENT'])
|
|
|
|
mxd_name = params['MAP DOCUMENT']
|
|
|
|
clip_poly = os.path.abspath(params['HEATMAP CROP POLY'])
|
|
|
|
symb_lyr_name = params['SYMBOLOGY LAYER']
|
|
|
|
symb_lyr_name = os.path.abspath(params['SYMBOLOGY LAYER'])
|
|
|
|
clip_poly = params['HEATMAP CROP POLY']
|
|
|
|
input_tif_dir = os.path.abspath(params['TIF DEM FOLDER'])
|
|
|
|
output_tif_dir = params['TIF HEATMAP FOLDER']
|
|
|
|
output_tif_dir = os.path.abspath(params['TIF HEATMAP FOLDER'])
|
|
|
|
previous_date = params['PREVIOUS SURVEY DATE']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if previous survey date was provided
|
|
|
|
# Check if previous survey date was provided
|
|
|
|
|
|
|
|
previous_date = params['PREVIOUS SURVEY DATE']
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
int(previous_date)
|
|
|
|
int(previous_date)
|
|
|
|
except ValueError:
|
|
|
|
except ValueError:
|
|
|
|