How to Check Point Inside Polygon or not in ArcObject

 This function for checking point inside polygon or not By using IRelationalOperator2.


public bool chkPointInSide(IPoint pPnt, IFeature pFeature)
{
   bool flg = false;
   try
{
         IRelationalOperator2 pRel = pFeature.Shape as IRelationalOperator2;
   flg = pRel.Contains(pPnt);
}
   catch (Exception ex)
{
      MessageBox.Show(ex.Message);
}
   return flg;
}
Ebook Download
View all
Learn
View all