Batch export to GeoTIFF in dataview

Discussion created by peterverst on Nov 10, 2016
Latest reply on Nov 11, 2016 by peterverst


I am looking for a script that can export to tiff in data view because I need them georeferenced.

I found this old question: Batch export to GeoTIFFs for set polygon features in data frame?

It looks like the thing I need but the script is not working. When i run it i get:

syntaxerror: EOL while scanning string literal


i am using arcgis for desktop 10.3


hope sameone can help me


import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
ar = df.extent.height / df.extent.width

for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
      mxd.dataDrivenPages.currentPageID = pageNum
      print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID),       str(mxd.dataDrivenPages.pageCount))
arcpy.mapping.ExportToTIFF(mxd,r"D:\ImageTemp\" + str(pageNum) + ".tif",df,1024,1024*ar,48,True)

del mxd