<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Arcpy Export PNG shift result in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35804#M2801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument('current')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.spatialReference = prjFile&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_layer = arcpy.mapping.Layer("costumers_" +str(j)+".tif")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.AddLayer(df, add_layer, "TOP")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclass_raster_lyr = arcpy.mapping.ListLayers(mxd)[0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ApplySymbologyFromLayer_management(reclass_raster_lyr, Temp_Symbology)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if reclass_raster_lyr.symbologyType == "RASTER_CLASSIFIED":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclass_raster_lyr.symbology.excludedValues = excludedValues&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclass_raster_lyr.symbology.reclassify()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrPolygonj = arcpy.mapping.Layer("customerlyr"+str(j))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.extent = lyrPolygonj.getSelectedExtent()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrPolygonj.visible = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strAux = listRow&lt;J&gt;.split(" ")[1::]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strOutput = date + " " + " ".join(x for x in strAux) + ".tif"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; world_file = True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToPNG(mxd, strOutput,df, 10199, 7688,820,world_file = world_file, background_color = "255,255,255",transparent_color = "255,255,255")&lt;/J&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i run this script on ArcMap 10.2 the result is correct.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I have try to execute manually the export png into arcmap 10.1 and the result is correct.&lt;/P&gt;&lt;P&gt;So why in my script on 10.1 the result is shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Sep 2016 08:20:35 GMT</pubDate>
    <dc:creator>DEVAPP</dc:creator>
    <dc:date>2016-09-25T08:20:35Z</dc:date>
    <item>
      <title>Arcpy Export PNG shift result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35804#M2801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument('current')&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.spatialReference = prjFile&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add_layer = arcpy.mapping.Layer("costumers_" +str(j)+".tif")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.AddLayer(df, add_layer, "TOP")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclass_raster_lyr = arcpy.mapping.ListLayers(mxd)[0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ApplySymbologyFromLayer_management(reclass_raster_lyr, Temp_Symbology)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if reclass_raster_lyr.symbologyType == "RASTER_CLASSIFIED":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclass_raster_lyr.symbology.excludedValues = excludedValues&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reclass_raster_lyr.symbology.reclassify()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrPolygonj = arcpy.mapping.Layer("customerlyr"+str(j))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.extent = lyrPolygonj.getSelectedExtent()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrPolygonj.visible = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strAux = listRow&lt;J&gt;.split(" ")[1::]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strOutput = date + " " + " ".join(x for x in strAux) + ".tif"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; world_file = True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToPNG(mxd, strOutput,df, 10199, 7688,820,world_file = world_file, background_color = "255,255,255",transparent_color = "255,255,255")&lt;/J&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i run this script on ArcMap 10.2 the result is correct.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I have try to execute manually the export png into arcmap 10.1 and the result is correct.&lt;/P&gt;&lt;P&gt;So why in my script on 10.1 the result is shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 08:20:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35804#M2801</guid>
      <dc:creator>DEVAPP</dc:creator>
      <dc:date>2016-09-25T08:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Export PNG shift result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35805#M2802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this could have been the result of an issue identify between versions. &amp;nbsp;You would have to examine the "Issues Addressed" or similar in the older help topics.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/main/10.2/" title="http://resources.arcgis.com/en/help/main/10.2/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/main/10.1/" title="http://resources.arcgis.com/en/help/main/10.1/"&gt;ArcGIS Help 10.1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 11:55:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35805#M2802</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-09-25T11:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Export PNG shift result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35806#M2803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;i have seen "Issues Addresses" but this function is same in the 2 version&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 14:16:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35806#M2803</guid>
      <dc:creator>DEVAPP</dc:creator>
      <dc:date>2016-09-25T14:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Export PNG shift result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35807#M2804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good... so if it wasn't a bug between the versions that was fixed in 10.2, then there is something wrong 10.1 environments&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 17:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35807#M2804</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-09-25T17:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Export PNG shift result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35808#M2805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What in your opinion?&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I remenber that 10.1 have some bugs about project coordinate.....i'm wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 19:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-export-png-shift-result/m-p/35808#M2805</guid>
      <dc:creator>DEVAPP</dc:creator>
      <dc:date>2016-09-25T19:24:28Z</dc:date>
    </item>
  </channel>
</rss>

