Hello everyone I am trying to set up a process where I can export out pdfs from a spatial map series, use the pdf to tiff tool, and then convert to another raster to create a jpg that can be used to create a mosiac. My tiff from the pdf to tiff is a 4 band tiff while a manual map export creates a 3 band tiff.
when using my conversion tool I get the following error: ERROR 000446: Output file format with specified pixel type or number of bands or colormap is not supported. Refer to the 'Technical specifications for raster dataset formats' help section in Desktop Help.
Failed to execute (CopyRaster).
any ideas on how I can get this process or a similar one to work
These are the raster outputs... they look very similar to me.
Well no one responded but we got it figured out with a python expression:
import arcpy, os, sys, pathlib
output_folder = r"I:\WorkingFolder\Nebraska\021-01559 Lincoln LWS Water 2.0\Route A\Images"
# Id is the name of the polygon attribute field with the value you want added to the tiff image name
output_tiff_fname_pattern = "Layout_{this_row.Name}"
# this will be the first ObjectID value for the polygon layout
layout_number = 0
output_folder = pathlib.Path(output_folder)
os.makedirs(output_folder, exist_ok=True)
os.makedirs(output_folder, exist_ok=True)
p = arcpy.mp.ArcGISProject("CURRENT")
l = p.listLayouts()[layout_number]
mf = l.listElements('MAPFRAME_ELEMENT')[0]
if not (l.mapSeries is None):
ms = l.mapSeries
if ms.enabled:
for pageNum in range(1, ms.pageCount + 1):
# Updating the currently-viewed "page" of the MapSeries
ms.currentPageNumber = pageNum
# Fishing out the data for this specific row/page of the MapSeries
this_row = ms.pageRow
# Establishing the pattern for the PNG filenames
output_fname = output_tiff_fname_pattern.format(this_row=this_row)
outputTIF = os.path.join(output_folder, output_fname)
# Exporting the currently-viewed "page" to PNG
l.exportToTIFF(out_tif=outputTIF, resolution=300, color_mode="24-BIT_TRUE_COLOR", tiff_compression='JPEG', jpeg_compression_quality=75, transparent_background="", embed_color_profile="", clip_to_elements="", world_file=True, geoTIFF_tags=True, georef_mapframe=mf)