<?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: Geometry touches method isn't working? in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807121#M1470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nakul - sorry, obviously my misunderstanding of the use of this method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Sep 2016 22:19:12 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2016-09-01T22:19:12Z</dc:date>
    <item>
      <title>Geometry touches method isn't working?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807118#M1467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Geometry object has a 'touches' method, but it doesn't appear to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a given polygon, and have tested with polylines that are a) contained fully within, b) cross over the perimeter of and c) are completely outside, and all scenarios return a false result. I get this result whether I call geometry1.touches(geometry2) or geometry2.touches(geometry1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To further confirm, if I call geometry1.within(geometry2) then I get the expected results of false if geometry1 is outside geometry2 or partially outside, and true if it is fully inside. I would expect that a geometry "within" therefore definitely "touches".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried geometry.touches(geometry), assuming that this would return true because the two parameters are exactly the same but still got a false result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, I can use the intersect method and test whether it is valid:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #808000;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;(geometry1.intersect(&lt;SPAN style="color: #3d3d3d;"&gt;geometry2&lt;/SPAN&gt;).valid){ //do something }&lt;/PRE&gt;&lt;P&gt;Can anyone else confirm whether the&amp;nbsp;"touches" method is working for them or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 14:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807118#M1467</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-08-26T14:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry touches method isn't working?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807119#M1468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Can you please log this a Technical Support case along with the sample code to investigate it further? Please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Nakul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 16:24:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807119#M1468</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2016-08-30T16:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry touches method isn't working?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807120#M1469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested with polygon geometries and touch operation returns true when the two geometries actually share boundaries.For instance if I click on "Texas state " boundary as first polygon and "New Mexico" as the second&amp;nbsp;polygon. Then I get the result as true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the polygons overlaps, crosses or completely within then it won't return true. If the two polygons are same then also touches won't return true. I also tested all these scenarios in Javascript API and I get the same results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nakul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 01:04:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807120#M1469</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2016-08-31T01:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry touches method isn't working?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807121#M1470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nakul - sorry, obviously my misunderstanding of the use of this method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 22:19:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/geometry-touches-method-isn-t-working/m-p/807121#M1470</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-09-01T22:19:12Z</dc:date>
    </item>
  </channel>
</rss>

