|
|
@ -110,26 +110,14 @@ def process(yaml_name):
|
|
|
|
if is_latest:
|
|
|
|
if is_latest:
|
|
|
|
output_dirs.append(output_dir_latest)
|
|
|
|
output_dirs.append(output_dir_latest)
|
|
|
|
|
|
|
|
|
|
|
|
# Export to jpg
|
|
|
|
|
|
|
|
for output_dir in output_dirs:
|
|
|
|
|
|
|
|
page_name = ddp.pageRow.Beach
|
|
|
|
|
|
|
|
jpg_name = os.path.join(output_dir, page_name + '.jpg')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arcpy.mapping.ExportToJPEG(
|
|
|
|
|
|
|
|
mxd, jpg_name, resolution=200, jpeg_quality=80)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Activate data driven pages
|
|
|
|
# Activate data driven pages
|
|
|
|
ddp = mxd.dataDrivenPages
|
|
|
|
ddp = mxd.dataDrivenPages
|
|
|
|
|
|
|
|
|
|
|
|
for page_num in range(1, ddp.pageCount + 1):
|
|
|
|
# Export to jpg
|
|
|
|
ddp.currentPageID = page_num
|
|
|
|
for output_dir in output_dirs:
|
|
|
|
|
|
|
|
|
|
|
|
# Export beaches that are covered by current survey
|
|
|
|
|
|
|
|
if ddp.pageRow.Parent == beach.lower():
|
|
|
|
|
|
|
|
page_name = ddp.pageRow.Beach
|
|
|
|
page_name = ddp.pageRow.Beach
|
|
|
|
jpg_name = os.path.join(output_jpg_dir, page_name + '.jpg')
|
|
|
|
jpg_name = os.path.join(output_dir, page_name + '.jpg')
|
|
|
|
|
|
|
|
|
|
|
|
# Export to jpg
|
|
|
|
|
|
|
|
arcpy.mapping.ExportToJPEG(
|
|
|
|
arcpy.mapping.ExportToJPEG(
|
|
|
|
mxd, jpg_name, resolution=200, jpeg_quality=80)
|
|
|
|
mxd, jpg_name, resolution=200, jpeg_quality=80)
|
|
|
|
|
|
|
|
|
|
|
|