<?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 How to restrict a draw touches the another polygon in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-restrict-a-draw-touches-the-another-polygon/m-p/1411100#M84363</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using ArcGIS API for JS. I'm able to create a grid of 1ft X 1ft. Now, whenever I'm able to add another polygon it should touch the grid and no one&amp;nbsp;&lt;SPAN&gt;can start drawing in the middle of the grid, it has to be from corners based on grid size&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Try to use snapping but not able to start the middle of the grid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea or help will be more appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2024 17:49:51 GMT</pubDate>
    <dc:creator>SaiPeketi</dc:creator>
    <dc:date>2024-04-17T17:49:51Z</dc:date>
    <item>
      <title>How to restrict a draw touches the another polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-restrict-a-draw-touches-the-another-polygon/m-p/1411100#M84363</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using ArcGIS API for JS. I'm able to create a grid of 1ft X 1ft. Now, whenever I'm able to add another polygon it should touch the grid and no one&amp;nbsp;&lt;SPAN&gt;can start drawing in the middle of the grid, it has to be from corners based on grid size&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Try to use snapping but not able to start the middle of the grid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea or help will be more appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 17:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-restrict-a-draw-touches-the-another-polygon/m-p/1411100#M84363</guid>
      <dc:creator>SaiPeketi</dc:creator>
      <dc:date>2024-04-17T17:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict a draw touches the another polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-restrict-a-draw-touches-the-another-polygon/m-p/1411126#M84364</link>
      <description>&lt;P&gt;You'll probably use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html" target="_self"&gt;geometryEngine&lt;/A&gt; for this. The docs don't clarify what happens when two geometries share a boundary, so you'll have to do a little testing. Seems like &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#crosses" target="_self"&gt;crosses&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#intersects" target="_self"&gt;intersects&lt;/A&gt;&amp;nbsp;would be a good place to start. Assuming that intersects will return true if they share an edge, you could check if it intersects but doesn't cross.&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;It looks like&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#relate" target="_self"&gt;relate&lt;/A&gt;&amp;nbsp;is what you want. You'll look for a specific boundary result in the DE-9IM matrix table result values.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 18:37:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-restrict-a-draw-touches-the-another-polygon/m-p/1411126#M84364</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2024-04-17T18:37:26Z</dc:date>
    </item>
  </channel>
</rss>

