|
|
|
@ -40,6 +40,9 @@ coastsnap_sites_csv = pd.read_csv(sites_csv_path)
|
|
|
|
|
images_parent_dir = coastsnap_sites_csv.parent_directory[0]
|
|
|
|
|
images_dir = os.path.join(images_parent_dir, "Images")
|
|
|
|
|
|
|
|
|
|
site_list = coastsnap_sites_csv['site_name'] # Loop through sites in coastsnap_sites.csv
|
|
|
|
|
#site_list = os.listdir(images_dir) # Loop through all sites in /CoastSnap/Images
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
|
# Tag image function
|
|
|
|
|
|
|
|
|
@ -227,7 +230,7 @@ if args.tag_reregistered:
|
|
|
|
|
if args.site:
|
|
|
|
|
count = loop_reregistered(args.site, tag, reregister_all)
|
|
|
|
|
else:
|
|
|
|
|
for site in os.listdir(images_dir):
|
|
|
|
|
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir):
|
|
|
|
|
x = loop_reregistered(site, tag, reregister_all)
|
|
|
|
|
count = count + x
|
|
|
|
|
|
|
|
|
@ -247,7 +250,7 @@ if args.tag_reregistered:
|
|
|
|
|
if args.site: # Case 1: User specifies a site
|
|
|
|
|
loop_reregistered(args.site, tag, reregister_all)
|
|
|
|
|
else: # Case 2: No site specified. Tag all images
|
|
|
|
|
for site in os.listdir(images_dir):
|
|
|
|
|
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir):
|
|
|
|
|
loop_reregistered(site, tag, reregister_all)
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
@ -258,7 +261,7 @@ else:
|
|
|
|
|
if args.site: # Case 1: User specifies a site
|
|
|
|
|
main(args.site)
|
|
|
|
|
else: # Case 2: No site specified. Tag all images
|
|
|
|
|
for site in os.listdir(images_dir):
|
|
|
|
|
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir):
|
|
|
|
|
main(site)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|