AnsweredAssumed Answered

GeometryEngine.intersect of Envelope and Point not working?

Question asked by paul.haakma on May 3, 2018
Latest reply on May 4, 2018 by paul.haakma

I'm wondering if someone can confirm whether the GeometryEngine intersect, within and contain actually work or what I'm doing wrong here?

 

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.

 

But the intersect, within and contain method of the GeometryEngine all return false.

 

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.

 

{"spatialReference":{"wkid":2193},"x":1807060.4336000008,"y":5805845.484999999}

 

extent: {"spatialReference":{"wkid":2193},"xmax":1808145.75126373,"xmin":1804585.54265801,"ymax":5807337.66295673,"ymin":5804529.46796706}

 

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?

 

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?

Attachments

Outcomes