<?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: Get Pixels within Geometry from PixelBlock (JSAPI 4.X) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684526#M63709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for clarifying that clipping is not possible on the client.&amp;nbsp;Also thanks for the hint about the Raster Functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you allow me a follow-up question: Is it possible to summarize 'statistics' of an image layer within a user supplied geometry (ideally on the client side)? This &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-clientside/index.html"&gt;example&lt;/A&gt;&amp;nbsp;brought me on the idea, but maybe it is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else I believe I can do that with the rest API like &lt;A href="https://developers.arcgis.com/rest/services-reference/compute-statistics-and-histograms.htm"&gt;this&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Dec 2019 17:33:50 GMT</pubDate>
    <dc:creator>LukasWürsch</dc:creator>
    <dc:date>2019-12-04T17:33:50Z</dc:date>
    <item>
      <title>Get Pixels within Geometry from PixelBlock (JSAPI 4.X)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684524#M63707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;With the PixelBlock class, it is possible to access pixels from&amp;nbsp;an&amp;nbsp;imagery layer from the client side (for example like this&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-pixelvalues/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-pixelvalues/index.html"&gt;ImageryLayer - client side pixel filter | ArcGIS API for JavaScript 4.13&lt;/A&gt;&amp;nbsp;). Is it possible to 'clip' or 'filter'&amp;nbsp;a pixelBlock, so only the pixels are returned which are within a geometry?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have in mind is something like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;pixelsInGeometry = pixelData.pixelBlock.clip(geometry)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;... but I did not find a method in the PixelBlock class to achieve this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would highly appreciate any ideas of suggestions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kind Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lukas&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Dec 2019 10:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684524#M63707</guid>
      <dc:creator>LukasWürsch</dc:creator>
      <dc:date>2019-12-02T10:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get Pixels within Geometry from PixelBlock (JSAPI 4.X)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684525#M63708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Client side clipping is not possible for ImageryLayer. Most likely you know that the clipping can be done on the server side. But just in case, I am including this info.&amp;nbsp; You can clip the images on the server side by setting ImageryLayer's &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#renderingRule"&gt;renderingRule&lt;/A&gt;. As you can see from this image service &lt;A href="https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm"&gt;REST&lt;/A&gt; doc, the clip is one of the supported raster functions on image services.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:39:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684525#M63708</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2019-12-03T17:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get Pixels within Geometry from PixelBlock (JSAPI 4.X)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684526#M63709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for clarifying that clipping is not possible on the client.&amp;nbsp;Also thanks for the hint about the Raster Functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you allow me a follow-up question: Is it possible to summarize 'statistics' of an image layer within a user supplied geometry (ideally on the client side)? This &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-clientside/index.html"&gt;example&lt;/A&gt;&amp;nbsp;brought me on the idea, but maybe it is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else I believe I can do that with the rest API like &lt;A href="https://developers.arcgis.com/rest/services-reference/compute-statistics-and-histograms.htm"&gt;this&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Dec 2019 17:33:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-pixels-within-geometry-from-pixelblock-jsapi-4/m-p/684526#M63709</guid>
      <dc:creator>LukasWürsch</dc:creator>
      <dc:date>2019-12-04T17:33:50Z</dc:date>
    </item>
  </channel>
</rss>

