<?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 Changing GP service result raster symbology on the fly in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-gp-service-result-raster-symbology-on-the/m-p/266955#M24670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, we've been developing a web application using the javascript API that performs a series of raster calculations. It's a multi-step process, with the results of one GP service being fed into another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, all the result rasters are being returned as greyscale colour ramps and I've been trying to work out if it is possible to change the symbology of raster layers that have been returned. My conclusion is that it is not possible, &lt;SPAN style="line-height: 1.5;"&gt;but I just wondered if anyone had managed to change a raster layer of a web map service or gp service result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I've tried using &lt;A href="https://developers.arcgis.com/javascript/jsapi/layerdrawingoptions-amd.html"&gt;LayerDrawingOptions&lt;/A&gt; to apply a new renderer before adding results to a webmap, but it didn't have any effect. This may be because I didn't get the right layer index, or it's not supported for rasters. I also tried using &lt;A href="http://resources.arcgis.com/en/help/rest/apiref/index.html?export.html"&gt;REST api export&lt;/A&gt; function on the mapserver (at &lt;SPAN style="color: #000066; font-family: monospace, 'Courier New', Courier; font-size: 13.7279996871948px;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/mapserver.html" style="color: #0000c8; font-family: monospace, 'Courier New', Courier; font-size: 13.7279996871948px;"&gt;&amp;lt;mapservice-url&amp;gt;&lt;/A&gt;​&lt;SPAN style="color: #000066; font-family: monospace, 'Courier New', Courier; font-size: 13.7279996871948px;"&gt;/jobs/&amp;lt;jobId&amp;gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;but as it says under dynamicLayers:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt;In case of &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/layerSource.html#dataLayer" style="color: #0000c8;"&gt;dataLayer&lt;/A&gt;&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; based on raster data source only &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;transparency&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; in the &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;drawingInfo&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; is supported. &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;renderer&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; is unsupported at 10.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I couldn't find out if renderer is supported at later versions (we're on 10.3). I did manage to change the transparency of the result layer, so maybe it is still unsupported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I also wondered if we could add something at the end of our python scripts to symbolise the raster before saving it, but the only method I could find was the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer&lt;/A&gt; tool. This works great in arcmap, but doesn't work as a gp tool, where there is no layer to symbolise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I think our only option is to symbolise the GP output raster layers in Arcmap before publishing the result to the server. This works fine, but means that each result has a fixed symbology and we'll have to republish the service to make any changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;If anyone has any more ideas, please let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Cross-posting in &lt;A href="https://community.esri.com/space/2087"&gt;Geoprocessing&lt;/A&gt;​ &lt;A href="https://community.esri.com/space/2100"&gt;ArcGIS for Server&lt;/A&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2015 10:06:54 GMT</pubDate>
    <dc:creator>JonMorris2</dc:creator>
    <dc:date>2015-09-04T10:06:54Z</dc:date>
    <item>
      <title>Changing GP service result raster symbology on the fly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-gp-service-result-raster-symbology-on-the/m-p/266955#M24670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, we've been developing a web application using the javascript API that performs a series of raster calculations. It's a multi-step process, with the results of one GP service being fed into another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, all the result rasters are being returned as greyscale colour ramps and I've been trying to work out if it is possible to change the symbology of raster layers that have been returned. My conclusion is that it is not possible, &lt;SPAN style="line-height: 1.5;"&gt;but I just wondered if anyone had managed to change a raster layer of a web map service or gp service result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I've tried using &lt;A href="https://developers.arcgis.com/javascript/jsapi/layerdrawingoptions-amd.html"&gt;LayerDrawingOptions&lt;/A&gt; to apply a new renderer before adding results to a webmap, but it didn't have any effect. This may be because I didn't get the right layer index, or it's not supported for rasters. I also tried using &lt;A href="http://resources.arcgis.com/en/help/rest/apiref/index.html?export.html"&gt;REST api export&lt;/A&gt; function on the mapserver (at &lt;SPAN style="color: #000066; font-family: monospace, 'Courier New', Courier; font-size: 13.7279996871948px;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/mapserver.html" style="color: #0000c8; font-family: monospace, 'Courier New', Courier; font-size: 13.7279996871948px;"&gt;&amp;lt;mapservice-url&amp;gt;&lt;/A&gt;​&lt;SPAN style="color: #000066; font-family: monospace, 'Courier New', Courier; font-size: 13.7279996871948px;"&gt;/jobs/&amp;lt;jobId&amp;gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;but as it says under dynamicLayers:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt;In case of &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/layerSource.html#dataLayer" style="color: #0000c8;"&gt;dataLayer&lt;/A&gt;&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; based on raster data source only &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;transparency&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; in the &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;drawingInfo&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; is supported. &lt;/SPAN&gt;&lt;CODE style="font-size: 12.4799995422363px; font-family: monospace, 'Courier New', Courier; color: #000066;"&gt;renderer&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12.4799995422363px;"&gt; is unsupported at 10.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I couldn't find out if renderer is supported at later versions (we're on 10.3). I did manage to change the transparency of the result layer, so maybe it is still unsupported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I also wondered if we could add something at the end of our python scripts to symbolise the raster before saving it, but the only method I could find was the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer&lt;/A&gt; tool. This works great in arcmap, but doesn't work as a gp tool, where there is no layer to symbolise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I think our only option is to symbolise the GP output raster layers in Arcmap before publishing the result to the server. This works fine, but means that each result has a fixed symbology and we'll have to republish the service to make any changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;If anyone has any more ideas, please let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Cross-posting in &lt;A href="https://community.esri.com/space/2087"&gt;Geoprocessing&lt;/A&gt;​ &lt;A href="https://community.esri.com/space/2100"&gt;ArcGIS for Server&lt;/A&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 10:06:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/changing-gp-service-result-raster-symbology-on-the/m-p/266955#M24670</guid>
      <dc:creator>JonMorris2</dc:creator>
      <dc:date>2015-09-04T10:06:54Z</dc:date>
    </item>
  </channel>
</rss>

