当前位置: 首页>>代码示例>>C#>>正文


C# Polyline.ConstructGeodeticLineFromDistance方法代码示例

本文整理汇总了C#中Polyline.ConstructGeodeticLineFromDistance方法的典型用法代码示例。如果您正苦于以下问题:C# Polyline.ConstructGeodeticLineFromDistance方法的具体用法?C# Polyline.ConstructGeodeticLineFromDistance怎么用?C# Polyline.ConstructGeodeticLineFromDistance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Polyline的用法示例。


在下文中一共展示了Polyline.ConstructGeodeticLineFromDistance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DrawRadials

        /// <summary>
        /// Method to draw the radials inside the range rings
        /// Must have at least 1 radial
        /// All radials are drawn from the center point to the farthest ring
        /// </summary>
        private void DrawRadials()
        {
            // must have at least 1
            if (NumberOfRadials < 1)
                return;

            double azimuth = 0.0;
            double interval = 360.0 / NumberOfRadials;
            double radialLength = 0.0;

            if (IsInteractive)
                radialLength = maxDistance;
            else
                radialLength = Distance * NumberOfRings;

            try
            {
                // for each radial, draw from center point
                for (int x = 0; x < NumberOfRadials; x++)
                {
                    var construct = new Polyline() as IConstructGeodetic;
                    if (construct == null)
                        continue;

                    construct.ConstructGeodeticLineFromDistance(GetEsriGeodeticType(), Point1, GetLinearUnit(), radialLength, azimuth, esriCurveDensifyMethod.esriCurveDensifyByDeviation, -1.0);
                    AddGraphicToMap(construct as IGeometry);

                    azimuth += interval;
                }
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
开发者ID:Esri,项目名称:distance-direction-addin-dotnet,代码行数:40,代码来源:RangeViewModel.cs

示例2: UpdateFeedback

        private IPoint UpdateFeedback(IPoint centerPoint, double axisTypeDistance)
        {
            if (centerPoint != null && axisTypeDistance > 0.0)
            {
                if (feedback == null)
                {
                    var mxdoc = ArcMap.Application.Document as IMxDocument;
                    CreateFeedback(centerPoint, mxdoc.FocusMap as IActiveView);
                    feedback.Start(centerPoint);
                }

                // now get second point from distance and bearing
                var construct = new Polyline() as IConstructGeodetic;
                if (construct == null)
                {
                    return null;
                }                    

                construct.ConstructGeodeticLineFromDistance(GetEsriGeodeticType(), centerPoint, GetLinearUnit(), axisTypeDistance, 
                    GetAzimuthAsDegrees(), esriCurveDensifyMethod.esriCurveDensifyByDeviation, -1.0);

                var line = construct as IPolyline;

                if (line.ToPoint != null)
                {
                    //FeedbackMoveTo(line.ToPoint);
                    return line.ToPoint;
                }
            }
            return null;
        }
开发者ID:Esri,项目名称:distance-direction-addin-dotnet,代码行数:31,代码来源:EllipseViewModel.cs

示例3: CreateGeodeticLine

        private IPolyline CreateGeodeticLine(IPoint fromPoint, IPoint toPoint, double distance = 0.0)
        {
            var construct = new Polyline() as IConstructGeodetic;
            if (construct == null)
            {
                return null;
            }
            try
            {
                if (distance == 0)
                {
                    construct.ConstructGeodeticLineFromPoints(GetEsriGeodeticType(), fromPoint, toPoint, GetLinearUnit(), esriCurveDensifyMethod.esriCurveDensifyByDeviation, -1.0);
                }
                else
                {
                    var minorPolyline = new Polyline() as IPolyline;
                    minorPolyline.SpatialReference = Point1.SpatialReference;
                    minorPolyline.FromPoint = Point1;
                    minorPolyline.ToPoint = Point3;
                    construct.ConstructGeodeticLineFromDistance(GetEsriGeodeticType(), fromPoint, GetLinearUnit(), distance, GetAzimuth(minorPolyline as IGeometry),
                        esriCurveDensifyMethod.esriCurveDensifyByDeviation, -1.0);
                }
            }
            catch { }

            return construct as IPolyline;
        }        
开发者ID:Esri,项目名称:distance-direction-addin-dotnet,代码行数:27,代码来源:EllipseViewModel.cs

示例4: UpdateFeedback

        private void UpdateFeedback()
        {
            // for now lets stick with only updating feedback here with Bearing and Distance case
            if (LineFromType != LineFromTypes.BearingAndDistance)
                return;

            if(Point1 != null && HasPoint1)
            {
                if(feedback == null)
                {
                    var mxdoc = ArcMap.Application.Document as IMxDocument;
                    CreateFeedback(Point1, mxdoc.FocusMap as IActiveView);
                    feedback.Start(Point1);
                }

                // now get second point from distance and bearing
                var construct = new Polyline() as IConstructGeodetic;
                if (construct == null)
                    return;

                construct.ConstructGeodeticLineFromDistance(GetEsriGeodeticType(), Point1, GetLinearUnit(), Distance, GetAzimuthAsDegrees(), esriCurveDensifyMethod.esriCurveDensifyByDeviation, -1.0);

                var line = construct as IPolyline;

                if (line.ToPoint != null)
                {
                    FeedbackMoveTo(line.ToPoint);
                    Point2 = line.ToPoint;
                }
            }
        }
开发者ID:Esri,项目名称:distance-direction-addin-dotnet,代码行数:31,代码来源:LinesViewModel.cs


注:本文中的Polyline.ConstructGeodeticLineFromDistance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。