<?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 GeometryEngine.intersect of Envelope and Point not working? in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251891#M1299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering if someone can confirm whether the GeometryEngine intersect, within and contain actually work or what I'm doing wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to test if a point is within an Extent. You can see from the json representations below that the point definitely sits within the extent, at least as far as I can tell. As further proof, see the screenshot below where the red box is the extent and the yellow dot is the point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the intersect, within and contain method of the GeometryEngine all return false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried converting the Envelope to a polygon, and also buffering the point slightly so I'm comparing two of the same geometry types but still couldn't get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;{"spatialReference":{"wkid":2193},"x":1807060.4336000008,"y":5805845.484999999}&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;extent: {"spatialReference":{"wkid":2193},"xmax":1808145.75126373,"xmin":1804585.54265801,"ymax":5807337.66295673,"ymin":5804529.46796706}&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;FOOTNOTE: After writing the above I tried one more thing and it seemed to work, so now I'm wondering if it's a bug to do with spatial references?&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;I tried projecting both the extent and the point to web Mercator and performed the intersect comparison on that and it worked. So possibly the GeometryEngine not fully working yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 May 2018 04:33:42 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-05-04T04:33:42Z</dc:date>
    <item>
      <title>GeometryEngine.intersect of Envelope and Point not working?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251891#M1299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering if someone can confirm whether the GeometryEngine intersect, within and contain actually work or what I'm doing wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to test if a point is within an Extent. You can see from the json representations below that the point definitely sits within the extent, at least as far as I can tell. As further proof, see the screenshot below where the red box is the extent and the yellow dot is the point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the intersect, within and contain method of the GeometryEngine all return false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried converting the Envelope to a polygon, and also buffering the point slightly so I'm comparing two of the same geometry types but still couldn't get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;{"spatialReference":{"wkid":2193},"x":1807060.4336000008,"y":5805845.484999999}&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;extent: {"spatialReference":{"wkid":2193},"xmax":1808145.75126373,"xmin":1804585.54265801,"ymax":5807337.66295673,"ymin":5804529.46796706}&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;FOOTNOTE: After writing the above I tried one more thing and it seemed to work, so now I'm wondering if it's a bug to do with spatial references?&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;I tried projecting both the extent and the point to web Mercator and performed the intersect comparison on that and it worked. So possibly the GeometryEngine not fully working yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 04:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251891#M1299</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-04T04:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryEngine.intersect of Envelope and Point not working?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251892#M1300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul, I'm glad you got the code working in the end. You are correct that GeometryEngine.intersect does expect that the two geometry objects be in a common SpatialReference. You don't necessarily need to project them both - you could do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var geom2Projected = GeometryEngine.project(geom2, geom1.spatialReference());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to put them in the same system. It's also worth connecting to the errorOccurred signal of the GeometryEngine object - that should give you some information where these kinds of operations are not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 11:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251892#M1300</guid>
      <dc:creator>LukeSmallwood</dc:creator>
      <dc:date>2018-05-04T11:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryEngine.intersect of Envelope and Point not working?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251893#M1301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luke&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. The only comment I'd make is that the two original geometries that I was comparing were already in the same projection. They were both in NZTM (wkid: 2193) (see the json object text I pasted in the original comment). So the GeometryEngine.intersect() didn't work when they were in NZTM, but worked when they were both converted to web Mercator.&lt;/P&gt;&lt;P&gt;So this suggests to be a bug of some sort still?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2018 05:16:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/geometryengine-intersect-of-envelope-and-point-not/m-p/251893#M1301</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-05T05:16:01Z</dc:date>
    </item>
  </channel>
</rss>

