<?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: rendering image service using raster function create rainbows? in ArcGIS Image Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/548#M303</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp;I published a mosaic dataset as image service. On the service editor, I added a raster function template. The mosaic dataset and the function template were copied to the server together. The python function specified in the template is attached below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the client side, I set the mosaic rule and rendering rule:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//render rule&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var renderRF = new RasterFunction(); &lt;BR /&gt;renderRF.functionName = "CustomziedRasterFuncTemplate"; &lt;BR /&gt; renderRF.functionArguments = { &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"ignoredvalues":ignoredPixelValues, &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"Raster": "$$"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//mosaic rule&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var msRule = new MosaicRule();&lt;BR /&gt; msRule.method = MosaicRule.METHOD_LOCKRASTER;&lt;BR /&gt; msRule.lockRasterIds = [bandIndex]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//image service parameter&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var params = new ImageServiceParameters();&lt;BR /&gt; params.noData = 0; &lt;BR /&gt; params.mosaicRule = msRule;&lt;BR /&gt; params.renderingRule=renderRF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//image service layer&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var imageServiceLayer = new ArcGISImageServiceLayer(mosaidImageServiceURL, {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;imageServiceParameters: params,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; opacity: 1.0&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kaixi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jan 2018 01:01:36 GMT</pubDate>
    <dc:creator>springzhang</dc:creator>
    <dc:date>2018-01-17T01:01:36Z</dc:date>
    <item>
      <title>rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/546#M301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a customized python raster function, which is&amp;nbsp;pretty simple,&amp;nbsp;&amp;nbsp;setting some given values among the input raster to zero.Here, I used numpy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;inputRasterNumpyArray[&lt;SPAN&gt;inputRasterNumpyArray&lt;/SPAN&gt;&lt;SPAN&gt;==target_value&lt;/SPAN&gt;]=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function works well in ArcMap. But when I used this raster function to render an image service, the result is very strange (see below). I can see vector lines when zooming in. Does anyone have any idea why it looks like this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/393005_pastedImage_1.png" style="width: 620px; height: 435px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:56:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/546#M301</guid>
      <dc:creator>springzhang</dc:creator>
      <dc:date>2018-01-16T18:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/547#M302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Spring,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of input data are you using for this? Are you applying this as a template on a mosaic dataset or are you just using a raster dataset and image service as an input to the function itself? Is there already a template applied to the image service before you publish it or are the raw pixels being transmitted in the image service? Would it be possible for you to send the Python function?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 23:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/547#M302</guid>
      <dc:creator>JamieDrisdelle</dc:creator>
      <dc:date>2018-01-16T23:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/548#M303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp;I published a mosaic dataset as image service. On the service editor, I added a raster function template. The mosaic dataset and the function template were copied to the server together. The python function specified in the template is attached below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the client side, I set the mosaic rule and rendering rule:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//render rule&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var renderRF = new RasterFunction(); &lt;BR /&gt;renderRF.functionName = "CustomziedRasterFuncTemplate"; &lt;BR /&gt; renderRF.functionArguments = { &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"ignoredvalues":ignoredPixelValues, &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"Raster": "$$"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//mosaic rule&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var msRule = new MosaicRule();&lt;BR /&gt; msRule.method = MosaicRule.METHOD_LOCKRASTER;&lt;BR /&gt; msRule.lockRasterIds = [bandIndex]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//image service parameter&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var params = new ImageServiceParameters();&lt;BR /&gt; params.noData = 0; &lt;BR /&gt; params.mosaicRule = msRule;&lt;BR /&gt; params.renderingRule=renderRF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&lt;EM&gt;//image service layer&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var imageServiceLayer = new ArcGISImageServiceLayer(mosaidImageServiceURL, {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;imageServiceParameters: params,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; opacity: 1.0&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kaixi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 01:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/548#M303</guid>
      <dc:creator>springzhang</dc:creator>
      <dc:date>2018-01-17T01:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/549#M304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaixi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of raster are you applying this function to? I am getting a blank output when i apply this to rasters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 18:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/549#M304</guid>
      <dc:creator>JamieDrisdelle</dc:creator>
      <dc:date>2018-01-18T18:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/550#M305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for following-up. I have sent&amp;nbsp;our&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;image service url to your esri email address.&amp;nbsp;Please let me know if anything else is needed. Thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kaixi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 19:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/550#M305</guid>
      <dc:creator>springzhang</dc:creator>
      <dc:date>2018-01-18T19:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/551#M306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just out of curiosity, Kaixi - does the resampling method used by the Image Service match the resampling method used in ArcMap? To check this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go the Services Directory to view the service details. There you'll find a property "&lt;STRONG&gt;Default Resampling Method&lt;/STRONG&gt;"&lt;/LI&gt;&lt;LI&gt;In ArcMap, check the properties of the Layer and switch to the &lt;STRONG&gt;Display&lt;/STRONG&gt; tab.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ask because certain resampling methods can cause display issues - these can be odd-colored outlines around features for example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 16:17:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/551#M306</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2018-02-21T16:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: rendering image service using raster function create rainbows?</title>
      <link>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/552#M307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Earl, you are right! Jamie helped me figure it out.&amp;nbsp;We changed the data type to Thematic, sampling method to Nearest neighbor, and then rebuilt the pyramid.&amp;nbsp;After those changes, it works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully it could help any others that encounter the same issue.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 17:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-server-questions/rendering-image-service-using-raster-function/m-p/552#M307</guid>
      <dc:creator>springzhang</dc:creator>
      <dc:date>2018-02-21T17:41:08Z</dc:date>
    </item>
  </channel>
</rss>

