Hi at all,
on my python script i set the Coordinate System for Data Frame of mxd and after a Zoom To function on firsy layer into list i export mxd as PNG.
This is my code:
mxd = arcpy.mapping.MapDocument('current')
df = arcpy.mapping.ListDataFrames(mxd)
df.spatialReference = prjFile
add_layer = arcpy.mapping.Layer("costumers_" +str(j)+".tif")
arcpy.mapping.AddLayer(df, add_layer, "TOP")
reclass_raster_lyr = arcpy.mapping.ListLayers(mxd)
if reclass_raster_lyr.symbologyType == "RASTER_CLASSIFIED":
reclass_raster_lyr.symbology.excludedValues = excludedValues
lyrPolygonj = arcpy.mapping.Layer("customerlyr"+str(j))
df.extent = lyrPolygonj.getSelectedExtent()
lyrPolygonj.visible = False
strAux = listRow
strOutput = date + " " + " ".join(x for x in strAux) + ".tif"
world_file = True
arcpy.mapping.ExportToPNG(mxd, strOutput,df, 10199, 7688,820,world_file = world_file, background_color = "255,255,255",transparent_color = "255,255,255")
but when i run this script on ArcMap 10.2 the result is correct.
When i run on ArcMap 10.1 the png result is not correct, i mean that if i add it into map this png have a shift respect the position of original file into mxd.
I have try to execute manually the export png into arcmap 10.1 and the result is correct.
So why in my script on 10.1 the result is shift?
What in your opinion?
I have seen that this error show after insert into script a project raster, so i can project wgs84 utm 36 n to wgs84 geographic.
I remenber that 10.1 have some bugs about project coordinate.....i'm wrong?