<?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: tools that require layers as input in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392640#M31063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In a word, no. You must create an output raster since a layer simply points to the data. However, you should be able to create a temporary raster in the "in_memory" workspace, if this is simply intermediate data, and create a raster layer referencing that raster. Not all tools support in_memory feature classes/rasters as inputs or outputs. Off the top of my head I'm not sure if slice does or not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2012 22:53:42 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2012-11-09T22:53:42Z</dc:date>
    <item>
      <title>tools that require layers as input</title>
      <link>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392639#M31062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working with rasters in ArcGIS 10.0 and trying to automate several processes over hundreds of files.&amp;nbsp; Two of the geoprocessing tasks that I want to do are "slice" and "apply symbology".&amp;nbsp; I am slicing one-band rasters to two classes using natural breaks and hope to get NoData and a value. I have created layer files to apply different colors to the different values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I have written the code to convert the rasters to raster layers for the "slice" operation, it seems clumsy to repeat that conversion on the output of "slice" in order to then use the "apply symbology" process.&amp;nbsp; Is it possible in coding "slice" to create a layer as the output right away?&amp;nbsp; Or is there a better way?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;krs&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 15:32:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392639#M31062</guid>
      <dc:creator>KatSuda</dc:creator>
      <dc:date>2012-11-09T15:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: tools that require layers as input</title>
      <link>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392640#M31063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In a word, no. You must create an output raster since a layer simply points to the data. However, you should be able to create a temporary raster in the "in_memory" workspace, if this is simply intermediate data, and create a raster layer referencing that raster. Not all tools support in_memory feature classes/rasters as inputs or outputs. Off the top of my head I'm not sure if slice does or not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 22:53:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392640#M31063</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-11-09T22:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: tools that require layers as input</title>
      <link>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392641#M31064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Since I have written the code to convert the rasters to raster layers for the "slice" operation, it seems clumsy to repeat that conversion on the output of "slice" in order to then use the "apply symbology" process.&amp;nbsp; Is it possible in coding "slice" to create a layer as the output right away?&amp;nbsp; Or is there a better way?&amp;nbsp; &lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to reiterate - it is not a conversion - a layer is an object that points to the dataset.&amp;nbsp; Creating a raster layer only takes a moment to do. Most raster tools accept either raster layers or rasters as input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm assuming you're writing a script tool - if the output is your sliced raster, you don't need to do this in code. Just set up your output raster as an output parameter, and set that parameters output Symbology property to point to your .lyr file. Make sure your slice output is saved to that output parameter path.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 22:18:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392641#M31064</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-11-13T22:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: tools that require layers as input</title>
      <link>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392642#M31065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks to you both.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;krs&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 19:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tools-that-require-layers-as-input/m-p/392642#M31065</guid>
      <dc:creator>KatSuda</dc:creator>
      <dc:date>2012-11-16T19:39:52Z</dc:date>
    </item>
  </channel>
</rss>

