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

a month ago
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
Esri Regular Contributor


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.


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


0 Kudos
New Contributor II

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

0 Kudos