From eab7b0c301871a1c01a1411d4fb59b79b1659af9 Mon Sep 17 00:00:00 2001 From: Cameron Bodine Date: Mon, 12 Feb 2024 06:15:44 -0700 Subject: [PATCH] Export sub map if export poly true --- src/main_mapSubstrate.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main_mapSubstrate.py b/src/main_mapSubstrate.py index cf8abc9..9c58010 100644 --- a/src/main_mapSubstrate.py +++ b/src/main_mapSubstrate.py @@ -178,10 +178,25 @@ def map_master_func(logfilename='', maps = glob(os.path.join(mapPath, '*.tif')) if len(maps) == 0: - if export_poly: - error_noSubMap_poly() - if map_mosaic: - error_noSubMap_mosaic() + # if export_poly: + # error_noSubMap_poly() + # if map_mosaic: + # error_noSubMap_mosaic() + map_sub = True + + ######################################################### + # If map_sub == 0, make sure data was previously exported + if not map_sub and export_poly: + # Get directory + mapPath = os.path.join(mapObjs[0].substrateDir, 'map_substrate_raster') + maps = glob(os.path.join(mapPath, '*.tif')) + + if len(maps) == 0: + # if export_poly: + # error_noSubMap_poly() + # if map_mosaic: + # error_noSubMap_mosaic() + map_sub = True ############################################# # Determine if smoothed trackline was created