<?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 Calculating Percentage of feature layer's geometry in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352285#M82864</link>
    <description>&lt;P&gt;Hi everyone, so I'm allowing users to draw buffer rings and I was wondering if its possible to calculate how much percentage of the feature layer's area/geometry is within the buffer. Is there an api to do such thing?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 21:35:55 GMT</pubDate>
    <dc:creator>Charan</dc:creator>
    <dc:date>2023-11-21T21:35:55Z</dc:date>
    <item>
      <title>Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352285#M82864</link>
      <description>&lt;P&gt;Hi everyone, so I'm allowing users to draw buffer rings and I was wondering if its possible to calculate how much percentage of the feature layer's area/geometry is within the buffer. Is there an api to do such thing?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 21:35:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352285#M82864</guid>
      <dc:creator>Charan</dc:creator>
      <dc:date>2023-11-21T21:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352295#M82865</link>
      <description>&lt;P&gt;If you're working with the Maps SDK for JS, try using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#intersect" target="_self"&gt;intersect&lt;/A&gt; method of the geometryEngine. You would intersect the two geometries, &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicArea" target="_self"&gt;calculate the area&lt;/A&gt; of the intersect result, then compare that with the total area of the original feature.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 21:46:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352295#M82865</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2023-11-21T21:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352345#M82866</link>
      <description>You could probably use arcade Expressions to capture that information,&lt;BR /&gt;unless you want to store it as an attribute.&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Nov 2023 23:21:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352345#M82866</guid>
      <dc:creator>irmcintosh</dc:creator>
      <dc:date>2023-11-21T23:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352500#M82876</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789"&gt;@BlakeTerhune&lt;/a&gt;&amp;nbsp;Will I be using the intersect results to calculate the area?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 14:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352500#M82876</guid>
      <dc:creator>Charan</dc:creator>
      <dc:date>2023-11-22T14:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352507#M82877</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;percentage = (part/whole)*100&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The "part" will be the intersect geometry area and the "whole" is the original feature geometry area.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 14:22:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352507#M82877</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2023-11-22T14:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352511#M82878</link>
      <description>&lt;P&gt;Indeed, there are geometry &lt;A href="https://developers.arcgis.com/arcade/function-reference/" target="_self"&gt;functions for Arcade&lt;/A&gt; too.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersection" target="_self"&gt;Intersection&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area" target="_self"&gt;Area&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 14:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352511#M82878</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2023-11-22T14:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352558#M82885</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789"&gt;@BlakeTerhune&lt;/a&gt;&amp;nbsp;so I used the following code to get the geometries of the intersected results. However, I cant find the geometry for it&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;i&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;i&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;geoslabel&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;length&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;i&lt;/SPAN&gt;&lt;SPAN&gt;++) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;let&lt;/SPAN&gt; &lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;TradeArea_Data&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;createQuery&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;geoslabel&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;i&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;where&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"year = 2022"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;spatialRelationship&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"intersects"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;outFields&lt;/SPAN&gt;&lt;SPAN&gt;=[&lt;/SPAN&gt;&lt;SPAN&gt;"DACODE"&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;returnGeometry&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;= &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;TradeArea_Data&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;querycentroids2&lt;/SPAN&gt;&lt;SPAN&gt;). &lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;features&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;length&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;length&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;++) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;attributes&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'DACODE'&lt;/SPAN&gt;&lt;SPAN&gt;],&lt;/SPAN&gt;&lt;SPAN&gt;geometryEngine&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;intersect&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;geoslabel&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;i&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Charan_0-1700670670276.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86885iD3AF8E4A3DFC7FA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Charan_0-1700670670276.png" alt="Charan_0-1700670670276.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Nov 2023 16:31:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352558#M82885</guid>
      <dc:creator>Charan</dc:creator>
      <dc:date>2023-11-22T16:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352603#M82888</link>
      <description>&lt;P&gt;Sorry, I don't understand the question. Please clarify your end goal.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 16:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352603#M82888</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2023-11-22T16:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352609#M82889</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789"&gt;@BlakeTerhune&lt;/a&gt;&amp;nbsp;I have updated my question!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 16:31:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352609#M82889</guid>
      <dc:creator>Charan</dc:creator>
      <dc:date>2023-11-22T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentage of feature layer's geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352638#M82892</link>
      <description>&lt;P&gt;You are only working with the whole geometry of each feature in your loop. Nowhere are you calling the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#intersect" target="_self"&gt;intersect method&lt;/A&gt;. I'm just guessing that&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;geoslabel&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;i&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;geometry&lt;/FONT&gt; is the other geometry you want to calculate the percentage with...&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for (i=0; i&amp;lt; geoslabel.length; i++) {
    let querycentroids2 = TradeArea_Data.createQuery();
    querycentroids2.geometry = geoslabel[i].geometry;
    querycentroids2.where = "year = 2022";
    querycentroids2.spatialRelationship = "intersects";
    querycentroids2.outFields=["DACODE"];
    querycentroids2.returnGeometry  = true;

    await TradeArea_Data.queryFeatures(querycentroids2)
    .then (function (response) {
        const values = response.features
        for (var a = 0; a &amp;lt; values.length; a++) {
            const intersect_geom = geometryEngine.intersect(values[a].geometry, geoslabel[i].geometry);
            const intersect_area = geometryEngine.geodesicArea(intersect_geom, 'square-kilometers');
            const feature_area = geometryEngine.geodesicArea(values[a].geometry, 'square-kilometers');
            const intersect_percent = (intersect_area / feature_area) * 100;
            console.log(values[a].attributes['DACODE'], `feature_area = ${feature_area}`, `intersect_area = ${intersect_area}`, `intersect_percent = ${intersect_percent}`);
        }
    });
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Nov 2023 16:32:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calculating-percentage-of-feature-layer-s-geometry/m-p/1352638#M82892</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2023-11-22T16:32:32Z</dc:date>
    </item>
  </channel>
</rss>

