ArcObject 几何距离计算

ArcObject 几何距离计算

 /// <summary>
        /// 获取两个几何图形的距离
        /// </summary>
        /// <param name="geometry">几何图形A</param>
        /// <param name="geometryOther">几何图形B</param>
        /// <returns>两个几何图形的距离</returns>
        private double GeometryDistance(IGeometry geometry, IGeometry geometryOther)
        {
            if (geometry == null || geometryOther == null) return -1;

            IProximityOperator proOperator = geometry as IProximityOperator;
            double distance = proOperator.ReturnDistance(geometryOther);

            // 距离转换 度->米
            IUnitConverter convert = new UnitConverterClass();
            distance = convert.ConvertUnits(distance, esriUnits.esriDecimalDegrees, esriUnits.esriMeters);
            
            return distance;
        }

上一篇:知乎: Lurie 的 derived algebraic geometry 有多重要?


下一篇:python 实现批量 WKT 转 KML