<?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 Inconsistent results from SetNull in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/inconsistent-results-from-setnull/m-p/471280#M36770</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I get different results from a SetNull operation when I run it in a python script compared to a python toolbox.&amp;nbsp; The inputs are exactly the same and the scripts are the same except one has been converted into a python toolbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My input is a raster made up of ones and zeros, I then use SetNull to set the zeros to nulls - I then use RasterToPolygon so I get a shape where all the ones were.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the python script this runs correctly.&lt;/P&gt;&lt;P&gt;However, in the python toolbox the output of the SetNull initially looks correct but if I go into symbology and turn on 'all other values' I can see that instead of nulls the zeros are either still zero or have value= -128.&amp;nbsp; This means that when the RasterToPolygon runs I get unwanted shapes which screws up the rest of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is - Has anyone else experienced anything like this, is it likely to be a bug in the tool, or could it be my scripting error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2016 15:48:21 GMT</pubDate>
    <dc:creator>BenLeslie1</dc:creator>
    <dc:date>2016-03-23T15:48:21Z</dc:date>
    <item>
      <title>Inconsistent results from SetNull</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-results-from-setnull/m-p/471280#M36770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I get different results from a SetNull operation when I run it in a python script compared to a python toolbox.&amp;nbsp; The inputs are exactly the same and the scripts are the same except one has been converted into a python toolbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My input is a raster made up of ones and zeros, I then use SetNull to set the zeros to nulls - I then use RasterToPolygon so I get a shape where all the ones were.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the python script this runs correctly.&lt;/P&gt;&lt;P&gt;However, in the python toolbox the output of the SetNull initially looks correct but if I go into symbology and turn on 'all other values' I can see that instead of nulls the zeros are either still zero or have value= -128.&amp;nbsp; This means that when the RasterToPolygon runs I get unwanted shapes which screws up the rest of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is - Has anyone else experienced anything like this, is it likely to be a bug in the tool, or could it be my scripting error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 15:48:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-results-from-setnull/m-p/471280#M36770</guid>
      <dc:creator>BenLeslie1</dc:creator>
      <dc:date>2016-03-23T15:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent results from SetNull</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-results-from-setnull/m-p/471281#M36771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you confirm if you raster is an integer array since equality checks get a bit iffy if one is relying on the visual classification of the raster rather than the histogram or explicitly converting to integer using ... int ...&amp;nbsp; An of course cell size, extent and snap raster need to be explicitly set when doing these assessments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 02:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-results-from-setnull/m-p/471281#M36771</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-03-26T02:13:02Z</dc:date>
    </item>
  </channel>
</rss>

