<?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 Re: CopyRaster Environment Settings Not Being Applied in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19338#M1474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Patrick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tile size only affects rasters that are stored in TIFFs, file geodatabases, or an SDE geodatabase.&amp;nbsp; See the following link:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001w00000021000000"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//001w00000021000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the pyramids not being built, I found the following bug, &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDcwNzkx"&gt;NIM070791&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The geoprocessing tool, Copy Raster, builds pyramids even if the build&amp;nbsp; pyramids check box in the 'Environment Variable' is unchecked. This&amp;nbsp; happens only when the output is a file raster (TIFF) and when setting&amp;nbsp; any of the parameters like 'Ignore background value', 'colormapToRGB' or&amp;nbsp; 'convert 1 bit data to 8 bit data.'&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This appears to occur for JP2 as well as TIFF files.&amp;nbsp; When not specifying the 'Colormap to RGB' option, the OVR file is not created.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Aug 2013 16:15:41 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2013-08-30T16:15:41Z</dc:date>
    <item>
      <title>CopyRaster Environment Settings Not Being Applied</title>
      <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19336#M1472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am making a call to arcpy.CopyRaster_management to convert some miscellaneous rasters into JPEG2000 *.jp2 files. Before making a call to this line, I want to set a few arcpy.env environment settings to be applied to the copy. Specifically, I would like to specify compression, pyramid, and tilesize.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code looks like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# Specifying the environment settings
arcpy.env.workspace = outWorkspace
arcpy.env.tileSize = "512 512"
arcpy.env.compression = "JPEG2000 75"
arcpy.env.pyramid = "NONE"
#Copying the raster
arcpy.CopyRaster_management(filepath,name + ".jp2","DEFAULTS","0","0","","ColormapToRGB","8_BIT_UNSIGNED")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The actual raster copies, and is correct. However, my arcpy.env settings are not applied. For example, my tileSize is not set to the specified 512x512, and the *.ovr overviews file is created even though I specified for pyramids to not be created ("NONE").&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am referencing the below document for CopyRaster_management: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000094000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000094000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;At the bottom of the document under "Environments" it lists the environment settings and the tileSize, compression, and pyramid options are listed, so I assume these should be getting applied. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I applying these environment settings incorrectly? How can I prevent overviews from being created, and my tileSize from being correctly applied? Any help is appreciated, thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:46:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19336#M1472</guid>
      <dc:creator>PatrickDoody</dc:creator>
      <dc:date>2021-12-10T20:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: CopyRaster Environment Settings Not Being Applied</title>
      <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19337#M1473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is your output workspace/storage?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Raster Storage Matrix to see if those parameters are available for the storage type you are writing to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001w00000024000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001w00000024000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 11:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19337#M1473</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-08-30T11:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: CopyRaster Environment Settings Not Being Applied</title>
      <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19338#M1474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Patrick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tile size only affects rasters that are stored in TIFFs, file geodatabases, or an SDE geodatabase.&amp;nbsp; See the following link:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001w00000021000000"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#//001w00000021000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the pyramids not being built, I found the following bug, &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDcwNzkx"&gt;NIM070791&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The geoprocessing tool, Copy Raster, builds pyramids even if the build&amp;nbsp; pyramids check box in the 'Environment Variable' is unchecked. This&amp;nbsp; happens only when the output is a file raster (TIFF) and when setting&amp;nbsp; any of the parameters like 'Ignore background value', 'colormapToRGB' or&amp;nbsp; 'convert 1 bit data to 8 bit data.'&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This appears to occur for JP2 as well as TIFF files.&amp;nbsp; When not specifying the 'Colormap to RGB' option, the OVR file is not created.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 16:15:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19338#M1474</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2013-08-30T16:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: CopyRaster Environment Settings Not Being Applied</title>
      <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19339#M1475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having a similar issue. I cannot seem to get the compression environment to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried it in a python script with&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.compression = "JPG 50"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get no compression&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(original is a tif)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried using ArcTools and change the Raster Storage parameters and get the same thing. No compression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did anyone ever figure this out?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dorothy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 17:43:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19339#M1475</guid>
      <dc:creator>DorothyMortenson</dc:creator>
      <dc:date>2013-09-23T17:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: CopyRaster Environment Settings Not Being Applied</title>
      <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19340#M1476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same here -- my script has&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.compression = "JPEG2000"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I end up with LZ77 anyway, which results in a dataset that is too huge.&amp;nbsp; If I can't script this then I have to run it by hand to get the result I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-no-proof: yes;"&gt;-------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN style="mso-no-proof: yes; mso-bidi-font-family: Arial; font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;STRONG&gt;Paul Cone&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-no-proof: yes;"&gt;Corporate GIS&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-no-proof: yes;"&gt;City of Portland, Bureau of Technology Services&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"&gt;&lt;A href="mailto:paul.cone@portlandoregon.gov"&gt;&lt;SPAN style="mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; color: blue;"&gt;paul.cone@portlandoregon.gov&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 16:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19340#M1476</guid>
      <dc:creator>PaulCone</dc:creator>
      <dc:date>2014-08-27T16:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: CopyRaster Environment Settings Not Being Applied</title>
      <link>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19341#M1477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this still an issue in ArcMap 10.4.1?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 15:16:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyraster-environment-settings-not-being-applied/m-p/19341#M1477</guid>
      <dc:creator>JeniferCochran1</dc:creator>
      <dc:date>2018-08-23T15:16:20Z</dc:date>
    </item>
  </channel>
</rss>

