ArcGIS Engine判断Point是否在几何图形Geometry上

说明:小于指定容差即认为在几何图形上

        /// 
        /// 判断点是否在几何图形上
        /// 
        /// 传入的几何图形
        /// 待判断的点
        /// 容差
        /// 是否
        private  bool PointOnGeometry(ESRI.ArcGIS.Geometry.IGeometry pGeometry, ESRI.ArcGIS.Geometry.IPoint pPoint, double dTolerance = 1e-5)
        {
            bool b = false;
            try
            {
                ESRI.ArcGIS.Geometry.IProximityOperator pProximityOperator = pPoint as ESRI.ArcGIS.Geometry.IProximityOperator;
                double dDistance = pProximityOperator.ReturnDistance(pGeometry);
                if (dTolerance >= 0 && dTolerance > dDistance)
                {
                    b = true;
                }
            }
            catch (Exception e)
            {
                Log.Loging.Error(e.Message);
            }
            return b;
        }


你可能感兴趣的:(ArcGIS Engine判断Point是否在几何图形Geometry上)