<?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: How to select polygons using a feature set of points? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424698#M39080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use geomertyEngine.union to combine all the points into single geometry and then use that in you queryTask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out this post &lt;A href="https://community.esri.com/message/533503"&gt;Re: Multiple query tasks&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2015 20:48:26 GMT</pubDate>
    <dc:creator>thejuskambi</dc:creator>
    <dc:date>2015-07-13T20:48:26Z</dc:date>
    <item>
      <title>How to select polygons using a feature set of points?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424696#M39078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of id's that I use to select points with matching id's. I then want to use the selected points to select all of the polygons which contain them. I am using a querytask with a where clause to select the points. Now I am not sure how to go about selecting the polygons. Do I need to step through the set of points and use each point geometry individually to select the polygon which contains it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas welcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:41:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424696#M39078</guid>
      <dc:creator>JaniceBaird</dc:creator>
      <dc:date>2015-07-13T20:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to select polygons using a feature set of points?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424697#M39079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Janice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if you want to use this yet (it's in Beta in v3.13), but there's a way to process this client-side:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengineasync-amd.html" title="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengineasync-amd.html"&gt;esri/geometry/geometryEngineAsync | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, contains() would probably help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengineasync-amd.html#contains" title="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengineasync-amd.html#contains"&gt;esri/geometry/geometryEngineAsync | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't worked with the client-side geoprocessing yet... I would need to set-up some test apps to see what we can do with it. Perusing the API, though, it seems you would need to step over your points. There's also a way to do this synchronously:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengine-amd.html" title="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengine-amd.html"&gt;esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the difference:&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: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;A client-side asynchronous geometry engine. The difference between the &lt;/SPAN&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; color: #4d4d4d; background-position: initial;"&gt;geometryEngineAsync&lt;/CODE&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; and &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengine-amd.html" style="color: #00629b; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;geometryEngine&lt;/A&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; modules is the async functions return a &lt;/SPAN&gt;&lt;A href="http://dojotoolkit.org/reference-guide/dojo/promise.html" style="color: #00629b; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; background-position: initial;"&gt;Promise&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; that are resolved with the same argument as is returned by the sync functions. See the &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.geometryengineasync-amd.html#union" style="color: #00629b; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;&lt;CODE style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; background-position: initial;"&gt;union&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt; method for a code sample.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You could also union your points then run an intersect - that should probably work... Although, now that I think about it, intersect would give you points on the border, too. I'm not sure what the cluster tolerance would be in the API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424697#M39079</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-07-13T20:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to select polygons using a feature set of points?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424698#M39080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use geomertyEngine.union to combine all the points into single geometry and then use that in you queryTask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out this post &lt;A href="https://community.esri.com/message/533503"&gt;Re: Multiple query tasks&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:48:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424698#M39080</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2015-07-13T20:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to select polygons using a feature set of points?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424699#M39081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Janice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If it is not important to know which point intersects which polygon, then I would create a Multipoint from your point geometries and use that in a single spatial Query by setting the Query object geometry property to that created &lt;A href="https://developers.arcgis.com/javascript/jsapi/multipoint-amd.html"&gt;Multipoint&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:55:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424699#M39081</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-13T20:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to select polygons using a feature set of points?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424700#M39082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You all nailed it! I went ahead and used union and used the resulting multipoint to query the polygons. I suppose I could have just created a multipoint from my points as suggested by Robert but was well into my union code before reading his response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are interested, here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; require(["dojo/_base/array","esri/tasks/query","esri/geometry/geometryEngine", "esri/SpatialReference"],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function (array, Query, GeometryEngine, SpatialReference) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var urlParcelMap = dataLink + "/Assessor/PropertyMap/MapServer/";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var arrayOutFields = ["PNUMBER"];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initQueryTask(urlParcelMap, 4, arrayOutFields);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "PNUMBER IN (" + searchString + ")";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var pnums = queryTask.execute(query);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnums.then(function (fset) {&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; var pts = array.map(fset.features, function (feature) {&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature.geometry;&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; var union = esriConfig.defaults.geometryService.union(pts);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&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;&amp;nbsp;&amp;nbsp; union.then(function (results) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayOutFields = ["PARCELID"];&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initQueryTask(urlParcelMap, 5, arrayOutFields);&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = results;&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, showCompQueryResults);&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 21:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-select-polygons-using-a-feature-set-of/m-p/424700#M39082</guid>
      <dc:creator>JaniceBaird</dc:creator>
      <dc:date>2015-07-13T21:52:14Z</dc:date>
    </item>
  </channel>
</rss>

