Wednesday, 18 October 2017

arcgis desktop - Writing world file when exporting TIFF using ArcPy Mapping?


According to documentation, the options are: Syntax



ExportToTIFF (map_document, out_tiff, {data_frame}, {df_export_width}, {df_export_height}, {resolution}, {world_file}, {color_mode}, {tiff_compression}, {geoTIFF_tags})



However, this works:


import arcpy.mapping
mxd = arcpy.mapping.MapDocument("CURRENT")
arcpy.mapping.ListDataFrames(mxd)
arcpy.mapping.ExportToTIFF(mxd,r"D:\out2.tif","PAGE_LAYOUT",640,480,96)


but this:


arcpy.mapping.ExportToTIFF(mxd,r"D:\out2.tif","PAGE_LAYOUT",640,480,96,True)

yields: Runtime error : PageLayoutObject: Error in executing ExportToTIFF


Am I doing something wrong with that Boolean for world_file?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...