<?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: Passing set of geometries to a single Querytask object in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654213#M60957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I've hit a snag with the union JavaScript code above.&amp;nbsp; The code breaks with the following cases:&lt;BR /&gt;&lt;BR /&gt;If I have a polygon with a hole in it, but that hole is occupied by 2 more polygons that exactly fit the space, each taking up about half the hole space, together they fill the hole.&amp;nbsp; Put another way imagine a polygon with a square hole in it, and that hole is filled by 2 rectangular polygons. i.e. trying to union 3 polygons to create one seamless/holeless shape.&lt;BR /&gt;&lt;BR /&gt;If I have a polygon with 2 holes in it, and each hole is filled with a perfectly fitting polygon. i.e. trying to union 3 polygons to create one seamless/holeless shape.&lt;BR /&gt;&lt;BR /&gt;Has anyone come up with some JS code to handle this please?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark, When this this thread was posted, the GeometryService class did not have function to deal with your case. Now, you might be able to use GeometryService.union(geometries, callback?, errback?) for your case.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2011 15:01:51 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2011-10-20T15:01:51Z</dc:date>
    <item>
      <title>Passing set of geometries to a single Querytask object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654209#M60953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a set of geometries and need to overlay them on a point layer to determine points falling under the set of geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the Union function of&amp;nbsp; Geometry service to combine the geometries and pass the unioned geometry to the Querytask object of point layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The union works fine for small subset of geometries , but when large set of geometries are passed to Geometry service , the&amp;nbsp; process takes a lot of time , often resulting in scripting error message ??????.Script is causing IE to slow down.??? . &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any alternative of passing a set of geometries (Array or List ) to a single&amp;nbsp; Querytask object?&amp;nbsp; I tried passing the extent of set of geometries to querytask , but extent picks up lot of additional points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nidhi Arora.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 19:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654209#M60953</guid>
      <dc:creator>nidhiarora</dc:creator>
      <dc:date>2011-04-06T19:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Passing set of geometries to a single Querytask object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654210#M60954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post some of your code? If you're using &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/geometryservice.htm#union"&gt;GeometryService.union()&lt;/A&gt;&lt;SPAN&gt;, the geometry operation should be happening on the server, not on the client so you shouldn't be getting a warning about slow javascript.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 20:28:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654210#M60954</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-04-06T20:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Passing set of geometries to a single Querytask object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654211#M60955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a set of geometries and need to overlay them on a point layer to determine points falling under the set of geometries.&lt;BR /&gt;I use the Union function of&amp;nbsp; Geometry service to combine the geometries and pass the unioned geometry to the Querytask object of point layer.&lt;BR /&gt;The union works fine for small subset of geometries , but when large set of geometries are passed to Geometry service , the&amp;nbsp; process takes a lot of time , often resulting in scripting error message �?��?�.Script is causing IE to slow down.�?� . &lt;BR /&gt;&lt;BR /&gt;Is there any alternative of passing a set of geometries (Array or List ) to a single&amp;nbsp; Querytask object?&amp;nbsp; I tried passing the extent of set of geometries to querytask , but extent picks up lot of additional points.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nidhi Arora.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For a large set of geometries, Union is not an option. I had similar exprience. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What i did is create a javascript function and do it on client... Here is my functin for your reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;function mergeGeometries(features) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* STR search might result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * multi polygons&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * merge them into a single one&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polygon = features[0].geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 1; i &amp;lt; features.length; i++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var poly = features&lt;I&gt;.geometry;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (j = 0; j &amp;lt; poly.rings.length; j++) {&lt;/SPAN&gt;&lt;BR /&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; polygon.addRing(poly.rings&lt;J&gt;);&lt;/J&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return polygon;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hope it will help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 14:39:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654211#M60955</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-04-07T14:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Passing set of geometries to a single Querytask object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654212#M60956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've hit a snag with the union JavaScript code above.&amp;nbsp; The code breaks with the following cases:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I have a polygon with a hole in it, but that hole is occupied by 2 more polygons that exactly fit the space, each taking up about half the hole space, together they fill the hole.&amp;nbsp; Put another way imagine a polygon with a square hole in it, and that hole is filled by 2 rectangular polygons. i.e. trying to union 3 polygons to create one seamless/holeless shape.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I have a polygon with 2 holes in it, and each hole is filled with a perfectly fitting polygon. i.e. trying to union 3 polygons to create one seamless/holeless shape.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone come up with some JS code to handle this please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 14:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654212#M60956</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2011-10-20T14:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Passing set of geometries to a single Querytask object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654213#M60957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I've hit a snag with the union JavaScript code above.&amp;nbsp; The code breaks with the following cases:&lt;BR /&gt;&lt;BR /&gt;If I have a polygon with a hole in it, but that hole is occupied by 2 more polygons that exactly fit the space, each taking up about half the hole space, together they fill the hole.&amp;nbsp; Put another way imagine a polygon with a square hole in it, and that hole is filled by 2 rectangular polygons. i.e. trying to union 3 polygons to create one seamless/holeless shape.&lt;BR /&gt;&lt;BR /&gt;If I have a polygon with 2 holes in it, and each hole is filled with a perfectly fitting polygon. i.e. trying to union 3 polygons to create one seamless/holeless shape.&lt;BR /&gt;&lt;BR /&gt;Has anyone come up with some JS code to handle this please?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark, When this this thread was posted, the GeometryService class did not have function to deal with your case. Now, you might be able to use GeometryService.union(geometries, callback?, errback?) for your case.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 15:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-set-of-geometries-to-a-single-querytask/m-p/654213#M60957</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-10-20T15:01:51Z</dc:date>
    </item>
  </channel>
</rss>

