<?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: Using esri.tasks.geometry to get a polygon with holes and a set of points in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310585#M28575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the prompt response. Regarding what the geometry service (called using esri.tasks.GeometryService) should return: if passed a single geometry with the proper inner ring orientation (1st input) and an array of geometries (2nd input), the returned result is NOT expected to exclude the points that appear within the hollow area? It would be great if we can get some sample code that returns the proper intersection result instead of excessive validation and proceesing client-side to do the same.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what you can do is create a geometry out of the interior ring and do the interaction with the point...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 18:20:21 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2012-06-11T18:20:21Z</dc:date>
    <item>
      <title>Using esri.tasks.geometry to get a polygon with holes and a set of points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310582#M28572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The idea is simple. Given a hollow polygon as geometry A and an array of point geometries, we would like to figure out the proper intersection between the two. Below is the code used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var geometryService = new esri.tasks.GeometryService("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" rel="nofollow" target="_blank"&gt;http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var relationParams = new esri.tasks.RelationParameters();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;relationParams.geometries1 = [hollowPolygonGeom];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;relationParams.geometries2 = [point1geom, point2geom, ..., pointXgeom];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;relationParams.relation = esri.tasks.RelationParameters.SPATIAL_REL_WITHIN;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;geometryService.relation(relationParams, onSuccess, onErr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The results returned by the service include the intersection between the "hollow" are of the polygon and the points. We also noticed that the orientation of the inner ring (the hollow shape) affects the returned results. Either way, the results are not what we wanted. Is this behavior expected? What are we missing? Is there another way to get the results we need?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 15:21:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310582#M28572</guid>
      <dc:creator>NaderChouman</dc:creator>
      <dc:date>2012-06-11T15:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using esri.tasks.geometry to get a polygon with holes and a set of points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310583#M28573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The idea is simple. Given a hollow polygon as geometry A and an array of point geometries, we would like to figure out the proper intersection between the two. Below is the code used:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;var geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");&lt;BR /&gt;var relationParams = new esri.tasks.RelationParameters();&lt;BR /&gt;&lt;BR /&gt;relationParams.geometries1 = [hollowPolygonGeom];&lt;BR /&gt;relationParams.geometries2 = [point1geom, point2geom, ..., pointXgeom];&lt;BR /&gt;relationParams.relation = esri.tasks.RelationParameters.SPATIAL_REL_WITHIN;&lt;BR /&gt;&lt;BR /&gt;geometryService.relation(relationParams, onSuccess, onErr);&lt;BR /&gt;&lt;BR /&gt;The results returned by the service include the intersection between the "hollow" are of the polygon and the points. We also noticed that the orientation of the inner ring (the hollow shape) affects the returned results. Either way, the results are not what we wanted. Is this behavior expected? What are we missing? Is there another way to get the results we need?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcObjects, counter clockwise ring is an interor ring -hollow. In JSAP, you could use esri.geometry.isClockwise(ring) to validate if it is a hollow ring (hole). It is useful when you do intersection. For example, if the hollow ring contains the array of the points, then the polygon is not intersect with the points !!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 17:30:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310583#M28573</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2012-06-11T17:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using esri.tasks.geometry to get a polygon with holes and a set of points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310584#M28574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the prompt response. Regarding what the geometry service (called using esri.tasks.GeometryService) should return: if passed a single geometry with the proper inner ring orientation (1st input) and an array of geometries (2nd input), the returned result is NOT expected to exclude the points that appear within the hollow area? It would be great if we can get some sample code that returns the proper intersection result instead of excessive validation and proceesing client-side to do the same.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 17:51:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310584#M28574</guid>
      <dc:creator>NaderChouman</dc:creator>
      <dc:date>2012-06-11T17:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using esri.tasks.geometry to get a polygon with holes and a set of points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310585#M28575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the prompt response. Regarding what the geometry service (called using esri.tasks.GeometryService) should return: if passed a single geometry with the proper inner ring orientation (1st input) and an array of geometries (2nd input), the returned result is NOT expected to exclude the points that appear within the hollow area? It would be great if we can get some sample code that returns the proper intersection result instead of excessive validation and proceesing client-side to do the same.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what you can do is create a geometry out of the interior ring and do the interaction with the point...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 18:20:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310585#M28575</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2012-06-11T18:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using esri.tasks.geometry to get a polygon with holes and a set of points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310586#M28576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Heming,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using esri.geometry.isClockwise, we validate and adjust the geometry to be a proper hollow polygon: the outer ring(s) intended to be included are clockwise and the inner rings intended to be excluded are counter clockwise. Sending a polygon with properly oriented rings to the geometry service returned the expected results. Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 19:38:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-esri-tasks-geometry-to-get-a-polygon-with/m-p/310586#M28576</guid>
      <dc:creator>NaderChouman</dc:creator>
      <dc:date>2012-06-11T19:38:39Z</dc:date>
    </item>
  </channel>
</rss>

