|
|
|
@ -40,9 +40,6 @@ 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
|
|
|
|
|
|
|
|
|
@ -230,7 +227,7 @@ if args.tag_reregistered:
|
|
|
|
|
if args.site:
|
|
|
|
|
count = loop_reregistered(args.site, tag, reregister_all)
|
|
|
|
|
else:
|
|
|
|
|
for site in site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir):
|
|
|
|
|
for site in os.listdir(images_dir):
|
|
|
|
|
x = loop_reregistered(site, tag, reregister_all)
|
|
|
|
|
count = count + x
|
|
|
|
|
|
|
|
|
@ -250,7 +247,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 site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir):
|
|
|
|
|
for site in os.listdir(images_dir):
|
|
|
|
|
loop_reregistered(site, tag, reregister_all)
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
@ -261,7 +258,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 site_list: # Code to loop over entire images directory: for site in os.listdir(images_dir):
|
|
|
|
|
for site in os.listdir(images_dir):
|
|
|
|
|
main(site)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|