Hi all,
Can anyone provide any examples or an explanation of how to get a Boolean output rather than a FeatureSet output from the Intersects() or Within() functions? The documentation doesn't elaborate much on this and states that the function provides a Boolean output. The goal for me would be to get an Boolean value for the spatial relationship between features without having to use the Count() function as is shown in many other posts.
For example, I would think this expression would work, but it doesn't.
IIF(Intersects(geom1, geom2), "In", "Out")
Neither does this (always returns false):
var myValue = Intersects(geom1, geom2)
IIF(myvalue == true, "In", "Out")
If I cast the intersects output as a Boolean, it is always false.
IIF(Boolean(Intersects(geom1, geom2)), "In", "Out")
There are a couple other expression patterns I've tried, but the only thing that works is to count the number of features returned in the FeatureSet and return values based upon the number of features returned.
I have met with a few people recently who had the same issue so it seems like a fairly common question.
Thanks in advance!
Peter