<?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: clean isolated pixel in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320111#M4494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cell statistics compares the value of the cell it is processing with other layers values in the same location. By using and shift function, you can place the surrounding 8 cells "under" the center cell and do some comparisons that you couldn't do otherwise. For example, if you wanted to know if the grid (pixel) were isolated and surrounded by cells that all had the same value, you could use con() to test if the values of the surrounding cells all equaled their average and if the cell had a different value than the average.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sure there are other SA functions that could do this or something like it more eloquently. If not, this might be a way to attack the problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 15:41:40 GMT</pubDate>
    <dc:creator>MarkBoucher</dc:creator>
    <dc:date>2013-09-10T15:41:40Z</dc:date>
    <item>
      <title>clean isolated pixel</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320108#M4491</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;BR /&gt;&lt;SPAN&gt;I'm looking for a way to remove isolated pixels in order to speed up vectorization. In other words, I would like to set the value of its 8 neighbours to any pixel having a different value. I tried Majority but I don't get what I want. This will be coded aftr with Arcobjects. I would be grateful to any idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 12:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320108#M4491</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2013-09-10T12:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: clean isolated pixel</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320109#M4492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've used the Shift tool to do things I couldn't find a specific tool for. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a similar post I responded to.&lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/78067-how-can-I-eliminate-quot-island-quot-raster-cells-from-a-layer"&gt;http://forums.arcgis.com/threads/78067-how-can-I-eliminate-quot-island-quot-raster-cells-from-a-layer&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; My post regarding the use of the shift tool is #4.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:38:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320109#M4492</guid>
      <dc:creator>MarkBoucher</dc:creator>
      <dc:date>2013-09-10T14:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: clean isolated pixel</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320110#M4493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for this answer. It gives me ideas, but I'm not sure I understand the required shift and if it would work in my case as I have plenty of different values (and not 0/6 as in the post) as what I need is to eliminate the orphan pixels which could have any values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:25:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320110#M4493</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2013-09-10T15:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: clean isolated pixel</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320111#M4494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cell statistics compares the value of the cell it is processing with other layers values in the same location. By using and shift function, you can place the surrounding 8 cells "under" the center cell and do some comparisons that you couldn't do otherwise. For example, if you wanted to know if the grid (pixel) were isolated and surrounded by cells that all had the same value, you could use con() to test if the values of the surrounding cells all equaled their average and if the cell had a different value than the average.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sure there are other SA functions that could do this or something like it more eloquently. If not, this might be a way to attack the problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:41:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320111#M4494</guid>
      <dc:creator>MarkBoucher</dc:creator>
      <dc:date>2013-09-10T15:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: clean isolated pixel</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320112#M4495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Olivier,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm looking for a way to remove isolated pixels&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd try Boundary Clean or Thin &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/An_overview_of_the_Generalization_tools/009z00000033000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;(Generalization tools)&lt;/A&gt;&lt;SPAN&gt; before you get too fancy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you decide you truly need to zap single pixel zones, you can find them the Region Group tool and zap them using &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Nibble/009z00000038000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;Nibble&lt;/A&gt;&lt;SPAN&gt;, a tool specifically designed to fill in "holes." &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
from arcpy.sa import *
# set all single-cell zones to NoData
catmask = SetNull(Lookup(RegionGroup(catraster),"COUNT") == 1, catraster)
# fill them in with the Nibble tool
cleanras = Nibble(catraster, catmask)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:12:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320112#M4495</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T15:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: clean isolated pixel</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320113#M4496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mark, Curtis, thanks for your kind help,&amp;nbsp; I'll try your ideas, hope it'll work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 03:40:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/clean-isolated-pixel/m-p/320113#M4496</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2013-09-11T03:40:33Z</dc:date>
    </item>
  </channel>
</rss>

