joosthoek

arcpy.mapping.ExportToTIFF full georeferenced export problem

Discussion created by joosthoek on Nov 11, 2011
Latest reply on Mar 2, 2012 by david.rahe
Hello,

I have two raster layers in my TOC of which the top one is semitransparent. They have the same size and extent. I would like to export this combined 'map' in it's full resolution.

My first attempt uses File > Export Map. First I set the Dataframe width to be the rasters width. Next in Export Map I increase the DPI until the exported image width is around the width of the rasters. When I export ArcGIS 10 SP3 crashes. This has worked for me with ArcGIS 9.3.

The second attempt is using python:
import arcpy
mxd = arcpy.mapping.MapDocument("mymxd.mxd")
outTIFFpath = "out.tif"
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
arcpy.mapping.ExportToTIFF(mxd, outTIFFpath, df, df_export_width=46070, df_export_height=28126, resolution=2642, world_file=True, geoTIFF_tags=True)

(the width of the rasters is 46080 and 46070 here is the best approximation I can get)

The problem here is that the exported TIFF isn't correctly georeferenced. The resulting map is mostly white 'nodata' around the raster. How can I make sure the MapDocument goes to full extent before I export?

Kind regards,

Jelmer Oosthoek

Outcomes