<?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 Intersecting with an entire FeatureLayer? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1347961#M82745</link>
    <description>&lt;P&gt;Maybe I'm just not wording my searches correctly, but I can't seem to find an answer to this. Is there a way to run a simple true/false intersect on an entire FeatureLayer?&lt;/P&gt;&lt;P&gt;Essentially I have a single polygon feature and I want to see if it intersects with a different Feature Layer that has 10's of thousands of features. Is the only way to do this to loop over every feature, checking if each one intersects with my target feature or is there a simpler way?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2023 20:59:08 GMT</pubDate>
    <dc:creator>NicholasRolstad2</dc:creator>
    <dc:date>2023-11-09T20:59:08Z</dc:date>
    <item>
      <title>Intersecting with an entire FeatureLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1347961#M82745</link>
      <description>&lt;P&gt;Maybe I'm just not wording my searches correctly, but I can't seem to find an answer to this. Is there a way to run a simple true/false intersect on an entire FeatureLayer?&lt;/P&gt;&lt;P&gt;Essentially I have a single polygon feature and I want to see if it intersects with a different Feature Layer that has 10's of thousands of features. Is the only way to do this to loop over every feature, checking if each one intersects with my target feature or is there a simpler way?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 20:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1347961#M82745</guid>
      <dc:creator>NicholasRolstad2</dc:creator>
      <dc:date>2023-11-09T20:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting with an entire FeatureLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1347968#M82746</link>
      <description>&lt;P&gt;queryFeatures with spatial query&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using the example from the link,&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.on("pointer-move", function(event){
  let query = featureLayer.createQuery(); // THE OTHER LAYER
  query.geometry = YOUR POLYGON
  query.distance = 2;
  query.units = "miles";
  query.spatialRelationship = "intersects";  // this is the default
  query.returnGeometry = true;
  query.outFields = [ "POPULATION" ];

  featureLayerView.queryFeatures(query)
    .then(function(response){
      // returns a feature set with features containing the
      // POPULATION attribute and each feature's geometry
    });
});&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Nov 2023 21:06:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1347968#M82746</guid>
      <dc:creator>ViktorSafar</dc:creator>
      <dc:date>2023-11-09T21:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting with an entire FeatureLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1348514#M82756</link>
      <description>&lt;P&gt;If we're only interested in knowing whether any features intersect, and don't need to know details anout the individual intersecting features themselves, we could also consider using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount" target="_self"&gt;queryFeatureCount()&lt;/A&gt; method of a FeatureLayer - any count greater than zero means your polygon intersects, and a count of zero means no intersection.&amp;nbsp; This saves having to transfer and process geometry and attribute data.&amp;nbsp; &amp;nbsp;Depending on your use case, that may be beneficial.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2023 19:48:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/intersecting-with-an-entire-featurelayer/m-p/1348514#M82756</guid>
      <dc:creator>mleahy_cl</dc:creator>
      <dc:date>2023-11-12T19:48:41Z</dc:date>
    </item>
  </channel>
</rss>

