<?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 Clip overlapping polygon area from an underlying polygon in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clip-overlapping-polygon-area-from-an-underlying/m-p/191794#M17691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two polygons which create in code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;polygon11849185221 = new esri.geometry.Polygon(new esri.SpatialReference({wkid: map.spatialReference})); polygon11849185221 .addRing([[490998.3934, 6118739.2932],[491048.9492, 6118690.8986],[491083.825, 6118656.3184],[491095.9428, 18650.7028]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var symbol11849185221 = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2),new dojo.Color([255,255,0,0.25])); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;polygonGraphic11849185221 = new esri.Graphic(polygon11849185221 , symbol11849185221 , { keeper: true }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var polyLayer11849185221 = new esri.layers.GraphicsLayer({ id: " poly11849185221 " }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(polyLayer11849185221 ); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;polyLayer11849185221 .add(polygonGraphic11849185221); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it posible to get comman coordinates (area coordinates) of two polygons? Thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 May 2013 05:21:14 GMT</pubDate>
    <dc:creator>TomasN</dc:creator>
    <dc:date>2013-05-28T05:21:14Z</dc:date>
    <item>
      <title>Clip overlapping polygon area from an underlying polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clip-overlapping-polygon-area-from-an-underlying/m-p/191794#M17691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two polygons which create in code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;polygon11849185221 = new esri.geometry.Polygon(new esri.SpatialReference({wkid: map.spatialReference})); polygon11849185221 .addRing([[490998.3934, 6118739.2932],[491048.9492, 6118690.8986],[491083.825, 6118656.3184],[491095.9428, 18650.7028]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var symbol11849185221 = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2),new dojo.Color([255,255,0,0.25])); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;polygonGraphic11849185221 = new esri.Graphic(polygon11849185221 , symbol11849185221 , { keeper: true }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var polyLayer11849185221 = new esri.layers.GraphicsLayer({ id: " poly11849185221 " }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(polyLayer11849185221 ); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;polyLayer11849185221 .add(polygonGraphic11849185221); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it posible to get comman coordinates (area coordinates) of two polygons? Thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 05:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clip-overlapping-polygon-area-from-an-underlying/m-p/191794#M17691</guid>
      <dc:creator>TomasN</dc:creator>
      <dc:date>2013-05-28T05:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Clip overlapping polygon area from an underlying polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clip-overlapping-polygon-area-from-an-underlying/m-p/191795#M17692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have two polygons which create in code below:&lt;BR /&gt;&lt;BR /&gt;polygon11849185221 = new esri.geometry.Polygon(new esri.SpatialReference({wkid: map.spatialReference})); polygon11849185221 .addRing([[490998.3934, 6118739.2932],[491048.9492, 6118690.8986],[491083.825, 6118656.3184],[491095.9428, 18650.7028]);&lt;BR /&gt; var symbol11849185221 = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, &lt;BR /&gt;new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2),new dojo.Color([255,255,0,0.25])); &lt;BR /&gt;polygonGraphic11849185221 = new esri.Graphic(polygon11849185221 , symbol11849185221 , { keeper: true }); &lt;BR /&gt;var polyLayer11849185221 = new esri.layers.GraphicsLayer({ id: " poly11849185221 " }); &lt;BR /&gt;map.addLayer(polyLayer11849185221 ); &lt;BR /&gt;polyLayer11849185221 .add(polygonGraphic11849185221); &lt;BR /&gt;&lt;BR /&gt;Is it posible to get comman coordinates (area coordinates) of two polygons? Thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not seeing 2 polygons in your code....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But anyways......&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no direct method in ArcGIS Javascript API for finding common coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use contains method in esri.geometry.Polygon to find the point in polygon &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/polygon.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/polygon.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Loop for all the points of 1 polygon to find in other polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can make use of geometry service method. But this is bit tricky. You need to find the difference of 2 polygons using geometry service and when you get the points array that are not common between 2 polygons. Then loop all the rings of any of the polygon and get the points that don't exists in difference points to get the common points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go to geometry service -&amp;gt; Difference&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 05:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clip-overlapping-polygon-area-from-an-underlying/m-p/191795#M17692</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-28T05:44:36Z</dc:date>
    </item>
  </channel>
</rss>

