Portion or percentage of features returned in a spatial query like intersect query by passing in a geometry

299
2
a month ago
AmritaPatra
New Contributor II

We have built a function that takes in the geometry of a feature in a feature layer and then make a spatial query (intersect/envelope/etc) on another feature layer to retrieve all the features from the second layer that spatial query criteria based on geometry and intersect/envelop etc.

However as part of the response when we get all the features, the result contains features that just touch the boundary of the geometry passed in. 

So we were wondering if there is a way to get the percentage or portion of the returned feature that falls in the input geometry. Hence in the scenario where it just touches the boundary it could be 1% per se, and we could then use that information to make decisions in our workflows.

Looking for any advice or guidance on how we could retrieve that information as part of the query response or via other techniques.

 

0 Kudos
2 Replies
TanuHoque
Esri Regular Contributor

@AmritaPatra 

if you do NOT want to include features are "touched" by the filter-geometry, you can use the relationparam parameter of a query operation, instead of spatialRel parameter. This gives you most control.

TanuHoque_0-1713724586831.png

for more information on this spatial relationship description, please check this help topic out: https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#ISpatialFilter_SpatialRelDescriptio... 

hope this helps

Tanu

0 Kudos
AmritaPatra
New Contributor II

Thank you for the response @TanuHoque ! We will try this out.

0 Kudos